/* AssessmentsSection Component Styles */

.assessments-section {
    margin-top: 1.5rem;
    padding: 0;
}

.assessments-header {
    margin-bottom: 1rem;
}

.assessments-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.assessments-title-row h3 {
    color: #372562;
    font-size: 1.1rem;
    font-weight: 700;
    font-weight: 600;
}

.assessments-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filter Dropdown */
.assessment-filter-dropdown {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s;
}

.assessment-filter-dropdown:focus {
    outline: none;
    border-color: #ec5f59;
}

/* New Assessment Button */
.btn-new-assessment {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: #b8d4f1;
    color: #1a3a5c;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-new-assessment:hover {
    background: #a8c4e8;
    transform: translateY(-1px);
}

/* Loading State */
.assessments-loading {
    text-align: center;
    padding: 1.5rem;
    color: #666;
}

.assessments-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ec5f59;
    border-radius: 50%;
    animation: assessments-spin 1s linear infinite;
    margin: 0 auto 0.75rem;
}

@keyframes assessments-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.assessments-loading p {
    margin: 0;
    font-size: 0.85rem;
}

/* Error State */
.assessments-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #fee2e2;
    color: #dc2626;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.btn-retry {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-retry:hover {
    background: #b91c1c;
}

/* Assessment List */
.assessments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.assessment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: box-shadow 0.2s;
}

.assessment-row:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.assessment-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.assessment-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.assessment-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e8ecf1;
    color: #4a6fa5;
    border-radius: 10px;
    white-space: nowrap;
}

.assessment-therapist {
    font-size: 0.8rem;
    color: #666;
}

.assessment-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* Action Buttons */
.assessments-section .btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, transform 0.2s;
}

.btn-view {
    background: #e0e7ff;
    color: #3730a3;
}

.btn-view:hover {
    background: #c7d2fe;
    transform: translateY(-1px);
}

.btn-edit {
    background: #b8d4f1;
    color: #1a3a5c;
}

.btn-edit:hover {
    background: #a8c4e8;
    transform: translateY(-1px);
}

.btn-delete-assessment {
    background: #f1b8d4;
    color: #5c1a3a;
}

.btn-delete-assessment:hover {
    background: #e8a5c8;
    transform: translateY(-1px);
}

/* Empty State */
.assessments-empty {
    text-align: center;
    padding: 1.5rem;
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.assessments-empty p {
    margin: 0;
}

/* Delete Confirmation Modal */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.delete-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 90%;
    overflow: hidden;
}

.delete-modal-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    color: white;
}

.delete-modal-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.delete-modal-body {
    padding: 1rem;
    font-size: 0.9rem;
    color: #333;
}

.delete-modal-body p {
    margin: 0 0 0.5rem 0;
}

.delete-detail {
    background: #f9fafb;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border-left: 3px solid #dc2626;
}

.delete-warning {
    color: #dc2626;
    font-weight: 500;
    font-size: 0.8rem;
}

.delete-modal-footer {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.btn-cancel {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-cancel:hover {
    background: #d1d5db;
}

.btn-confirm-delete {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-confirm-delete:hover {
    background: #b91c1c;
}

.btn-confirm-delete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .assessments-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .assessments-controls {
        width: 100%;
    }

    .assessment-filter-dropdown {
        flex: 1;
    }

    .assessment-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .assessment-actions {
        width: 100%;
        justify-content: flex-end;
    }
}


/* Speech Screener Summary Badges */
.ss-diagnosis-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    white-space: nowrap;
}

.ss-badge-green {
    background: #d4edda;
    color: #155724;
}

.ss-badge-amber {
    background: #fff3cd;
    color: #856404;
}

.ss-badge-red {
    background: #f8d7da;
    color: #721c24;
}

.ss-delay-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: #e2e3e5;
    color: #383d41;
    border-radius: 10px;
    white-space: nowrap;
}
