/* ==========================================
   UK SALARY CALCULATOR - CalcTechLab
   ========================================== */

/* ---- Hero Section ---- */
.salary-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 50%, #1a1a2e 100%);
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.salary-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.salary-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.tax-year-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.hero-features span {
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-features i {
    color: #10b981;
    margin-right: 0.3rem;
}

/* ---- Tab Navigation ---- */
.salary-tabs {
    background: var(--bs-body-bg);
    border-radius: 12px;
    padding: 0.4rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-wrap: nowrap;
    overflow-x: auto;
}

[data-bs-theme="dark"] .salary-tabs {
    background: #1e293b;
    border-color: #334155;
}

.salary-tabs .nav-link {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
    transition: all 0.2s;
    white-space: nowrap;
}

.salary-tabs .nav-link:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.salary-tabs .nav-link.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.salary-tabs .nav-link i {
    margin-right: 0.4rem;
}

/* ---- Cards ---- */
.calc-card {
    background: var(--bs-body-bg);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

[data-bs-theme="dark"] .calc-card {
    background: #1e293b;
    border-color: #334155;
}

.calc-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header-custom {
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .card-header-custom {
    border-bottom-color: #334155;
}

.card-header-custom h2,
.card-header-custom h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

[data-bs-theme="dark"] .card-header-custom h2,
[data-bs-theme="dark"] .card-header-custom h3 {
    color: #f1f5f9;
}

.card-header-custom i {
    color: #3b82f6;
    margin-right: 0.5rem;
}

.card-body-custom {
    padding: 1.5rem;
}

/* ---- Form Elements ---- */
.form-group-custom {
    margin-bottom: 1.25rem;
}

.form-group-custom label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

[data-bs-theme="dark"] .form-group-custom label {
    color: #94a3b8;
}

.form-group-custom label i {
    color: #3b82f6;
    margin-right: 0.3rem;
}

.custom-select,
.salary-input {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

[data-bs-theme="dark"] .custom-select,
[data-bs-theme="dark"] .salary-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

.custom-select:focus,
.salary-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.salary-input-group .input-group-text {
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-right: none;
    font-weight: 700;
    color: #3b82f6;
    border-radius: 10px 0 0 10px;
}

[data-bs-theme="dark"] .salary-input-group .input-group-text {
    background: #0f172a;
    border-color: #334155;
    color: #60a5fa;
}

.salary-input-group .salary-input {
    border-radius: 0 10px 10px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

/* ---- Region Toggle ---- */
.region-toggle {
    display: flex;
    gap: 0.5rem;
}

.region-btn,
.region-btn-detailed,
.region-btn-contractor {
    flex: 1;
    padding: 0.6rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: var(--bs-body-bg);
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

[data-bs-theme="dark"] .region-btn,
[data-bs-theme="dark"] .region-btn-detailed,
[data-bs-theme="dark"] .region-btn-contractor {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

.region-btn:hover,
.region-btn-detailed:hover,
.region-btn-contractor:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.region-btn.active,
.region-btn-detailed.active,
.region-btn-contractor.active {
    background: rgba(59, 130, 246, 0.08);
    border-color: #3b82f6;
    color: #3b82f6;
}

.region-flag {
    margin-right: 0.3rem;
}

/* ---- Input Type Grid ---- */
.input-type-grid {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.input-type-btn {
    flex: 1;
    min-width: 60px;
    padding: 0.5rem 0.3rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: var(--bs-body-bg);
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

[data-bs-theme="dark"] .input-type-btn {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

.input-type-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.input-type-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
}

/* ---- Quick Amount Buttons ---- */
.quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.quick-btn,
.quick-btn-contractor {
    padding: 0.3rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: var(--bs-body-bg);
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

[data-bs-theme="dark"] .quick-btn,
[data-bs-theme="dark"] .quick-btn-contractor {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

.quick-btn:hover,
.quick-btn-contractor:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.quick-btn.active,
.quick-btn-contractor.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* ---- Calculate Button ---- */
.btn-calculate {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-calculate:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-calculate i {
    margin-right: 0.5rem;
}

/* ---- Take Home Pay Card ---- */
.takehome-card {
    background: linear-gradient(135deg, #059669, #047857);
    border: none;
    color: white;
}

.takehome-header {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
}

.takehome-label {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.takehome-amount {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0.3rem 0;
}

.takehome-period {
    font-size: 0.85rem;
    opacity: 0.8;
}

.takehome-periods {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.period-item {
    flex: 1;
    text-align: center;
    padding: 1rem 0.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.period-item:last-child {
    border-right: none;
}

.period-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.period-label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Deductions ---- */
.deduction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .deduction-row {
    border-bottom-color: #334155;
}

.deduction-row:last-child {
    border-bottom: none;
}

.deduction-label {
    font-size: 0.9rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-bs-theme="dark"] .deduction-label {
    color: #cbd5e1;
}

.deduction-amount {
    font-size: 0.9rem;
    font-weight: 600;
}

.deduction-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.tax-dot { background: #ef4444; }
.ni-dot { background: #f59e0b; }
.sl-dot { background: #8b5cf6; }
.pension-dot { background: #06b6d4; }

.gross-row {
    background: #f8fafc;
    margin: -0.7rem -1.5rem 0;
    padding: 0.7rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

[data-bs-theme="dark"] .gross-row {
    background: #0f172a;
}

.gross-row .deduction-label,
.gross-row .deduction-amount {
    font-weight: 700;
    color: #1e293b;
}

[data-bs-theme="dark"] .gross-row .deduction-label,
[data-bs-theme="dark"] .gross-row .deduction-amount {
    color: #f1f5f9;
}

.total-row {
    border-top: 2px solid #fecaca;
    margin-top: 0.3rem;
    padding-top: 0.8rem;
}

.net-row {
    background: #f0fdf4;
    margin: 0.3rem -1.5rem -0.7rem;
    padding: 0.9rem 1.5rem;
    border-radius: 0 0 8px 8px;
}

[data-bs-theme="dark"] .net-row {
    background: rgba(5, 150, 105, 0.1);
}

/* ---- Rates Grid ---- */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.rate-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
}

[data-bs-theme="dark"] .rate-item {
    background: #0f172a;
}

.rate-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #3b82f6;
}

.rate-label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Tables ---- */
.salary-table {
    margin: 0;
    font-size: 0.85rem;
}

.salary-table thead th {
    background: #f1f5f9;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    padding: 0.7rem;
    border-bottom: 2px solid #e2e8f0;
}

[data-bs-theme="dark"] .salary-table thead th {
    background: #0f172a;
    color: #94a3b8;
    border-bottom-color: #334155;
}

.salary-table tbody td {
    padding: 0.6rem 0.7rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

[data-bs-theme="dark"] .salary-table tbody td {
    border-bottom-color: #1e293b;
}

/* ---- Charts ---- */
.chart-card {
    padding: 1.25rem;
    overflow: hidden;
}

.chart-card canvas {
    max-width: 100% !important;
    display: block;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
}

.chart-wrapper-lg {
    position: relative;
    width: 100%;
    height: 280px;
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

[data-bs-theme="dark"] .chart-title {
    color: #f1f5f9;
}

/* ---- Export Buttons ---- */
.export-section {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-export {
    flex: 1;
    min-width: 120px;
    padding: 0.7rem 1rem;
    border: 2px solid;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: transparent;
}

.btn-export i {
    margin-right: 0.4rem;
}

.btn-export-pdf {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-export-pdf:hover {
    background: #ef4444;
    color: white;
}

.btn-export-csv {
    border-color: #10b981;
    color: #10b981;
}

.btn-export-csv:hover {
    background: #10b981;
    color: white;
}

.btn-export-print {
    border-color: #6366f1;
    color: #6366f1;
}

.btn-export-print:hover {
    background: #6366f1;
    color: white;
}

/* ---- Placeholder ---- */
.placeholder-card {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    padding: 2rem;
}

.placeholder-icon {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

[data-bs-theme="dark"] .placeholder-icon {
    color: #475569;
}

.placeholder-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.placeholder-content p {
    font-size: 0.9rem;
    color: #94a3b8;
    max-width: 400px;
    margin: 0 auto;
}

/* ---- Compare Styles ---- */
.compare-salary-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .compare-salary-box {
    background: #0f172a;
    border-color: #334155;
}

.compare-label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.salary-a-label { color: #3b82f6; }
.salary-b-label { color: #10b981; }

.compare-diff-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.diff-icon {
    font-size: 2rem;
}

.diff-text {
    font-size: 1rem;
    color: #475569;
}

[data-bs-theme="dark"] .diff-text {
    color: #cbd5e1;
}

.diff-amount {
    font-size: 1.2rem;
    font-weight: 800;
    color: #059669;
}

/* ---- Cross Reference Card ---- */
.cross-ref-card {
    border-left: 4px solid #3b82f6;
}

.cross-ref-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    flex-wrap: wrap;
}

.cross-ref-icon {
    font-size: 2rem;
    color: #3b82f6;
    flex-shrink: 0;
}

.cross-ref-text {
    flex: 1;
    min-width: 200px;
}

.cross-ref-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.3rem;
}

[data-bs-theme="dark"] .cross-ref-text h4 {
    color: #f1f5f9;
}

.cross-ref-text p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.btn-cross-ref {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-cross-ref:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    transform: translateY(-1px);
}

/* ---- FAQ ---- */
.faq-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .faq-item {
    border-bottom-color: #334155;
}

.faq-item .accordion-button {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    background: transparent;
    padding: 1rem 0;
}

[data-bs-theme="dark"] .faq-item .accordion-button {
    color: #f1f5f9;
}

.faq-item .accordion-button:not(.collapsed) {
    color: #3b82f6;
    background: transparent;
    box-shadow: none;
}

.faq-item .accordion-body {
    padding: 0 0 1rem;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.7;
}

[data-bs-theme="dark"] .faq-item .accordion-body {
    color: #cbd5e1;
}

.faq-item .accordion-body a {
    color: #3b82f6;
    font-weight: 600;
}

/* ---- Related Tools ---- */
.related-tool-link {
    text-decoration: none;
}

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    text-align: center;
}

[data-bs-theme="dark"] .related-tool-card {
    background: #0f172a;
    border-color: #334155;
}

.related-tool-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.related-tool-card i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.related-tool-card span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

[data-bs-theme="dark"] .related-tool-card span {
    color: #cbd5e1;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .hero-title { font-size: 2rem; }
    .takehome-amount { font-size: 2.2rem; }
    .rates-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .salary-hero { padding: 2rem 0 1.5rem; }
    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-features { gap: 0.5rem; }
    .hero-features span { font-size: 0.75rem; }
    .takehome-amount { font-size: 1.8rem; }
    .period-value { font-size: 0.9rem; }
    .period-label { font-size: 0.6rem; }
    .salary-tabs .nav-link { padding: 0.5rem 0.8rem; font-size: 0.75rem; }
    .salary-tabs .nav-link i { display: none; }
    .rates-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .rate-value { font-size: 1.1rem; }
    .cross-ref-content { flex-direction: column; text-align: center; }
    .compare-diff-content { flex-direction: column; text-align: center; }
    .chart-wrapper { height: 200px; }
    .chart-wrapper-lg { height: 240px; }
}

@media (max-width: 575px) {
    .rates-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .rate-item { padding: 0.75rem 0.5rem; }
    .rate-value { font-size: 1.1rem; }
    .rate-label { font-size: 0.65rem; }
    .chart-wrapper { height: 180px; }
}

@media (max-width: 480px) {
    .input-type-grid { gap: 0.25rem; }
    .input-type-btn { min-width: 50px; font-size: 0.65rem; padding: 0.4rem 0.2rem; }
    .takehome-periods { flex-wrap: wrap; }
    .period-item { flex: 0 0 50%; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

/* ---- Print Styles ---- */
@media print {
    .salary-hero, .salary-tabs, .btn-calculate, .export-section,
    .placeholder-card, .cross-ref-card, .related-tools,
    .faq-item, .quick-amounts, .input-card { display: none !important; }
    .calc-card { box-shadow: none; border: 1px solid #ddd; }
    .takehome-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
