/* 
 * Disability Benefits Tools CSS
 * Styles for Benefits Reference Cards and Benefit Interaction Visualization
 */

/* Quick Reference Card System */
.quick-reference-section {
    margin-bottom: 30px;
}

.reference-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.reference-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.reference-card.federal-card {
    border-left-color: var(--federal-color);
}

.reference-card.provincial-card {
    border-left-color: var(--provincial-color);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4ff, #e5e9ff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.federal-card .card-icon i {
    font-size: 24px;
    color: var(--federal-color);
}

.provincial-card .card-icon i {
    font-size: 24px;
    color: var(--provincial-color);
}

.reference-card h5 {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
}

.card-tag {
    display: inline-block;
    font-size: 0.8rem;
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 5px;
    font-weight: 500;
}

.federal-card .card-tag {
    background: rgba(65, 88, 208, 0.15);
    color: var(--federal-color);
}

.provincial-card .card-tag {
    background: rgba(200, 80, 192, 0.15);
    color: var(--provincial-color);
}

.card-arrow {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.9rem;
    color: #999;
    transition: all 0.3s ease;
}

.reference-card[aria-expanded="true"] .card-arrow i {
    transform: rotate(180deg);
}

.reference-details {
    margin-top: 10px;
    width: 100%;
    opacity: 0;
    overflow: hidden;
    max-height: 0;
    transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
}

.reference-details .card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
    padding: 15px;
}

.reference-details .card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Make sure content is visible inside reference cards */
.reference-details .card,
.reference-details .card-body,
.reference-details ul,
.reference-details li,
.reference-details h6,
.reference-details p,
.reference-details a {
    opacity: inherit;
}

.reference-details h6 {
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #333;
}

.reference-details h6:first-child {
    margin-top: 0;
}

.reference-details ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.reference-details li {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555;
}

/* Common Styles (shared with retirement tools) */
.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;
}

/* Complex Disability Eligibility Questionnaire Styles */
#disability-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-progress {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.progress-indicator {
    flex-shrink: 0;
}

.question-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.question-counter i {
    margin-right: 0.5rem;
}

.progress-bar-container {
    flex-grow: 1;
}

.progress {
    height: 0.75rem;
    border-radius: 50px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #3b82f6, #38bdf8);
    border-radius: 50px;
    transition: width 0.4s ease;
}

.question {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border-left: 5px solid #3b82f6;
    transition: all 0.3s ease;
}

.question:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.question h4 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

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

/* Info Box for Additional Context */
.info-box {
    display: flex;
    background-color: #f0f9ff;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 4px solid #38bdf8;
}

.info-box i {
    color: #38bdf8;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
}

.info-box p {
    color: #0c4a6e;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Enhanced Form Controls */
.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-check {
    margin-bottom: 0.5rem;
}

.custom-radio, .custom-checkbox {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.custom-radio:hover, .custom-checkbox:hover {
    background-color: #f1f5f9;
}

.custom-radio input:checked + label, .custom-checkbox input:checked + label {
    font-weight: 600;
    color: #1e40af;
}

/* Range Slider Styling */
.range-container {
    position: relative;
    padding: 1rem 0;
}

.form-range {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    margin-bottom: 1.5rem;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    background: #1e40af;
    transform: scale(1.1);
}

.form-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    border: none;
}

.form-range::-moz-range-thumb:hover {
    background: #1e40af;
    transform: scale(1.1);
}

.range-value {
    position: relative;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
    font-size: 1.2rem;
}

/* Validation Messages */
.validation-message {
    display: flex;
    align-items: center;
    color: #dc2626;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background-color: #fee2e2;
    margin-top: 1rem;
}

.validation-message i {
    margin-right: 0.5rem;
}

/* Add shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Navigation Buttons */
.questionnaire-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Results Styling */
.loading-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1.5rem;
}

.loading-results .spinner-border {
    width: 3rem;
    height: 3rem;
}

.results-summary {
    text-align: center;
    margin-bottom: 2.5rem;
}

.results-summary h2 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 1rem;
}

.results-section {
    margin-bottom: 3rem;
}

.results-section h3 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.results-section h3 i {
    margin-right: 0.75rem;
}

.eligible-benefits h3 i {
    color: #10b981;
}

.partially-eligible-benefits h3 i {
    color: #f59e0b;
}

.ineligible-benefits h3 i {
    color: #ef4444;
}

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

.benefit-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.benefit-header {
    padding: 1.25rem;
    background: linear-gradient(145deg, #f9fafb, #f1f5f9);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.benefit-header i {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.benefit-header h4 {
    margin: 0;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
}

.benefit-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.benefit-body p {
    color: #4b5563;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.benefit-amount, .missing-criteria, .ineligible-reason {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.benefit-amount strong, .missing-criteria strong, .ineligible-reason strong {
    display: block;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.next-steps ul, .missing-criteria ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

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

/* Card colors based on eligibility */
.benefit-card.eligible .benefit-header i {
    color: #10b981;
    background-color: #ecfdf5;
}

.benefit-card.partially-eligible .benefit-header i {
    color: #f59e0b;
    background-color: #fffbeb;
}

.benefit-card.ineligible .benefit-header i {
    color: #ef4444;
    background-color: #fef2f2;
}

.benefit-card.eligible {
    border-left: 4px solid #10b981;
}

.benefit-card.partially-eligible {
    border-left: 4px solid #f59e0b;
}

.benefit-card.ineligible {
    border-left: 4px solid #ef4444;
}

.results-disclaimer {
    background-color: #f1f5f9;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.results-disclaimer p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #disability-eligibility-questionnaire-container {
        padding: 1.5rem;
    }
    
    .question {
        padding: 1.5rem;
    }
    
    .benefits-cards {
        grid-template-columns: 1fr;
    }
    
    .questionnaire-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .questionnaire-nav button {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    * {
        background-color: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .questionnaire-nav,
    .results-actions,
    button {
        display: none !important;
    }
    
    .benefit-card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
    }
    
    .results-disclaimer {
        border: 1px solid #ddd;
        padding: 0.5rem;
    }
}

/* Program Card Styles */
.program-card {
    height: 100%;
    transition: all 0.3s ease;
}

.program-card .card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.program-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.program-card .card-body {
    padding: 1.5rem;
}

.program-card .program-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.program-card .program-icon i {
    font-size: 28px;
    color: #C850C0;
}

.program-card .federal-icon i {
    color: #4158D0;
}

.program-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.program-card .card-text {
    color: #64748b;
    line-height: 1.5;
}

.program-card .badge-info {
    background-color: rgba(200, 80, 192, 0.15);
    color: #C850C0;
}

.program-card .badge-primary {
    background-color: rgba(65, 88, 208, 0.15);
    color: #4158D0;
}

.program-card .btn-primary {
    background: linear-gradient(135deg, #4158D0, #6D78CD);
    border: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.program-card .btn-primary:hover {
    background: linear-gradient(135deg, #3A50C5, #5C68C0);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(65, 88, 208, 0.25);
}

.program-card .card-footer {
    padding: 0.75rem 1.5rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.program-card .text-success {
    color: #10b981 !important;
}