/* Global Variables */
.lic-new-endowment-plan-714 {
    --primary-blue: #003399;
    --primary-gold: #FFD700;
    --text-dark: #222;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #ddd;
    --success-green: #28a745;
    --warning-orange: #ff9800;
    --spacing-unit: 8px;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.lic-new-endowment-plan-714 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-dark);
    line-height: 1.6;
    padding: calc(var(--spacing-unit) * 3) var(--spacing-unit);
    min-height: 100vh;
}

/* Calculator Container */
.lic-new-endowment-plan-714 {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border: 3px solid var(--primary-blue);
    border-radius: calc(var(--border-radius) * 2);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.calculator-header {
    background: transparent;
    color: var(--text-dark);
    padding: calc(var(--spacing-unit) * 4);
    text-align: center;
}

.calculator-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: calc(var(--spacing-unit) * 2);
    letter-spacing: 0.5px;
    color: var(--primary-blue);
}

.calculator-header h4 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.5;
}

/* Form Styles */
.calculator-form {
    padding: calc(var(--spacing-unit) * 4);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.form-group {
    display: flex;
    flex-direction: column;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group label {
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 1);
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
    padding: calc(var(--spacing-unit) * 1.5);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
}

.help-text {
    margin-top: calc(var(--spacing-unit) * 0.5);
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

/* Toggle Switch */
.rider-group {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: calc(var(--spacing-unit) * 2);
}

.rider-group label:first-child {
    margin-bottom: 0;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-blue);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(28px);
}

.rider-group .help-text {
    grid-column: 1 / -1;
}

/* Buttons */
.button-group {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
    margin-top: calc(var(--spacing-unit) * 4);
}

.btn {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052cc 100%);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0052cc 0%, var(--primary-blue) 100%);
}

.btn-secondary {
    background: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Results Section */
.results-section {
    padding: calc(var(--spacing-unit) * 4);
    background: var(--bg-light);
    animation: fadeIn 0.6s ease-in;
}

.results-section > div {
    background: var(--white);
    padding: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.results-section h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding-bottom: calc(var(--spacing-unit) * 2);
    border-bottom: 3px solid var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.greeting-message {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-blue);
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 500;
}

/* Premium Grid */
.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.premium-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 3);
    transition: var(--transition);
}

.premium-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.premium-card h4 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-align: center;
    padding-bottom: calc(var(--spacing-unit) * 1);
    border-bottom: 2px solid var(--primary-gold);
}

.premium-details p {
    display: flex;
    justify-content: space-between;
    padding: calc(var(--spacing-unit) * 1) 0;
    border-bottom: 1px solid var(--bg-light);
}

.premium-details p.total {
    font-size: 1.2rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-top: calc(var(--spacing-unit) * 1);
    border-bottom: none;
}

/* Tables */
.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.details-table th,
.details-table td {
    padding: calc(var(--spacing-unit) * 2);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.details-table th {
    background: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
}

.details-table tbody tr:hover {
    background: var(--bg-light);
}

.details-table .total-row {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #fff9e6 0%, #ffedd5 100%);
    border-left: 4px solid var(--primary-gold);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius);
    margin-top: calc(var(--spacing-unit) * 2);
}

.info-box.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffc107 30%);
    border-left-color: var(--warning-orange);
    font-weight: 600;
}

.info-box p {
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Yearwise Table */
.toggle-btn {
    background: var(--primary-blue);
    color: var(--white);
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.toggle-btn:hover {
    background: #0052cc;
}

.table-responsive {
    overflow-x: auto;
    margin-top: calc(var(--spacing-unit) * 2);
}

.yearwise-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.yearwise-table th,
.yearwise-table td {
    padding: calc(var(--spacing-unit) * 1.5);
    text-align: center;
    border: 1px solid var(--border-color);
}

.yearwise-table th {
    background: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.yearwise-table tbody tr:nth-child(even) {
    background: var(--bg-light);
}

.yearwise-table tbody tr:hover {
    background: #e3f2fd;
}

.yearwise-table tbody tr.highlight {
    background: linear-gradient(135deg, #fff9e6 0%, #ffedd5 100%);
    font-weight: 600;
}

/* Share Section */
.share-section {
    background: var(--white);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
}

.btn-whatsapp {
    background: #25D366;
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-facebook {
    background: #1877F2;
    color: var(--white);
}

.btn-facebook:hover {
    background: #145dbf;
}

.btn-download {
    background: #dc3545;
    color: var(--white);
}

.btn-download:hover {
    background: #c82333;
}

.btn-copy {
    background: #6c757d;
    color: var(--white);
}

.btn-copy:hover {
    background: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: var(--spacing-unit);
    }

    .calculator-header h2 {
        font-size: 1.5rem;
    }

    .calculator-header h4 {
        font-size: 1rem;
    }

    .calculator-form,
    .results-section,
    .results-section > div {
        padding: calc(var(--spacing-unit) * 2);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .premium-grid {
        grid-template-columns: 1fr;
    }

    .results-section h3 {
        font-size: 1.2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: calc(var(--spacing-unit) * 2);
    }

    .toggle-btn {
        width: 100%;
    }

    .share-buttons {
        flex-direction: column;
    }

    .details-table {
        font-size: 0.85rem;
    }

    .details-table th,
    .details-table td {
        padding: calc(var(--spacing-unit) * 1);
    }
}

@media (max-width: 480px) {
    .calculator-header h2 {
        font-size: 1.25rem;
    }

    .calculator-header h4 {
        font-size: 0.9rem;
    }

    .details-table {
        font-size: 0.75rem;
    }

    .yearwise-table {
        font-size: 0.75rem;
    }

    .yearwise-table th,
    .yearwise-table td {
        padding: calc(var(--spacing-unit) * 0.5);
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .calculator-form,
    .share-section,
    .toggle-btn {
        display: none;
    }

    .lic-new-endowment-plan-714 {
        border: none;
        box-shadow: none;
    }

    .results-section {
        background: white;
    }
}
