/* ===========================================
   SORU ÖNİZLEME MODAL STİLLERİ
   =========================================== */

.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.preview-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.preview-modal-content {
    position: relative;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--primary-color, #4CAF50);
    background: linear-gradient(135deg, var(--primary-color, #4CAF50) 0%, var(--primary-dark, #45a049) 100%);
    border-radius: 12px 12px 0 0;
}

.preview-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.4em;
}

.preview-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.preview-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.preview-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.preview-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-light, #f5f5f5);
    border-radius: 8px;
}

.preview-info-item {
    font-size: 0.9em;
}

.preview-info-item strong {
    color: var(--text-secondary, #666);
    margin-right: 5px;
}

.preview-section {
    margin-bottom: 20px;
}

.preview-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.preview-outcome {
    padding: 12px;
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.5;
}

.preview-question {
    padding: 15px;
    background: var(--bg-white, #fff);
    border: 2px solid var(--border-color, #ddd);
    border-radius: 8px;
    min-height: 80px;
    font-size: 1em;
    line-height: 1.6;
    transition: all 0.2s;
}

.preview-question.editing {
    border-color: var(--primary-color, #4CAF50);
    background: #F1F8E9;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.preview-question:focus {
    outline: none;
}

.preview-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-white, #fff);
    border: 2px solid var(--border-color, #ddd);
    border-radius: 8px;
    transition: all 0.2s;
}

.preview-option.correct-option {
    border-color: #4CAF50;
    background: #F1F8E9;
}

.option-letter {
    font-weight: bold;
    color: var(--primary-color, #4CAF50);
    min-width: 30px;
}

.option-text {
    flex: 1;
    line-height: 1.5;
    transition: all 0.2s;
}

.option-text.editing {
    background: #FFFDE7;
    padding: 5px;
    border-radius: 4px;
    border: 1px dashed #FFC107;
}

.option-text:focus {
    outline: none;
    background: #FFF9C4;
}

.correct-badge {
    background: #4CAF50;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.preview-answer {
    padding: 12px;
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
    font-weight: 600;
    color: #2E7D32;
}

.preview-quality-section {
    background: #F3E5F5;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #9C27B0;
}

.quality-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.quality-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    font-size: 0.9em;
}

.quality-score {
    font-weight: bold;
    color: var(--primary-color, #4CAF50);
}

.quality-justification {
    background: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9em;
}

.quality-justification p {
    margin: 5px 0 0 0;
    color: var(--text-secondary, #666);
    line-height: 1.5;
}

.score-high {
    color: #4CAF50;
    font-weight: bold;
}

.score-medium {
    color: #FF9800;
    font-weight: bold;
}

.score-low {
    color: #F44336;
    font-weight: bold;
}

.preview-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color, #ddd);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: var(--bg-light, #f9f9f9);
    border-radius: 0 0 12px 12px;
}

.preview-modal-footer .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #2196F3;
    color: white;
}

.btn-secondary:hover {
    background: #1976D2;
}

.btn-warning {
    background: #FF9800;
    color: white;
}

.btn-warning:hover {
    background: #F57C00;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

/* Scrollbar styling */
.preview-modal-body::-webkit-scrollbar {
    width: 8px;
}

.preview-modal-body::-webkit-scrollbar-track {
    background: var(--bg-light, #f1f1f1);
}

.preview-modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color, #4CAF50);
    border-radius: 4px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .preview-modal-content {
        background: #2a2a2a;
    }

    .preview-question,
    .preview-option {
        background: #333;
        border-color: #444;
        color: #e0e0e0;
    }

    .preview-info {
        background: #333;
    }

    .preview-modal-footer {
        background: #222;
        border-top-color: #444;
    }

    .quality-item,
    .quality-justification {
        background: #333;
        color: #e0e0e0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .preview-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .preview-modal-header {
        padding: 15px 20px;
    }

    .preview-modal-body {
        padding: 20px;
    }

    .preview-info {
        flex-direction: column;
        gap: 10px;
    }

    .preview-modal-footer {
        flex-direction: column;
    }

    .preview-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .quality-breakdown {
        grid-template-columns: 1fr;
    }
}