/* Retirement Age Calculator - Additional Styles */

.retirecalc-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.retirecalc-wrapper {
    max-width: 950px;
    margin: 0 auto;
}

.retirecalc-title {
    font-size: 2.8rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.retirecalc-icon {
    display: inline-block;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.retirecalc-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.retirecalc-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* Input Group */
.retirecalc-input-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid var(--border);
}

.input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.required {
    color: #ef4444;
}

.input-hint {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

.age-input-row {
    display: flex;
    gap: 1rem;
}

.age-input-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
}

.currency-symbol {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

.number-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    outline: none;
}

.date-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
}

.input-unit {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Preset Buttons */
.preset-retirement {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.preset-small {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.preset-small:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Action Buttons */
.retirecalc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.primary-action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.primary-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(230,126,34,0.3);
}

.action-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Results Area */
.retirecalc-results {
    background: var(--bg);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.retire-main-display {
    background: linear-gradient(135deg, var(--primary), #2c3e2f);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.result-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

/* Age Main Display */
.age-main-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 24px;
    color: white;
}

.age-big-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.big-number {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.big-label {
    font-size: 1rem;
    font-weight: 500;
}

.age-detail-row {
    margin-top: 0.5rem;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.detail-number {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Result Grid */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.result-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    word-break: break-word;
}

.result-label-small {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* Additional Info */
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem;
    background: var(--surface);
    border-radius: 10px;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.info-value {
    font-weight: 600;
    color: var(--primary);
}

/* Recommendation Box */
.recommendation-box {
    background: linear-gradient(135deg, #fef3e8, #ffe8d6);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-left: 4px solid var(--primary);
}

.dark-mode .recommendation-box {
    background: linear-gradient(135deg, #2d2d44, #1e1e2e);
}

.recommendation-icon {
    font-size: 1.5rem;
}

.recommendation-box strong {
    color: var(--primary);
}

.recommendation-box span:last-child {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--bg);
}

/* Reference Section */
.retirecalc-reference {
    margin-bottom: 1.5rem;
}

.retirecalc-reference h3 {
    margin-bottom: 1rem;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.ref-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.ref-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.ref-card p, .ref-card ul {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

.ref-card ul {
    padding-left: 1.2rem;
}

.ref-card li {
    margin-bottom: 0.2rem;
}

/* Retirement Gift Card */
.retire-giftcard {
    background: linear-gradient(135deg, #1e3c32, #2c3e2f);
    border-radius: 28px;
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.retire-giftcard-bg {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.retire-giftcard-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
}

.retire-giftcard-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.retire-giftcard-icon {
    font-size: 2.5rem;
}

.retire-giftcard-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.retire-giftcard-body {
    margin-bottom: 1.5rem;
}

.retire-giftcard-date, .retire-giftcard-savings, .retire-giftcard-income {
    margin: 0.8rem 0;
    padding: 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
}

.retire-giftcard-label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 0.2rem;
}

.retire-giftcard-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.retire-giftcard-years {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.retire-giftcard-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.retire-giftcard-message {
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.retire-giftcard-brand {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .retirecalc-container {
        padding: 0 1rem;
    }
    
    .retirecalc-title {
        font-size: 2rem;
    }
    
    .retirecalc-card {
        padding: 1.2rem;
    }
    
    .retirecalc-input-group {
        grid-template-columns: 1fr;
    }
    
    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .additional-info {
        grid-template-columns: 1fr;
    }
    
    .big-number {
        font-size: 1.3rem;
    }
    
    .result-value {
        font-size: 0.9rem;
    }
}

/* Modal - Hidden by default */
.giftcard-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.giftcard-modal.active {
    display: flex;
}

/* Ensure modal content is properly styled */
.giftcard-modal-content {
    background: var(--surface);
    border-radius: 32px;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}