/* Core AstroLeaf KP Software Styling - Universal Theme */
html body,
html body .ale-main-homepage,
html body .astroleaf-calc-page {
    background-color: #FFFBF4 !important;
}

/* Universal Page Layout & Container Width Limit */
html body .checkout-wrapper {
    max-width: 840px !important;
    margin: 28px auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* Universal Hero Header */
html body .pkr-hero-banner {
    background: #F97316 !important;
    color: #FFFFFF !important;
    padding: 46px 20px !important;
    text-align: center !important;
    border-bottom: 3px solid #FDB861 !important;
}

html body .pkr-hero-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 2.1rem !important;
    font-weight: 800 !important;
    color: #FFBA5F !important;
    margin-bottom: 10px !important;
}

html body .pkr-hero-sub {
    font-size: 1.05rem !important;
    color: #FFE2C2 !important;
    max-width: 760px !important;
    margin: 0 auto !important;
    line-height: 1.6 !important;
}

/* Form Card Container - Matching Janam Kundli */
html body .aap-form-card,
html body .kl-form-card,
html body .ud-form-card {
    background-color: #FFFDF9 !important;
    background: #FFFDF9 !important;
    border: 1px solid rgba(217, 119, 6, 0.22) !important;
    border-radius: 16px !important;
    padding: 32px !important;
    box-shadow: 0 8px 30px rgba(42, 21, 10, 0.05) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

html body .form-card-eyebrow {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #D97706 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    display: block !important;
    margin-bottom: 6px !important;
    background: transparent !important;
    border: none !important;
}

html body .wy-article-h2 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.45rem !important;
    color: #2A150A !important;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 0 !important;
    text-align: left !important;
}

html body .pkr-field-label {
    display: block !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    color: #36190B !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
}

/* Mode Switcher Pills */
html body .kp-mode-pill input[type="radio"],
.kp-mode-pill input[type="radio"] {
    display: none !important;
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

html body .kp-mode-pill,
.kp-mode-pill {
    cursor: pointer !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    padding: 8px 18px !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #FFFFFF !important;
    color: #475569 !important;
    border-radius: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    line-height: 1.4 !important;
}

html body .kp-mode-pill:hover,
.kp-mode-pill:hover {
    border-color: #D97706 !important;
    background: #FFFDF9 !important;
    color: #C2410C !important;
}

html body .kp-mode-pill.active,
.kp-mode-pill.active {
    border-color: #D97706 !important;
    background: #FFF7ED !important;
    color: #C2410C !important;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.18) !important;
}

.kp-mode-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #CBD5E1;
    display: inline-block;
    transition: all 0.2s ease;
}

.kp-mode-pill.active .kp-mode-pill-dot {
    background: #D97706;
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}

html body .kp-random-seed-btn,
.kp-random-seed-btn {
    background: #FFF7ED !important;
    border: 1.5px solid rgba(217, 119, 6, 0.4) !important;
    color: #C2410C !important;
    padding: 8px 18px !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border-radius: 24px !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
    height: auto !important;
    min-height: unset !important;
    line-height: 1.4 !important;
}

html body .kp-random-seed-btn:hover,
.kp-random-seed-btn:hover {
    background: #FFEDD5 !important;
    border-color: #D97706 !important;
    transform: translateY(-1px) !important;
}

/* Bulletproof Input Wrapper & Icon Placement */
html body .cd-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
}

/* Form Input & Select Controls - Matching Janam Kundli */
html body .cd-input-wrapper input,
html body .cd-input-wrapper select,
html body .cd-input-wrapper .kp-input,
html body .cd-input-wrapper .kp-select,
html body input.aap-input,
html body input.cd-input,
html body input.kl-input,
html body input.ud-input,
html body input.kp-input,
html body select.aap-input,
html body select.aap-select,
html body select.cd-input,
html body select.kl-select,
html body select.ud-select,
html body select.kp-select,
html body select.kp-input,
html body input[type="text"],
html body input[type="number"],
html body input[type="date"],
html body input[type="time"] {
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    border: 1.5px solid #CBD5E1 !important;
    border-radius: 8px !important;
    background-color: #FFFFFF !important;
    background: #FFFFFF !important;
    color: #1E293B !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
    outline: none !important;
    line-height: 46px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

html body input::placeholder {
    color: #94A3B8 !important;
    opacity: 0.9 !important;
    font-weight: 500 !important;
}

html body select.aap-input,
html body select.aap-select,
html body select.cd-input,
html body select.kl-select,
html body select.ud-select,
html body select.kp-select,
html body select.kp-input {
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23D97706' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px 14px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-align: left !important;
    text-align-last: left !important;
    cursor: pointer !important;
}

html body select option {
    background-color: #FFFFFF !important;
    color: #1E293B !important;
    font-weight: 600 !important;
}

/* Focus states */
html body input:focus,
html body select:focus,
html body .cd-input-wrapper input:focus,
html body .cd-input-wrapper select:focus,
html body .kp-input:focus,
html body .kp-select:focus {
    border-color: #D97706 !important;
    background-color: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16) !important;
    outline: none !important;
}

/* WebKit Date & Time Input Baseline Centering */
html body input[type="date"]::-webkit-date-and-time-value,
html body input[type="time"]::-webkit-date-and-time-value {
    line-height: 44px !important;
    text-align: left !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

html body #clear-pob,
#clear-pob {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #D97706 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    z-index: 10 !important;
    box-shadow: none !important;
    transition: color 0.15s ease, transform 0.15s ease !important;
}

html body #clear-pob:hover,
#clear-pob:hover {
    color: #DC2626 !important;
    transform: translateY(-50%) scale(1.15) !important;
}

