/**
 * Create Practice Test — matches app dashboard dark theme (flashcards library / hubs).
 */
body.app-dashboard-home #createPracticeTestPage {
    color-scheme: dark;
}

body.app-dashboard-home #createPracticeTestPage:not(.hidden) {
    background: #000000;
    min-height: calc(100vh - 56px);
    box-sizing: border-box;
}

body.app-dashboard-home #createPracticeTestPage .create-practice-test-page-wrap {
    max-width: 960px;
}

body.app-dashboard-home #createPracticeTestPage .create-practice-test-panel {
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 32px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(61, 214, 140, 0.06);
}

/* Stepper — line reads on black */
body.app-dashboard-home #createPracticeTestPage .test-creation-steps-indicator::before {
    background: rgba(255, 255, 255, 0.1);
}

body.app-dashboard-home #createPracticeTestPage .step-indicator-item .step-number {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: #94a3b8;
}

body.app-dashboard-home #createPracticeTestPage .step-indicator-item.active .step-number {
    background: linear-gradient(135deg, #2eb574 0%, #3dd68c 100%);
    border-color: transparent;
    color: #041208;
    box-shadow: 0 0 20px rgba(61, 214, 140, 0.35);
}

body.app-dashboard-home #createPracticeTestPage .step-indicator-item.completed .step-number {
    background: rgba(61, 214, 140, 0.25);
    border-color: rgba(61, 214, 140, 0.5);
    color: #3dd68c;
}

body.app-dashboard-home #createPracticeTestPage .step-indicator-item.active .step-label {
    color: #3dd68c;
}

/* Upload drop zone */
body.app-dashboard-home #createPracticeTestPage .upload-area {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.12);
}

body.app-dashboard-home #createPracticeTestPage .upload-area.drag-over {
    border-color: rgba(61, 214, 140, 0.55);
    background: rgba(61, 214, 140, 0.08);
}

body.app-dashboard-home #createPracticeTestPage .upload-placeholder p {
    color: #94a3b8;
}

/* Intent cards — depth on dark */
body.app-dashboard-home #createPracticeTestPage .intent-card {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.1);
}

body.app-dashboard-home #createPracticeTestPage .intent-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

body.app-dashboard-home #createPracticeTestPage .intent-card.selected {
    background: rgba(61, 214, 140, 0.1);
    border-color: rgba(61, 214, 140, 0.55);
}

/* Form controls focus */
body.app-dashboard-home #createPracticeTestPage .form-select:focus,
body.app-dashboard-home #createPracticeTestPage .form-input:focus,
body.app-dashboard-home #createPracticeTestPage .form-textarea:focus {
    border-color: rgba(61, 214, 140, 0.55);
    box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.15);
}

body.app-dashboard-home #createPracticeTestPage .form-textarea,
body.app-dashboard-home #createPracticeTestPage .test-translation-prefill-text {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    border-radius: 10px;
}

/* Buttons */
body.app-dashboard-home #createPracticeTestPage .btn-primary {
    background: linear-gradient(135deg, #2eb574 0%, #3dd68c 100%);
    color: #041208;
    border: none;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(61, 214, 140, 0.25);
}

body.app-dashboard-home #createPracticeTestPage .btn-primary:hover:not(:disabled) {
    filter: brightness(1.07);
}

body.app-dashboard-home #createPracticeTestPage .btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

body.app-dashboard-home #createPracticeTestPage .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

body.app-dashboard-home #createPracticeTestPage .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(61, 214, 140, 0.35);
}

/* Generation + success */
body.app-dashboard-home #createPracticeTestPage .generation-status {
    color: #94a3b8;
}

body.app-dashboard-home #createPracticeTestPage .test-generated-actions {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.app-dashboard-home #createPracticeTestPage .create-practice-test-generated-inner {
    text-align: center;
}

body.app-dashboard-home #createPracticeTestPage .create-practice-test-generated-msg {
    margin: 0 0 1.25rem;
    color: #94a3b8;
}

body.app-dashboard-home #createPracticeTestPage .loading-text {
    color: #94a3b8;
}

/* Translation prefill banner */
#createPracticeTestPage .test-translation-prefill {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(61, 214, 140, 0.25);
    background: rgba(61, 214, 140, 0.06);
}

#createPracticeTestPage .test-translation-prefill-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #e2e8f0;
}

#createPracticeTestPage .test-translation-prefill-lead {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

#createPracticeTestPage .test-translation-prefill-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

#createPracticeTestPage .test-translation-prefill-text {
    width: 100%;
    box-sizing: border-box;
    min-height: 140px;
}

/* Source tabs — five tabs wrap on small screens */
body.app-dashboard-home #createPracticeTestPage .source-tabs {
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

#createPracticeTestPage .create-practice-test-field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #e2e8f0;
}

#createPracticeTestPage .create-practice-test-link-hint {
    margin: 0.5rem 0 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.45;
}

#createPracticeTestPage .create-practice-test-paste-text {
    margin-top: 0;
}

/* Full-screen loading modal while generating (Create Practice Test step 4) */
.practice-test-generate-loading-modal {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.practice-test-generate-loading-modal.hidden {
    display: none !important;
}

.practice-test-generate-loading-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.practice-test-generate-loading-modal__panel {
    position: relative;
    max-width: 22rem;
    width: 100%;
    padding: 2rem 1.75rem;
    border-radius: 20px;
    text-align: center;
    background: linear-gradient(145deg, rgba(20, 28, 24, 0.98) 0%, rgba(8, 12, 10, 0.99) 100%);
    border: 1px solid rgba(61, 214, 140, 0.28);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 24px 64px rgba(0, 0, 0, 0.65),
        0 0 48px rgba(61, 214, 140, 0.12);
}

.practice-test-generate-loading-modal__spinner {
    margin: 0 auto 1.25rem;
    border-width: 3px;
    width: 44px;
    height: 44px;
}

.practice-test-generate-loading-modal__title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.practice-test-generate-loading-modal__msg {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.45;
}

body.practice-test-generate-modal-open {
    overflow: hidden;
}
