/* ===== Insurance Premium Calculator Styles ===== */

* {
    box-sizing: border-box;
}

.insurance-calculator-container {
    max-width: 650px;
    margin: 40px auto;
    font-family: 'Sarabun', sans-serif;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ===== Header ===== */
.calculator-header {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    padding: 35px 30px;
    text-align: center;
    color: white;
}

.calculator-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    font-weight: 300;
}

/* ===== Form ===== */
.insurance-form {
    padding: 35px 30px;
    background: #f8fafc;
}

.form-group {
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.form-group.highlight {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #3B82F6;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.form-group label .icon {
    margin-right: 8px;
    font-size: 18px;
}

.insurance-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-family: 'Sarabun', sans-serif;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

.insurance-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.help-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}

/* ===== Buttons ===== */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-calculate,
.btn-reset {
    flex: 1;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 600;
    font-family: 'Sarabun', sans-serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-calculate {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(30, 64, 175, 0.4);
}

.btn-calculate:active {
    transform: translateY(-1px);
}

.btn-reset {
    background: #f1f5f9;
    color: #475569;
}

.btn-reset:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 20px;
}

/* ===== Result Section ===== */
.result-section {
    background: white;
    border-top: 3px solid #e2e8f0;
    animation: slideDown 0.4s ease;
}

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

.result-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 20px 30px;
    text-align: center;
}

.result-header h3 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.result-content {
    padding: 30px;
}

.insurance-type-display {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 2px solid #10b981;
}

.type-label {
    font-size: 14px;
    color: #059669;
    font-weight: 600;
    margin-right: 10px;
}

.type-value {
    font-size: 18px;
    color: #047857;
    font-weight: 700;
}

/* ===== Premium Display ===== */
.premium-display {
    text-align: center;
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-radius: 15px;
    border: 3px solid #3B82F6;
}

.premium-label {
    font-size: 16px;
    color: #1e40af;
    font-weight: 600;
    margin-bottom: 15px;
}

.premium-amount {
    font-size: 48px;
    font-weight: 700;
    color: #1E40AF;
    line-height: 1;
}

.currency {
    font-size: 20px;
    color: #3B82F6;
    font-weight: 600;
    margin-left: 8px;
}

/* ===== Coverage Details ===== */
.coverage-details {
    margin: 30px 0;
}

.coverage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.coverage-item:hover {
    border-color: #3B82F6;
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.1);
}

.coverage-label {
    font-size: 15px;
    color: #475569;
    font-weight: 500;
}

.coverage-value {
    font-size: 17px;
    color: #1E40AF;
    font-weight: 700;
}

/* ===== Result Notes ===== */
.result-notes {
    margin: 25px 0;
    padding: 20px;
    background: #fffbeb;
    border-radius: 10px;
    border-left: 4px solid #f59e0b;
}

.result-notes h4 {
    margin: 0 0 15px 0;
    color: #92400e;
    font-size: 18px;
}

.result-notes ul {
    margin: 0;
    padding-left: 20px;
}

.result-notes li {
    color: #78350f;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

/* ===== Action Buttons ===== */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-secondary {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Sarabun', sans-serif;
    background: white;
    color: #3B82F6;
    border: 2px solid #3B82F6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #3B82F6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .insurance-calculator-container {
        margin: 20px 10px;
    }

    .calculator-header {
        padding: 25px 20px;
    }

    .calculator-header h2 {
        font-size: 26px;
    }

    .subtitle {
        font-size: 14px;
    }

    .insurance-form,
    .result-content {
        padding: 25px 20px;
    }

    .premium-amount {
        font-size: 36px;
    }

    .button-group,
    .action-buttons {
        flex-direction: column;
    }

    .btn-calculate,
    .btn-reset,
    .btn-secondary {
        width: 100%;
    }
}

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

    .premium-amount {
        font-size: 32px;
    }

    .currency {
        font-size: 16px;
    }

    .coverage-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .coverage-value {
        align-self: flex-end;
    }
}

/* ===== Print Styles ===== */
@media print {
    .button-group,
    .action-buttons,
    .btn-reset {
        display: none !important;
    }

    .insurance-calculator-container {
        box-shadow: none;
    }

    .result-section {
        page-break-inside: avoid;
    }
}

/* ===== Hidden Class ===== */
.hidden {
    display: none !important;
}

/* ===== Loading Animation ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
