/* ============================
   student-upload.css — צילום מקור מספר הלימוד
   ============================ */

.student-upload-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.upload-header {
    text-align: center;
    margin-bottom: 20px;
}

.upload-icon {
    font-size: 2.5em;
    margin-bottom: 4px;
}

/* מקור נתון (שאלה משולבת) */
.given-source-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

/* כרטיס upload */
.upload-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}

.upload-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.upload-badge {
    background: #2563eb;
    color: white;
    border-radius: 6px;
    padding: 3px 12px;
    font-weight: 700;
    font-size: 0.82em;
}

.upload-status-done {
    font-size: 0.85em;
    color: #16a34a;
    font-weight: 600;
}

/* Drop zone */
.upload-drop-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #c7d2fe;
    border-radius: 10px;
    padding: 28px 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8faff;
}

.upload-drop-zone:hover,
.upload-drop-zone:active {
    border-color: #6366f1;
    background: #eef2ff;
}

.drop-zone-content {
    text-align: center;
}

/* Crop modal */
.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.crop-modal-inner {
    background: white;
    border-radius: 14px;
    max-width: 95vw;
    max-height: 90vh;
    width: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.crop-modal-header h4 {
    color: #1e40af;
    font-size: 1em;
}

.crop-close-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px 8px;
    border-radius: 6px;
}

.crop-close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.crop-container {
    flex: 1;
    overflow: hidden;
    max-height: 55vh;
    background: #f1f5f9;
}

.crop-container img {
    max-width: 100%;
}

.crop-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 18px;
    border-top: 1px solid #e5e7eb;
}

/* Processing spinner */
.upload-processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.processing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload result */
.upload-result {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px;
}

.upload-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.upload-type-badge {
    font-size: 0.78em;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.upload-type-badge.text {
    background: #dbeafe;
    color: #1e40af;
}

.upload-type-badge.visual {
    background: #fce7f3;
    color: #9d174d;
}

.upload-source-title {
    font-size: 0.85em;
    font-weight: 600;
    color: #374151;
}

.upload-result-content {
    font-size: 0.9em;
    line-height: 1.8;
    color: #1f2937;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #d1fae5;
}

/* Continue button */
.upload-continue-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05em;
    font-weight: 600;
    margin-top: 16px;
    border-radius: 10px;
}

.upload-hint {
    text-align: center;
    font-size: 0.82em;
    color: #9ca3af;
    margin-top: 12px;
}

/* ============================
   Mobile adjustments
   ============================ */
@media (max-width: 768px) {
    .crop-modal-inner {
        width: 100%;
        max-height: 85vh;
        border-radius: 10px;
    }

    .crop-container {
        max-height: 50vh;
    }

    .upload-drop-zone {
        padding: 22px 14px;
        min-height: 48px;
    }

    .crop-actions .btn {
        min-height: 48px;
        flex: 1;
    }
}
