/* PK Income Tax Calculator - WordPress Plugin Styles */

.pktax-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 1.5rem auto;
    color: #1a1a1a;
}

/* ── Hero ── */
.pktax-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    color: #fff;
}
.pktax-theme-blue  .pktax-hero { background: linear-gradient(135deg, #1a5276, #154360); }
.pktax-theme-green .pktax-hero { background: linear-gradient(135deg, #1e8449, #145a32); }
.pktax-theme-dark  .pktax-hero { background: linear-gradient(135deg, #1a1a2e, #16213e); }

.pktax-hero-icon { font-size: 32px; }
.pktax-title     { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.pktax-subtitle  { font-size: 13px; opacity: 0.8; margin: 0; }

/* ── Grid ── */
.pktax-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 640px) {
    .pktax-grid { grid-template-columns: 1fr; }
}

/* ── Cards ── */
.pktax-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.pktax-card-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7280;
    margin: 0 0 1rem;
}

/* ── Fields ── */
.pktax-field { margin-bottom: 1rem; }
.pktax-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}
.pktax-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    transition: border-color 0.15s;
}
.pktax-input-wrap:focus-within {
    border-color: #1a5276;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,82,118,0.1);
}
.pktax-prefix {
    padding: 9px 10px;
    font-size: 13px;
    color: #6b7280;
    background: #f3f4f6;
    border-right: 1px solid #d1d5db;
    font-weight: 500;
}
.pktax-input-wrap input {
    flex: 1;
    border: none !important;
    outline: none !important;
    padding: 9px 12px;
    font-size: 14px;
    background: transparent;
    box-shadow: none !important;
    color: #111;
}
.pktax-year {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #f9fafb;
    color: #111;
    cursor: pointer;
}

/* ── Toggle buttons ── */
.pktax-toggle-group { display: flex; gap: 8px; }
.pktax-toggle {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    background: #f9fafb;
    color: #374151;
    transition: all 0.15s;
    font-weight: 500;
}
.pktax-toggle.active {
    background: #1a5276;
    color: #fff;
    border-color: #1a5276;
}
.pktax-theme-green .pktax-toggle.active { background: #1e8449; border-color: #1e8449; }
.pktax-theme-dark  .pktax-toggle.active { background: #16213e; border-color: #16213e; }

/* ── Calculate Button ── */
.pktax-btn-calc {
    width: 100%;
    margin-top: 4px;
    padding: 11px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: #fff;
    letter-spacing: 0.3px;
}
.pktax-theme-blue  .pktax-btn-calc { background: #1a5276; }
.pktax-theme-green .pktax-btn-calc { background: #1e8449; }
.pktax-theme-dark  .pktax-btn-calc { background: #16213e; }
.pktax-btn-calc:hover { opacity: 0.9; transform: translateY(-1px); }
.pktax-btn-calc:active { transform: translateY(0); }

/* ── Slab Table ── */
.pktax-slab-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.pktax-slab-table th {
    text-align: left;
    padding: 7px 8px;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.pktax-slab-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.pktax-slab-table tr.pktax-active-slab td {
    background: #e8f4f8;
    color: #1a5276;
    font-weight: 600;
}
.pktax-theme-green .pktax-slab-table tr.pktax-active-slab td { background: #d5f5e3; color: #1e8449; }
.pktax-theme-dark  .pktax-slab-table tr.pktax-active-slab td { background: #dde8f0; color: #16213e; }

.pktax-note {
    font-size: 11.5px;
    color: #6b7280;
    margin-top: 10px;
    padding: 8px 10px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #1a5276;
}
.pktax-theme-green .pktax-note { border-left-color: #1e8449; }
.pktax-theme-dark  .pktax-note { border-left-color: #16213e; }

/* ── Results ── */
.pktax-hidden { display: none !important; }

.pktax-results {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    animation: pktax-fade-in 0.3s ease;
}
@keyframes pktax-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pktax-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}
.pktax-results-label  { font-size: 13px; color: #6b7280; margin: 0 0 4px; }
.pktax-results-amount { font-size: 26px; font-weight: 700; margin: 0; color: #1a5276; }
.pktax-theme-green .pktax-results-amount { color: #1e8449; }
.pktax-theme-dark  .pktax-results-amount { color: #16213e; }

.pktax-bracket-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e8f4f8;
    color: #1a5276;
}
.pktax-theme-green .pktax-bracket-badge { background: #d5f5e3; color: #1e8449; }
.pktax-theme-dark  .pktax-bracket-badge { background: #dde8f0; color: #16213e; }

/* ── Metrics ── */
.pktax-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 1rem;
}
@media (max-width: 600px) {
    .pktax-metrics { grid-template-columns: 1fr 1fr; }
}
.pktax-metric {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: .75rem;
    text-align: center;
}
.pktax-m-label {
    display: block;
    font-size: 10.5px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.pktax-m-val {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Breakdown detail ── */
.pktax-breakdown-detail {
    font-size: 12.5px;
    color: #6b7280;
    padding: 10px 0 6px;
    border-top: 1px solid #f3f4f6;
}

/* ── Disclaimer ── */
.pktax-disclaimer {
    font-size: 11.5px;
    color: #9ca3af;
    margin: 8px 0 0;
    font-style: italic;
}
