/*
 * जीवन बीमा प्रिमियम क्यालकुलेटरका लागि पुनः डिजाइन गरिएको CSS
 * यो कोडले फारमका फिल्डहरूबीचको दूरी कम गर्छ, ब्रान्ड रङ्गहरू (#16610E - हरियो, #F97A00 - सुन्तला) प्रयोग गर्छ,
 * र प्रत्येक चरणका लागि स्पष्ट निर्देशनात्मक बक्सहरू थप्छ।
 *
 * Redesigned CSS for the Life Insurance Premium Calculator.
 * It uses brand colors (#16610E - Green, #F97A00 - Orange) and adds clear instruction boxes for each step.
 */

/* ------------------- Color Palette & Base Styling ------------------- */
:root {
    --primary-color: #16610E; /* Brand Green (Professional/Primary) */
    --secondary-color: #F97A00; /* Brand Orange (Highlight/Action) */
    --background-color: #f3f4f6; /* Light gray background */
    --card-background: #ffffff; /* Clean white card background */
    --text-color: #333333;
    --label-color: var(--secondary-color); /* Set to the button/secondary color (Orange) as requested */
    --border-color: #e0e0e0;
    --success-light: #E8F5E9; /* Very light green for result */
    --warning-light: #FFF8E1; /* Light yellow/orange for warnings */
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* ------------------- Form Container and Layout ------------------- */

.form-container {
    background-color: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1); /* Modern, deeper shadow */
    padding: 40px;
    margin: 50px auto;
    max-width: 900px;
    border-top: 6px solid var(--secondary-color); /* Highlight strip */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Reduced gap between main sections */
}

@media (max-width: 767.98px) {
    .form-container {
        padding: 25px;
        margin: 20px auto;
    }
}

/* ------------------- Headings and Instructions ------------------- */

h2.text-center {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.form-container h3,
.form-container h4 {
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1.35rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* New: Instruction Box for each step */
.step-instruction {
    background-color: var(--warning-light);
    border-left: 5px solid var(--secondary-color);
    padding: 15px;
    margin-bottom: 25px;
    color: var(--text-color);
    border-radius: 8px;
    font-size: 1rem;
    font-style: italic;
}

/* ------------------- Form Fields and Inputs ------------------- */

.step {
    display: none;
    padding: 10px 0;
}

.step.active {
    display: block;
}

/* --- UPDATED LABEL STYLE (Bold and Orange) --- */
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 800; /* Increased bold weight */
    color: var(--label-color) !important; /* Using !important to force the secondary color (Orange) */
    font-size: 1.05rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    box-sizing: border-box;
    background-color: #F8F9FA;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(249, 122, 0, 0.3);
    background-color: #FFFFFF;
}

/* ------------------- Checkbox/Radio Styling ------------------- */

.form-check {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-check-label {
    cursor: pointer;
    color: var(--text-color);
    font-weight: 500;
}

/* Base custom input style */
.form-check-input[type="radio"],
.form-check-input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

/* Checked state uses Secondary Color (Orange) */
.form-check-input[type="radio"]:checked,
.form-check-input[type="checkbox"]:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Radio inner dot */
.form-check-input[type="radio"]:checked::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Checkbox checkmark (using unicode checkmark) */
.form-check-input[type="checkbox"] {
    border-radius: 4px;
}

.form-check-input[type="checkbox"]:checked::before {
    content: '\2714'; /* Unicode checkmark */
    display: block;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

/* ------------------- Buttons ------------------- */

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--secondary-color); /* Orange for primary action */
    color: white;
}

.btn-primary:hover {
    background-color: #e07300;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: #E0E0E0;
    color: #112222;
}

.btn-secondary:hover {
    background-color: #CCCCCC;
}

.btn-secondary.cursor-not-allowed {
    cursor: not-allowed;
    opacity: 0.5;
}

/* ------------------- Rider Section ------------------- */

.rider-option {
    background-color: #F8F9FA; /* Subtle light background */
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rider-option:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(249, 122, 0, 0.2);
}

/* Style for the selected rider option */
.rider-option.selected {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.rider-option.selected label,
.rider-option.selected .tooltip-icon {
    color: white !important;
}

.rider-option .form-check-label {
    font-weight: 600;
    color: var(--text-color);
}

.tooltip-icon {
    color: var(--secondary-color);
    font-weight: bold;
    cursor: help;
    transition: color 0.3s ease;
}

/* ------------------- Result and Warning ------------------- */

.age-warning {
    display: none;
    background-color: var(--warning-light);
    border-left: 5px solid var(--secondary-color);
    padding: 15px;
    margin-bottom: 20px;
    color: var(--text-color);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.calculation-result {
    background-color: var(--success-light); /* Light green */
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.calculation-result h4 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 10px;
    background-color: transparent; /* Override green background for result h4 */
    box-shadow: none;
}

.result-value {
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--secondary-color);
    line-height: 1.1;
    display: block;
    margin-bottom: 10px;
}

/* ------------------- Loading Overlay ------------------- */

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.spinner-border {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border: 0.35em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
    color: var(--secondary-color);
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* ------------------- CTA Section ------------------- */

.cta-whatsapp-section {
    background-color: var(--primary-color);
    color: white;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cta-whatsapp-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: white;
    border-bottom: none;
    padding-bottom: 0;
}

.cta-whatsapp-section h2 span {
    color: var(--secondary-color);
}

.cta-whatsapp-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* CTA button inside the section */
.cta-whatsapp-section .btn-primary {
    background-color: white;
    color: var(--primary-color); /* Green text on white button */
    padding: 15px 30px;
    font-size: 1.1rem;
}

.cta-whatsapp-section .btn-primary:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
    transform: translateY(-2px);
}
