/* Create Sub Request Modal — scoped under .create-request-modal on the root element */
.create-request-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.create-request-modal.show {
    opacity: 1;
    visibility: visible;
}

.create-request-modal .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 720px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.create-request-modal.show .modal-content {
    transform: scale(1);
}

.create-request-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.create-request-modal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
}

.create-request-modal .close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.create-request-modal .close-button:hover {
    background: #f8f9fa;
    color: #495057;
}

.create-request-modal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

.create-request-modal .modal-body > * {
    width: 100%;
    box-sizing: border-box;
}

.create-request-modal .selected-classes-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.create-request-modal .classes-list { margin-bottom: 1.5rem; }

.create-request-modal .class-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e9ecef;
}

.create-request-modal .class-item:last-child { margin-bottom: 0; }

.create-request-modal .class-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.create-request-modal .class-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.create-request-modal .class-time { font-weight: 500; }
.create-request-modal .class-location { opacity: 0.8; }

.create-request-modal .no-classes {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.create-request-modal .add-more-section {
    margin-bottom: 1.5rem;
    text-align: center;
}

.create-request-modal .actions-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.create-request-modal .actions-section .btn { width: 100%; }

.create-request-modal .reason-section {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.create-request-modal .reason-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.create-request-modal .reason-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.create-request-modal .reason-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.create-request-modal .char-count {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 0.25rem;
}

.create-request-modal .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.create-request-modal .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.create-request-modal .btn-primary { background: #007bff; color: white; }
.create-request-modal .btn-primary:hover:not(:disabled) { background: #0056b3; transform: translateY(-1px); }
.create-request-modal .btn-secondary { background: #6c757d; color: white; }
.create-request-modal .btn-secondary:hover:not(:disabled) { background: #545b62; transform: translateY(-1px); }

/* ── Desktop ───────────────────────────────────────────────── */
@media (min-width: 769px) {
    .create-request-modal {
        padding-left: 250px;
    }

    .create-request-modal .class-item {
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 1.5rem;
        align-items: start;
    }

    .create-request-modal .class-details {
        flex-direction: row;
        gap: 1.5rem;
    }

    .create-request-modal .actions-section {
        flex-direction: row;
        justify-content: flex-end;
    }

    .create-request-modal .actions-section .btn {
        width: auto;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .create-request-modal .modal-content { width: 95%; margin: 1rem; }
    .create-request-modal .modal-header { padding: 1rem 1rem 0.75rem 1rem; }
    .create-request-modal .modal-body { padding: 1rem; }
}
