/* ==========================================================================
   PAYROLL CALCULATOR PAGE STYLES - payroll.sg
   Scoped for /payroll-calculator (Dark Theme)
   ========================================================================== */

.pg-calc-wrapper {
    background-color: #080c14;
    color: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Hero Section */
.pg-calc-hero {
    position: relative;
    padding-top: calc(var(--header-height, 72px) + 24px);
    padding-bottom: 0;
    min-height: 340px;
    overflow: hidden;
    background-color: #080c14;
}

.pg-calc-hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
    min-height: 300px;
}

.pg-calc-hero-content {
    position: relative;
    z-index: 2;
    flex: 1 1 50%;
    max-width: 560px;
    padding-bottom: 28px;
    align-self: center;
}

.pg-calc-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.pg-calc-hero-sub {
    font-size: 17px;
    color: #94a3b8;
    line-height: 1.55;
    margin-bottom: 0;
}

.pg-calc-hero-graphic,
.pg-calc-hero-image-box,
.pg-hero-graphic,
.pg-hero-image-box {
    position: relative;
    flex: 1 1 50%;
    max-width: 640px;
    height: 300px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    z-index: 1;
    pointer-events: auto;
}

.pg-calc-hero-img,
.pg-hero-img {
    width: 100%;
    height: 100%;
    max-height: 300px;
    object-fit: cover;
    object-position: right bottom;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: block;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 18%, rgba(0,0,0,0.85) 45%, #000 70%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 18%, rgba(0,0,0,0.85) 45%, #000 70%);
}

/* Calculator Main Section */
.pg-calc-container {
    max-width: 100%;
    margin: 30px auto 60px auto;
    position: relative;
    z-index: 3;
}

.pg-calc-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

/* Form Panel */
.pg-calc-card {
    background: #0d131f;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 32px;
}

.pg-calc-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #1e293b;
}

.pg-calc-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 223, 137, 0.1);
    color: #00DF89;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.pg-calc-card-title {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.pg-calc-card-tag {
    font-size: 16px;
    color: #94a3b8;
    margin-top: 2px;
}

.pg-calc-form-group {
    margin-bottom: 22px;
}

.pg-calc-label {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.pg-calc-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pg-calc-input-prefix {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 16px;
    pointer-events: none;
}

.pg-calc-input {
    width: 100%;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 14px 12px 48px;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.pg-calc-input:focus {
    border-color: #00DF89;
}

.pg-calc-slider {
    width: 100%;
    margin-top: 10px;
    accent-color: #00DF89;
    cursor: pointer;
}

.pg-calc-select {
    width: 100%;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.pg-calc-select:focus {
    border-color: #00DF89;
}

.pg-calc-note {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #1e293b;
    border-left: 3px solid #00DF89;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: 18px;
}

/* Results Panel */
.pg-calc-result-panel {
    background: #0d131f;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pg-calc-result-header {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e293b;
}

.pg-calc-takehome-box {
    background: rgba(0, 223, 137, 0.05);
    border: 1px solid rgba(0, 223, 137, 0.25);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 22px;
    text-align: center;
}

.pg-calc-takehome-label {
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
}

.pg-calc-takehome-val {
    font-size: 38px;
    font-weight: 800;
    color: #00DF89;
    line-height: 1.1;
    margin-bottom: 4px;
}

.pg-calc-takehome-sub {
    font-size: 16px;
    color: #64748b;
}

.pg-calc-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.pg-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #111827;
    border-radius: 8px;
}

.pg-calc-row-label {
    font-size: 16px;
    color: #cbd5e1;
}

.pg-calc-row-val {
    font-size: 16px;
    font-weight: 700;
}

.pg-calc-val-deduct {
    color: #f87171;
}

.pg-calc-val-employer {
    color: #38bdf8;
}

.pg-calc-val-total {
    color: #ffffff;
}

.pg-calc-total-box {
    border-top: 1px solid #1e293b;
    padding-top: 16px;
    margin-bottom: 24px;
}

.pg-calc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.pg-calc-total-cost {
    font-size: 20px;
    color: #00DF89;
}

.pg-calc-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #00DF89;
    color: #080c14;
    font-weight: 700;
    font-size: 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.pg-calc-cta-btn:hover {
    background: #00fca0;
    box-shadow: 0 4px 18px rgba(0, 223, 137, 0.4);
    color: #080c14;
}

/* SEO Content Sections */
.pg-calc-seo-section {
    max-width: 920px;
    margin: 0 auto 50px auto;
}

.pg-calc-seo-heading {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
}

.pg-calc-seo-text {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 20px;
}

.pg-calc-seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0 36px 0;
}

.pg-calc-seo-card {
    background: #0d131f;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 24px;
}

.pg-calc-seo-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.pg-calc-seo-card p {
    font-size: 16px;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

/* Related Guides */
.pg-calc-guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.pg-calc-guide-card {
    background: #0d131f;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
}

.pg-calc-guide-card:hover {
    background: #111827;
    border-color: #00DF89;
    transform: translateY(-2px);
}

.pg-calc-guide-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.pg-calc-guide-card p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .pg-calc-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
        gap: 20px;
    }
    .pg-calc-hero-graphic,
    .pg-calc-hero-image-box,
    .pg-hero-graphic,
    .pg-hero-image-box {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: 240px;
        justify-content: center;
    }
    .pg-calc-hero-img,
    .pg-hero-img {
        max-height: 240px;
        object-position: center;
        -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    }
    .pg-calc-grid {
        grid-template-columns: 1fr;
    }
    .pg-calc-guides-grid {
        grid-template-columns: 1fr;
    }
    .pg-calc-seo-grid {
        grid-template-columns: 1fr;
    }
    .pg-calc-hero-title {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .pg-calc-card,
    .pg-calc-result-panel {
        padding: 22px 18px;
    }

    .pg-calc-row {
        gap: 12px;
    }

    .pg-calc-row-label {
        min-width: 0;
    }

    .pg-calc-row-val {
        flex-shrink: 0;
        text-align: right;
        white-space: nowrap;
    }
}
