﻿.task-report-link {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0 0 auto;       /* push to the right edge */
    width: fit-content;
    padding: 6px 12px;
    background: rgba(225, 112, 85, 0.10);
    border: 1px solid rgba(225, 112, 85, 0.35);
    color: #e17055;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.task-report-link:hover,
.task-report-link:active {
    background: rgba(225, 112, 85, 0.18);
    border-color: #e17055;
    color: #d45a3c;
}
body.theme-light .task-report-link {
    background: rgba(225, 112, 85, 0.08);
    border-color: rgba(225, 112, 85, 0.35);
    color: #c94a2e;
}

.solution-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.solution-review-report {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 112, 87, 0.45);
    border-radius: 999px;
    background: rgba(255, 112, 87, 0.12);
    color: #ff7057;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.solution-review-report svg {
    width: 16px;
    height: 16px;
}

.solution-review-report:active {
    transform: scale(0.94);
    background: rgba(255, 112, 87, 0.18);
}

.report-modal {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: flex-end; justify-content: center;
}
.report-backdrop {
    position: absolute; inset: 0;
    background: rgba(5, 10, 20, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.report-dialog {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: calc(100dvh - 16px);
    margin: 0 auto;
    background: var(--bg-secondary);
    color: var(--text);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px 18px 24px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.4);
    animation: reportSlideUp 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@keyframes reportSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.report-close {
    position: absolute; top: 10px; right: 12px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    color: var(--text-hint);
    font-size: 22px; line-height: 1;
    cursor: pointer;
}
.report-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.report-subtitle { color: var(--text-hint); font-size: 13px; margin-bottom: 14px; }
.report-reasons {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 14px;
}
.report-reason {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}
.report-reason.selected {
    background: rgba(30,111,255,0.15);
    border-color: var(--accent);
}
.report-reason input[type="radio"] { accent-color: var(--accent); }
.learning-settings-dialog {
    padding-bottom: 22px;
}
.learning-settings-section {
    margin: 16px 0 18px;
}
.learning-settings-label {
    margin-bottom: 8px;
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.learning-option-grid {
    display: grid;
    gap: 8px;
}
.learning-grade-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.learning-subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.learning-option {
    min-height: 44px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.learning-grade-option {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.learning-grade-number {
    font-size: 18px;
    line-height: 1;
}
.learning-exam-badge {
    padding: 3px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-soft);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}
.learning-grade-ege .learning-exam-badge {
    background: color-mix(in srgb, #f59e0b 20%, transparent);
    color: #f6b23f;
}
.learning-subject-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    text-align: left;
}
.learning-subject-option span:not(.learning-soon-badge) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.learning-subject-option img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex: 0 0 auto;
}
.learning-subject-option.locked {
    opacity: 0.68;
}
.learning-subject-option.locked img {
    filter: grayscale(0.2);
}
.learning-soon-badge {
    margin-left: auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--accent-soft);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.learning-option.active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 20%, var(--card-bg));
    color: var(--text);
}
.learning-settings-error {
    margin: -4px 0 14px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--error) 42%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--error) 14%, transparent);
    color: var(--error);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}
.report-label {
    display: block;
    font-size: 12px;
    color: var(--text-hint);
    margin-bottom: 6px;
}
.report-comment {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--card-border);
    font: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 14px;
    -webkit-appearance: none;
}
.report-submit { width: 100%; }
.report-submit:disabled { opacity: 0.5; cursor: not-allowed; }

body.theme-light .report-dialog { background: #ffffff; }
body.theme-light .report-backdrop { background: rgba(15, 25, 45, 0.45); }

@media (orientation: landscape) {
    .report-modal {
        align-items: center;
        padding: 8px 12px;
    }
    .report-dialog {
        max-width: min(520px, calc(100vw - 24px));
        max-height: calc(100dvh - 16px);
        border-radius: 16px;
        padding: 14px 16px 16px;
    }
    .report-title {
        padding-right: 36px;
        font-size: 16px;
    }
    .report-subtitle {
        margin-bottom: 8px;
        font-size: 12px;
    }
    .report-reasons {
        gap: 5px;
        margin-bottom: 8px;
    }
    .report-reason {
        padding: 7px 10px;
        font-size: 13px;
    }
    .report-comment {
        min-height: 46px;
        margin-bottom: 10px;
        padding: 8px 10px;
    }
    .report-modal.draft-report-mode .report-dialog {
        max-width: min(680px, calc(100vw - 24px));
        padding: 12px 14px 14px;
    }
    .report-modal.draft-report-mode .report-reasons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .report-modal.draft-report-mode .report-reason {
        min-height: 36px;
        padding: 7px 9px;
        line-height: 1.2;
    }
    .report-modal.draft-report-mode .report-label {
        margin-bottom: 4px;
    }
    .report-modal.draft-report-mode .report-comment {
        min-height: 40px;
        max-height: 72px;
    }
}

