/* Life Insurance Premium Calculator Styles */

.calculator-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.calculator-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(44, 90, 160, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.calculator-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.calculator-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.calculator-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.calculator-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.calculator-form {
    padding: 40px;
    border-bottom: 1px solid #eee;
}

.calculator-form h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Form Section Styles */
.form-section {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header i {
    font-size: 1.2rem;
    color: #2c5aa0;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c5aa0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-section .form-grid {
    margin-bottom: 0;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.currency-display {
    position: absolute;
    right: 16px;
    top: 38px;
    color: #2c5aa0;
    font-weight: 600;
    font-size: 14px;
    pointer-events: none;
}

.range-slider {
    margin-top: 10px;
}

.range-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2c5aa0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(44, 90, 160, 0.3);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2c5aa0;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(44, 90, 160, 0.3);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.calculator-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 150px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.btn-success {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-outline {
    background: transparent;
    color: #2c5aa0;
    border: 2px solid #2c5aa0;
}

.btn-outline:hover {
    background: #2c5aa0;
    color: white;
}

.calculator-results {
    padding: 40px;
    background: #f8f9fa;
}

.results-summary h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 30px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.yearly-benefit {
    position: relative;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d4 100%);
    border: 3px solid #f9ca24;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(249, 202, 36, 0.4), 0 0 20px rgba(249, 202, 36, 0.6), 0 0 40px rgba(249, 202, 36, 0.3);
}

.yearly-benefit::before {
    content: '⭐ YEARLY BONUS! ⭐';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f9ca24 0%, #f0932b 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(249, 202, 36, 0.6);
}

.yearly-benefit::after {
    content: '�';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    padding: 6px 10px;
    border-radius: 50%;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
    z-index: 10;
}

@keyframes card-excitement {

    0%,
    100% {
        transform: scale(1.05) rotate(0deg);
        box-shadow: 0 8px 25px rgba(249, 202, 36, 0.4), 0 0 0 4px rgba(249, 202, 36, 0.1);
    }

    50% {
        transform: scale(1.08) rotate(1deg);
        box-shadow: 0 12px 35px rgba(249, 202, 36, 0.6), 0 0 0 6px rgba(249, 202, 36, 0.2);
    }
}

@keyframes badge-wiggle {

    0%,
    100% {
        transform: translateX(-50%) rotate(0deg);
    }

    25% {
        transform: translateX(-50%) rotate(-2deg);
    }

    75% {
        transform: translateX(-50%) rotate(2deg);
    }
}

@keyframes yahh-celebration {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    25% {
        transform: scale(1.1) rotate(-5deg);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }

    75% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.9;
    }
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.total-investment .card-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.maturity-benefit .card-icon {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.total-returns .card-icon {
    background: linear-gradient(135deg, #45b7d1 0%, #96c93d 100%);
}

.yearly-benefit .card-icon {
    background: linear-gradient(135deg, #f9ca24 0%, #f0932b 100%);
    box-shadow: 0 0 20px rgba(249, 202, 36, 0.8);
    position: relative;
}

.yearly-benefit .card-icon::before {
    content: '🎉';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 16px;
}

@keyframes pulse-excitement {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes glow-yearly {
    0% {
        box-shadow: 0 0 20px rgba(249, 202, 36, 0.6);
    }

    100% {
        box-shadow: 0 0 30px rgba(249, 202, 36, 0.9), 0 0 40px rgba(240, 147, 43, 0.6);
    }
}

@keyframes bounce-celebration {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(-10deg);
    }

    50% {
        transform: translateY(-8px) rotate(0deg);
    }

    75% {
        transform: translateY(-3px) rotate(10deg);
    }
}

@keyframes ring-pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
    position: relative;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.yearly-benefit .card-label {
    font-weight: 700;
    color: #f0932b;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.yearly-benefit .card-value {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f9ca24 0%, #f0932b 50%, #e74c3c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    filter: drop-shadow(2px 2px 4px rgba(249, 202, 36, 0.3));
}

.yearly-benefit .card-value::after {
    content: '💰';
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes text-shine {

    0%,
    100% {
        color: #f0932b;
    }

    50% {
        color: #f9ca24;
        text-shadow: 0 0 8px rgba(249, 202, 36, 0.6);
    }
}

@keyframes value-celebration {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

.card-content {
    flex: 1;
}

.card-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.card-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-wrapper {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 350px;
    position: relative;
}

.chart-wrapper h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.chart-wrapper canvas {
    max-height: 280px !important;
    width: 100% !important;
    height: 280px !important;
}

.detailed-breakdown {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.detailed-breakdown h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 20px;
}

.breakdown-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.breakdown-row.highlight {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 8px;
    border-bottom: none;
    margin-top: 10px;
}

.breakdown-label {
    font-weight: 500;
    color: #666;
}

.breakdown-value {
    font-weight: 600;
    color: #333;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.calculator-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
    position: relative;
    z-index: 2;
}

.feature-item {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: white;
}

.feature-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.feature-content p {
    color: #666;
    line-height: 1.5;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-header h2 {
        font-size: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .section-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .section-header h4 {
        font-size: 1.1rem;
    }

    .calculator-form,
    .calculator-results {
        padding: 25px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        height: 300px;
    }

    .chart-wrapper canvas {
        max-height: 230px !important;
        height: 230px !important;
    }

    .calculator-actions,
    .results-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .calculator-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calculator-section {
        padding: 50px 0;
    }

    .calculator-header {
        margin-bottom: 40px;
    }

    .calculator-header h2 {
        font-size: 1.8rem;
    }

    .calculator-form,
    .calculator-results {
        padding: 20px;
    }

    .form-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .section-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .section-header h4 {
        font-size: 1rem;
    }

    .chart-wrapper {
        height: 280px;
        padding: 20px;
    }

    .chart-wrapper canvas {
        max-height: 210px !important;
        height: 210px !important;
    }

    .charts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Animation for loading states */
.calculating {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.calculating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2c5aa0;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Print styles */
@media print {
    .calculator-section {
        background: white;
        padding: 20px 0;
    }

    .calculator-actions,
    .results-actions {
        display: none;
    }

    .calculator-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Enhanced Button Styles */
.btn-outline {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c5aa0;
    border: 2px solid #2c5aa0;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.3);
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 90, 160, 0.1), transparent);
    transition: left 0.5s;
}

.btn-outline:hover::before {
    left: 100%;
}

/* PDF Generation Styles */
.pdf-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pdf-preview.active {
    opacity: 1;
    visibility: visible;
}

.pdf-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pdf-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2c5aa0;
}

.pdf-logo {
    font-size: 2rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.pdf-tagline {
    color: #666;
    font-size: 1rem;
    margin-bottom: 15px;
}

.pdf-contact {
    color: #2c5aa0;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pdf-contact i {
    margin-right: 5px;
}

.pdf-body {
    line-height: 1.6;
}

.pdf-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #2c5aa0;
}

.pdf-section h3 {
    color: #2c5aa0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.pdf-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e8f0;
}

.pdf-label {
    font-weight: 600;
    color: #333;
}

.pdf-value {
    color: #2c5aa0;
    font-weight: 600;
}

.pdf-highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
    font-size: 1.1rem;
}

.pdf-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.pdf-disclaimer {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
    border-left: 3px solid #ffc107;
}

.pdf-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pdf-close:hover {
    background: #c82333;
    transform: scale(1.1);
}

.pdf-download-btn {
    margin-top: 20px;
    text-align: center;
}

.pdf-download-btn .btn {
    margin: 0 10px;
}

/* Loading animation for PDF generation */
.pdf-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: none;
}

.pdf-loading.active {
    display: block;
}

.pdf-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.pdf-loading p {
    color: #333;
    font-weight: 600;
    margin: 0;
}