/* Submit Action Button */
html body .pay-now-hero-btn,
html body .kl-btn-submit,
html body .ud-btn-submit {
    display: inline-flex !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 50px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    border-radius: 10px !important;
    background: #F97316 !important;
    color: #FFFFFF !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.02rem !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

html body .pay-now-hero-btn:hover,
html body .kl-btn-submit:hover,
html body .ud-btn-submit:hover {
    background: #EA580C !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4) !important;
    color: #FFFFFF !important;
}

/* Result Workspace Card Containers */
html body .kp-card {
    background: #FFF7E8 !important;
    border: 1.5px solid #65250C !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: rgba(9, 30, 66, 0.08) 0px 4px 12px -2px !important;
    margin-bottom: 24px !important;
}

/* Tab Navigation Pills */
html body .kp-tabs-header {
    display: flex !important;
    gap: 8px !important;
    border-bottom: 2px solid #65250C !important;
    padding-bottom: 12px !important;
    margin-bottom: 24px !important;
    overflow-x: auto !important;
    scrollbar-width: thin !important;
}

html body .kp-tab-btn {
    border: 1.5px solid #65250C !important;
    background: #FFF7E8 !important;
    padding: 10px 18px !important;
    color: #65250C !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    cursor: pointer !important;
    border-radius: 20px !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

html body .kp-tab-btn:hover {
    background: #FFE2C2 !important;
}

html body .kp-tab-btn.active {
    background: #65250C !important;
    color: #FFFFFF !important;
    border-color: #65250C !important;
    box-shadow: 0 2px 8px rgba(101, 37, 12, 0.25) !important;
}

/* Tables */
html body .kp-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.88rem !important;
}

html body .kp-table th {
    background: #FFEFD6 !important;
    color: #65250C !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.04em !important;
    padding: 12px 14px !important;
    border-bottom: 1.5px solid #65250C !important;
    text-align: left !important;
}

html body .kp-table td {
    padding: 12px 14px !important;
    border-bottom: 1px solid #EAE3D9 !important;
    color: #4A2810 !important;
}

html body .kp-table tr:hover td {
    background-color: #FFE2C2 !important;
}

/* Responsive Grid Systems */
@media (max-width: 640px) {
    html body .kp-form-grid-2 {
        grid-template-columns: 1fr !important;
    }
    html body .aap-form-card {
        padding: 20px 16px !important;
    }
}

/* Educational Guide Content & FAQ Accordion System */
html body .kp-guide-container {
    max-width: 840px !important;
    margin: 32px auto !important;
    padding: 0 20px !important;
    color: #4A2810 !important;
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif !important;
}

html body .kp-guide-container h2 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: #65250C !important;
    margin-bottom: 20px !important;
    border-bottom: 2px solid #65250C !important;
    padding-bottom: 8px !important;
}

html body .kp-guide-container h3 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #65250C !important;
    margin-top: 28px !important;
    margin-bottom: 12px !important;
}

html body .kp-guide-container p {
    font-size: 0.96rem !important;
    line-height: 1.8 !important;
    margin-bottom: 16px !important;
    color: #4A2810 !important;
}

html body .kp-guide-container ul,
html body .kp-guide-container ol {
    margin-bottom: 20px !important;
    padding-left: 24px !important;
}

html body .kp-guide-container li {
    font-size: 0.95rem !important;
    line-height: 1.75 !important;
    margin-bottom: 10px !important;
    color: #4A2810 !important;
}

/* FAQ Accordion Styling */
html body .pkr-faq-section {
    max-width: 840px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
}

html body .pkr-section-header {
    text-align: center !important;
    margin-bottom: 28px !important;
}

html body .pkr-pill-label {
    background: #FFE2C2 !important;
    border: 1px solid #65250C !important;
    color: #65250C !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    display: inline-block !important;
    margin-bottom: 8px !important;
}

html body .pkr-section-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: #65250C !important;
    margin: 0 0 6px 0 !important;
}

html body .pkr-faq-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

html body .pkr-faq-item {
    background: #FFEFD6 !important;
    border: 1.5px solid #65250C !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

html body .pkr-faq-question {
    padding: 16px 22px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    color: #65250C !important;
    cursor: pointer !important;
    user-select: none !important;
}

html body .pkr-faq-answer {
    display: none;
    padding: 0 22px 18px 22px !important;
    font-size: 0.94rem !important;
    line-height: 1.7 !important;
    color: #4A2810 !important;
    border-top: 1px solid #EAE3D9 !important;
}

html body .pkr-faq-item.active {
    background: #FFF7E8 !important;
    box-shadow: rgba(9, 30, 66, 0.08) 0px 4px 12px -2px !important;
}

html body .pkr-faq-item.active .pkr-faq-answer {
    display: block !important;
}

html body .pkr-faq-item.active .pkr-faq-question i {
    transform: rotate(180deg) !important;
}

/* Universal Responsive Grid */
.kl-form-grid, .ud-form-grid, #kp-horary-form {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .kl-form-grid, .ud-form-grid, #kp-horary-form {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .kl-form-card, .ud-form-card, .aap-form-card {
        padding: 20px 16px !important;
        border-radius: 12px !important;
    }
    .kp-mode-switcher-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .kp-mode-switcher-row > div {
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .kp-mode-pill {
        flex: 1 !important;
        font-size: 0.80rem !important;
        padding: 8px 8px !important;
        text-align: center !important;
        justify-content: center !important;
    }
    .kp-random-seed-btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .checkout-wrapper {
        padding: 0 14px !important;
        margin: 16px auto !important;
    }
    .pkr-hero-banner {
        padding: 36px 16px 28px 16px !important;
    }
    .pkr-hero-title {
        font-size: 1.6rem !important;
    }
}
