/* CSS Age Eligibility Calculator Styles */
#css-age-calculator-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 20px 0;
}

.css-age-calculator-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 800px; /* Standard desktop width */
    width: 100%;
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h2 {
    color: #333;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; /* Allow the title to wrap on smaller screens */
}

.header p {
    color: #666;
    font-size: 18px;
}

.eligibility-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.eligibility-info h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.eligibility-info ul {
    list-style-type: none;
    padding-left: 5px;
}

.eligibility-info li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    font-size: 16px;
    color: #555;
}

.eligibility-info li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 5px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: color 0.3s;
    width: 18px;
    height: 18px;
}

input[type="date"] {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 18px;
    transition: all 0.3s;
    background: #fff;
    cursor: pointer;
}

input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="date"]:focus + svg {
    color: #667eea;
}

.cutoff-date {
    background: #e8f0fe;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cutoff-date svg {
    color: #4285f4;
    flex-shrink: 0;
}

.cutoff-date p {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.cutoff-date strong {
    color: #4285f4;
}

.relaxation-options {
    margin-bottom: 25px;
}

.relaxation-options h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-group {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.option-group:hover {
    background: #e9ecef;
}

.option-group label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    font-size: 16px;
    text-transform: none;
    letter-spacing: normal;
}

.option-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #667eea;
    cursor: pointer;
}

.option-group p {
    margin: 5px 0 0 32px;
    color: #666;
    font-size: 14px;
}

.btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.result {
    margin-top: 30px;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.result svg {
    width: 56px;
    height: 56px;
    margin-bottom: 15px;
}

.result h3 {
    margin-bottom: 15px;
    font-size: 24px;
}

.result p {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.result .note {
    font-size: 16px;
    font-style: italic;
    margin-top: 15px;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 18px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
    z-index: 1000;
    font-size: 16px;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
}

/* Responsive design */
@media (min-width: 768px) {
    .css-age-calculator-container {
        padding: 50px;
    }
}

@media (min-width: 1024px) {
    .css-age-calculator-container {
        max-width: 1100px; /* Increased to 1100px for wider desktop view */
        padding: 60px;
    }
    
    .header h2 {
        font-size: 36px;
    }
    
    .header p {
        font-size: 20px;
    }
    
    .eligibility-info h2 {
        font-size: 22px;
    }
    
    .eligibility-info li {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .css-age-calculator-container {
        padding: 30px 20px;
    }

    .header h2 {
        font-size: 22px; /* Reduced from 28px to 22px for better mobile fit */
        line-height: 1.2;
    }
    
    .header p {
        font-size: 16px;
    }
    
    .eligibility-info h2 {
        font-size: 18px;
    }
    
    .eligibility-info li {
        font-size: 15px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    input[type="date"] {
        font-size: 16px;
        padding: 12px 15px 12px 40px;
    }
    
    .option-group label {
        font-size: 15px;
    }
    
    .option-group p {
        font-size: 13px;
    }
    
    .btn {
        font-size: 16px;
        padding: 15px;
    }
    
    .result {
        padding: 20px;
    }
    
    .result svg {
        width: 48px;
        height: 48px;
    }
    
    .result h3 {
        font-size: 20px;
    }
    
    .result p {
        font-size: 16px;
    }
    
    .toast {
        font-size: 14px;
        padding: 15px 20px;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .css-age-calculator-container {
        padding: 25px 15px;
    }
    
    .header h2 {
        font-size: 20px; /* Reduced from 24px to 20px for better mobile fit */
        line-height: 1.2;
    }
    
    .header p {
        font-size: 15px;
    }
    
    .eligibility-info h2 {
        font-size: 17px;
    }
    
    .eligibility-info li {
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    input[type="date"] {
        font-size: 15px;
        padding: 10px 15px 10px 35px;
    }
    
    .option-group label {
        font-size: 14px;
    }
    
    .option-group p {
        font-size: 12px;
    }
    
    .btn {
        font-size: 15px;
        padding: 12px;
    }
    
    .result {
        padding: 15px;
    }
    
    .result svg {
        width: 40px;
        height: 40px;
    }
    
    .result h3 {
        font-size: 18px;
    }
    
    .result p {
        font-size: 15px;
    }
}