/* 
 * Retirement Benefits Tools CSS
 * Styles for the Eligibility Questionnaire and Age-Based Timeline
 */

/* Common Styles */
.tools-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tools-section h3 {
    color: #1e3a8a;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Eligibility Questionnaire Styles */
#eligibility-questionnaire-container {
    position: relative;
    padding: 2.5rem;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
    transition: all 0.3s ease;
}

.questionnaire-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.questionnaire-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4158D0, #3b82f6);
    border-radius: 2px;
}

.questionnaire-header h3 {
    color: #1e3a8a;
    font-weight: 800;
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.questionnaire-header p {
    color: #64748b;
    font-size: 1.125rem;
    max-width: 80%;
    margin: 0 auto;
    line-height: 1.6;
}

.question-container {
    min-height: 220px;
    margin-bottom: 2.5rem;
    transition: all 0.3s ease;
}

.question {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
    border-left: 4px solid #3b82f6;
}

.question h4 {
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.question h4:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #4f46e5);
    border-radius: 2px;
}

.question-input {
    margin-top: 1.5rem;
}

.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    width: 100%;
    font-size: 1.0625rem;
    transition: all 0.25s ease;
    background-color: #f8fafc;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control:focus, .form-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
    background-color: #fff;
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-check:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.form-check-input {
    margin-right: 1rem;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #4f46e5;
}

.form-check-input:checked + .form-check-label {
    color: #1e293b;
    font-weight: 600;
}

.form-check-label {
    font-size: 1.0625rem;
    color: #475569;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
}

.range-container {
    position: relative;
    padding: 1.5rem 0;
}

.form-range {
    width: 100%;
    height: 12px;
    padding: 0;
    margin: 0.75rem 0;
    accent-color: #4f46e5;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: #4f46e5;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.range-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 1rem;
    background: linear-gradient(90deg, #3b82f6, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.questionnaire-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.questionnaire-nav button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: none;
}

.questionnaire-nav .btn-outline-primary {
    background-color: transparent;
    color: #4f46e5;
    border: 2px solid #4f46e5;
}

.questionnaire-nav .btn-outline-primary:hover:not(:disabled) {
    background-color: #4f46e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.25);
}

.questionnaire-nav .btn-outline-primary:disabled {
    color: #94a3b8;
    border-color: #cbd5e1;
    cursor: not-allowed;
}

.questionnaire-nav .btn-primary {
    background: linear-gradient(90deg, #3b82f6, #4f46e5);
    color: white;
    border: none;
}

.questionnaire-nav .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    background: linear-gradient(90deg, #2563eb, #4338ca);
}

.questionnaire-nav .btn-success {
    background: linear-gradient(90deg, #10b981, #059669);
    color: white;
    border: none;
}

.questionnaire-nav .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    background: linear-gradient(90deg, #059669, #047857);
}

.questionnaire-progress {
    height: 10px;
    background-color: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.questionnaire-progress .step-counter {
    position: relative;
    display: inline-block;
    left: 0;
    right: 0;
    margin: 0 auto 1.5rem;
    font-size: 1rem;
    color: #1e293b;
    font-weight: 600;
    background-color: #e0f2fe;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid #bae6fd;
    max-width: fit-content;
    z-index: 2;
}

.step-counter {
    display: block;
    text-align: center;
    margin: 0 auto 1.5rem;
    font-size: 1rem;
    color: #1e293b;
    font-weight: 600;
    background-color: #e0f2fe;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #bae6fd;
    max-width: fit-content;
}

.step-counter i {
    color: #0284c7;
    margin-right: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4158D0, #C850C0, #FFCC70);
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.5s ease, background-position 1s ease;
    animation: gradient-shift 3s ease infinite;
}

.validation-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.validation-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-left: 3px solid #ef4444;
}

.validation-message i {
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Results Styles */
.questionnaire-results {
    background: linear-gradient(145deg, #fefefe, #f8fafc);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.questionnaire-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #4158D0, #C850C0, #FFCC70);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.results-header h3 {
    color: #1e293b;
    font-weight: 800;
    margin-bottom: 0.75rem;
    font-size: 1.875rem;
    background: linear-gradient(90deg, #1e40af, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.results-header p {
    color: #64748b;
    font-size: 1.125rem;
    max-width: 80%;
    margin: 0 auto;
}

.results-section {
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.results-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.results-section h4 {
    display: flex;
    align-items: center;
    font-size: 1.375rem;
    margin-bottom: 2rem;
    color: #0f172a;
    font-weight: 700;
    position: relative;
}

.results-section h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.5;
}

.results-section h4 i {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.results-section.eligible {
    background: linear-gradient(145deg, #f0fdf4, #ecfdf5);
    border: none;
    box-shadow: 0 5px 20px rgba(5, 150, 105, 0.1);
}

.results-section.eligible h4 i {
    color: #10b981;
    background: linear-gradient(145deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.results-section.eligible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), transparent 70%);
    z-index: 0;
}

.results-section.partial {
    background: linear-gradient(145deg, #fef9c3, #fef3c7);
    border: none;
    box-shadow: 0 5px 20px rgba(202, 138, 4, 0.1);
}

.results-section.partial h4 i {
    color: #eab308;
    background: linear-gradient(145deg, #eab308, #ca8a04);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.results-section.partial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(234, 179, 8, 0.1), transparent 70%);
    z-index: 0;
}

.results-section.ineligible {
    background: linear-gradient(145deg, #f1f5f9, #f8fafc);
    border: none;
    box-shadow: 0 5px 20px rgba(100, 116, 139, 0.1);
}

.results-section.ineligible h4 i {
    color: #64748b;
    background: linear-gradient(145deg, #64748b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.results-section.ineligible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(100, 116, 139, 0.1), transparent 70%);
    z-index: 0;
}

.benefits-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.benefit-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
    overflow: hidden;
    position: relative;
}

.benefit-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.benefit-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4158D0, #C850C0);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.benefit-card:hover::after {
    opacity: 1;
}

.benefit-card .card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.benefit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.benefit-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.benefit-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.benefit-header h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.badge {
    padding: 0.375rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.bg-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.bg-warning {
    background-color: #fef3c7;
    color: #854d0e;
    border: 1px solid #facc15;
}

.bg-secondary {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    border: none;
}

.benefit-description {
    color: #475569;
    font-size: 1rem;
    margin: 1.5rem 0;
    line-height: 1.6;
    flex: 1;
}

.benefit-details {
    margin-top: auto;
    font-size: 0.9375rem;
}

.benefit-detail-container {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.benefit-detail-container:hover {
    transform: translateY(-2px);
}

.eligibility-note {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: #334155;
    border-left: 4px solid #64748b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.estimated-amount {
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.estimated-amount::before {
    content: '$';
    position: absolute;
    top: -20px;
    right: 10px;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(219, 234, 254, 0.5);
    z-index: 0;
}

.estimated-amount h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.amount {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    display: block;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(90deg, #1e40af, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.disclaimer {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.conditional-note {
    font-style: italic;
    color: #64748b;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #94a3b8;
}

.time-to-eligibility {
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: #92400e;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border-left: 4px solid #f59e0b;
}

.remedy-steps {
    background-color: #f8fafc;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border-left: 4px solid #64748b;
}

.remedy-steps h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}

.remedy-steps p {
    color: #475569;
    margin: 0;
}

.benefit-card .btn {
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    text-transform: none;
    letter-spacing: 0.2px;
}

.benefit-card .btn-primary {
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    border: none;
    color: white;
}

.benefit-card .btn-primary:hover {
    background: linear-gradient(90deg, #1d4ed8, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.benefit-card .btn-outline-secondary {
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.benefit-card .btn-outline-secondary:hover {
    background-color: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.results-actions {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
}

.next-steps {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.next-steps h4 {
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.next-steps ul {
    color: #475569;
    padding-left: 1.5rem;
    list-style-type: circle;
}

.next-steps li {
    margin-bottom: 0.5rem;
}

/* Age-Based Timeline Styles */
#age-benefits-timeline-container {
    padding: 2rem;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.timeline-header {
    text-align: center;
    margin-bottom: 2rem;
}

.timeline-header h3 {
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-header p {
    color: #64748b;
    font-size: 1rem;
}

.timeline-controls {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.timeline-controls label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #334155;
}

.timeline-visualization {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-scale {
    position: relative;
    height: 40px;
    margin-bottom: 1.5rem;
}

.age-markers {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin-bottom: 0.5rem;
}

.age-marker {
    font-size: 0.875rem;
    color: #64748b;
    position: absolute;
    transform: translateX(-50%);
}

.timeline-track {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
}

.age-indicator {
    position: absolute;
    top: 15px;
    width: 2px;
    height: 24px;
    background-color: #ef4444;
    z-index: 5;
    transition: left 0.3s ease;
}

.age-indicator::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -6px;
    width: 14px;
    height: 14px;
    background-color: #ef4444;
    border-radius: 50%;
}

.benefit-timelines {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-timeline {
    display: grid;
    grid-template-columns: 150px 1fr 250px;
    gap: 1rem;
    align-items: center;
}

.benefit-label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
}

.benefit-label span:first-child {
    font-size: 1.125rem;
    color: #0f172a;
}

.benefit-type {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
}

.benefit-track {
    position: relative;
    height: 50px;
    background-color: #f1f5f9;
    border-radius: 6px;
}

.benefit-period {
    position: absolute;
    top: 10px;
    height: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    cursor: help;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-period:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.benefit-period.current {
    box-shadow: 0 0 0 2px #3b82f6, 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.period-label {
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.benefit-period.reduced {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.benefit-period.standard {
    background-color: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.benefit-period.enhanced {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.benefit-period.special {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.optimal-point {
    position: absolute;
    top: -10px;
    width: 20px;
    height: 20px;
    background-color: #facc15;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 15;
    cursor: help;
}

.optimal-point::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 6px;
    border-width: 6px 4px 0 4px;
    border-style: solid;
    border-color: #facc15 transparent transparent transparent;
}

.point-label {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.optimal-point:hover .point-label {
    opacity: 1;
}

.benefit-details {
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.detail-item {
    margin-bottom: 0.75rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.detail-item p {
    font-size: 0.875rem;
    color: #475569;
    margin: 0;
}

.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b;
}

.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    border-radius: 4px;
}

.legend-color.reduced {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
}

.legend-color.standard {
    background-color: #dbeafe;
    border: 1px solid #bfdbfe;
}

.legend-color.enhanced {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
}

.legend-color.special {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
}

.legend-marker {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    background-color: #facc15;
    border: 2px solid #fff;
    border-radius: 50%;
}

.timeline-tips {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.timeline-tips h4 {
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-tips ul {
    color: #475569;
    padding-left: 1.5rem;
}

.timeline-tips li {
    margin-bottom: 0.75rem;
}

.timeline-tips strong {
    color: #0f172a;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .benefits-cards {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .benefit-timeline {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .benefit-label {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .benefit-details {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    #eligibility-questionnaire-container,
    #age-benefits-timeline-container {
        padding: 1.5rem;
    }
    
    .benefits-cards {
        grid-template-columns: 1fr;
    }
    
    .period-label {
        display: none;
    }
    
    .benefit-period:hover .period-label {
        display: block;
        position: absolute;
        top: -30px;
        left: 50%;
        transform: translateX(-50%);
        background-color: #fff;
        padding: 0.5rem;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 20;
    }
}

/* Print Styles */
@media print {
    * {
        background-color: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .questionnaire-nav,
    .next-steps,
    button {
        display: none !important;
    }
    
    .benefit-card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
    }
    
    .benefit-period {
        border: 1px solid #ddd;
    }
    
    .timeline-visualization {
        page-break-inside: avoid;
    }
}