/* Session Report Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Lora:wght@400;500&display=swap');

/* Header Styles */
.report-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--gray-100);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left .logo {
    font-family: 'Nunito', sans-serif;
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--navy);
}

.header-left .logo span {
    color: var(--orange);
    font-weight: 800;
}

.header-center .page-title {
    font-family: 'Nunito', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.header-right {
    display: flex;
    gap: 12px;
}

/* Back Link */
.back-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 16px 20px 0;
}

.back-link {
    color: var(--gray-600);
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--navy);
}

/* Main Container */
.report-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px;
}

/* States */
.error-state, .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.error-card {
    background: white;
    padding: 40px;
    border-radius: 14px;
    border: 2px solid var(--gray-200);
    max-width: 400px;
}

.error-card h2 {
    font-family: 'Nunito', sans-serif;
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 16px;
}

.error-card p {
    font-family: 'Lora', serif;
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.6;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-state p {
    font-family: 'Nunito', sans-serif;
    color: var(--gray-600);
    font-weight: 600;
}

/* Session Banner */
.session-banner {
    background: var(--navy);
    color: white;
    border-radius: 14px;
    margin-bottom: 32px;
    overflow: hidden;
}

.banner-content {
    padding: 24px;
}

.session-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item .label {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 4px;
}

.info-item .value {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
}

/* Submitted Banner */
.submitted-banner {
    background: #10b981;
    color: white;
    border-radius: 14px;
    margin-bottom: 32px;
}

.submitted-banner .banner-content {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-icon {
    font-size: 20px;
    font-weight: 700;
}

/* Report Sections */
.report-section {
    background: var(--warm);
    border-radius: 14px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
}

.section-title {
    font-family: 'Nunito', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--orange);
}

/* Summary Card */
.summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--gray-200);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
}

.summary-value {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.participant-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.participant-badge.supervisor {
    background: var(--sky);
    color: var(--navy);
}

.participant-badge.parent {
    background: var(--warm);
    color: var(--gray-800);
}

.participant-badge.child {
    background: var(--teal);
    color: white;
}

.call-type-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 600;
    background: var(--blue);
    color: white;
}

/* Slider Styles */
.slider-container {
    margin-bottom: 32px;
}

.slider-label {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 16px;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
}

.willingness-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: var(--navy);
    outline: none;
    transition: opacity 0.3s ease;
}

.willingness-slider:hover {
    opacity: 0.8;
}

.willingness-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--orange);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.willingness-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.willingness-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--orange);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.willingness-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.slider-value-display {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 120px;
}

.value-number {
    font-family: 'Nunito', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--orange);
}

.value-emoji {
    font-size: 24px;
}

.value-label {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 12px;
}

.observation-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-family: 'Lora', serif;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.observation-textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.observation-textarea:disabled {
    background: var(--gray-50);
    color: var(--gray-600);
}

.char-counter {
    text-align: right;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
}

/* Incident Toggle */
.incident-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--gray-200);
}

.toggle-label {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-400);
    transition: 0.4s;
    border-radius: 32px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--orange);
}

input:checked + .toggle-slider:before {
    transform: translateX(28px);
}

.incident-fields {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--gray-200);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkbox Styles */
.checkbox-label {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 16px;
}

.incident-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 600;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: var(--orange);
    border-color: var(--orange);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
}

/* Radio Styles */
.radio-label {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 16px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 600;
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.radio-item input[type="radio"]:checked + .radio-mark {
    border-color: var(--orange);
}

.radio-item input[type="radio"]:checked + .radio-mark:after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--orange);
    border-radius: 50%;
}

/* Signature Input */
.signature-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.signature-input:focus {
    outline: none;
    border-color: var(--orange);
}

.signature-input:disabled {
    background: var(--gray-50);
    color: var(--gray-600);
}

/* Timestamp Display */
.timestamp-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.timestamp-label {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

.timestamp-value {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #10b981;
    color: white;
}

.toast.error {
    background: #ef4444;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .header-center {
        order: -1;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .session-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .slider-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .slider-value-display {
        width: 100%;
        justify-content: space-between;
    }

    .incident-checkboxes {
        grid-template-columns: 1fr;
    }

    .recommendation-group {
        grid-template-columns: 1fr;
    }

    .incident-toggle-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .report-section {
        padding: 20px;
    }

    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .report-container {
        padding: 16px;
    }

    .report-section {
        padding: 16px;
    }

    .summary-card {
        padding: 16px;
    }

    .incident-fields {
        padding: 16px;
    }
}

/* Disabled State Styling */
.report-section.disabled {
    opacity: 0.7;
    pointer-events: none;
}

/* Print Styles */
@media print {
    .report-header,
    .back-container,
    .header-right {
        display: none;
    }

    .report-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .toast {
        display: none;
    }
}
