/* Instructor Modal — scoped under .instructor-modal on the root element */
.instructor-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;
}

.instructor-modal.visible {
    opacity: 1;
    visibility: visible;
}

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

.instructor-modal.visible .modal-content {
    transform: scale(1);
}

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

.instructor-modal .modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.instructor-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.instructor-modal .modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.instructor-modal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

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

.instructor-modal .info-section {
    margin-bottom: 2rem;
}

.instructor-modal .info-section:last-child {
    margin-bottom: 0;
}

.instructor-modal .info-section h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.instructor-modal .form-group {
    margin-bottom: 1rem;
}

.instructor-modal .form-group label {
    display: block;
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.instructor-modal .form-group.notification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.instructor-modal .form-group.notification-row:last-child {
    border-bottom: none;
}

.instructor-modal .form-group.notification-row > label {
    margin-bottom: 0;
    color: #6c757d;
    min-width: 120px;
}

.instructor-modal .form-group.notification-row .toggle-label {
    margin-bottom: 0;
}

.instructor-modal .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.instructor-modal .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.instructor-modal .info-value {
    color: #333;
    font-weight: 500;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    display: block;
}

.instructor-modal .checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructor-modal .checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.instructor-modal .checkbox-group label {
    margin: 0;
    cursor: pointer;
}

.instructor-modal .search-box {
    margin-bottom: 1rem;
}

.instructor-modal .search-box .form-control {
    padding-left: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a8.97 8.97 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 16px;
}

.instructor-modal .class-types-list,
.instructor-modal .locations-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
}

.instructor-modal .staff-documents-list-modal {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
    overflow: visible;
}

.instructor-modal .class-type-item,
.instructor-modal .location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.instructor-modal .class-type-item:last-child,
.instructor-modal .location-item:last-child,
.instructor-modal .staff-document-card-modal:last-child {
    border-bottom: none;
}

.instructor-modal .class-type-item:hover,
.instructor-modal .location-item:hover,
.instructor-modal .staff-document-card-modal:hover {
    background: #e9ecef;
}

.instructor-modal .class-type-name,
.instructor-modal .location-name {
    color: #333;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.instructor-modal .staff-document-card-modal {
    gap: 0.25rem;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.instructor-modal .staff-document-card-modal .file-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.instructor-modal .staff-document-card-modal .staff-document-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.instructor-modal .staff-document-card-modal .staff-document-label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.instructor-modal .staff-document-card-modal .staff-document-meta {
    display: none;
}

.instructor-modal .staff-document-card-modal.menu-open {
    position: relative;
    z-index: 10;
}

.instructor-modal .staff-document-actions {
    margin-left: auto;
    margin-right: -0.5rem;
    flex-shrink: 0;
}

.instructor-modal .more-options-wrapper {
    position: relative;
    z-index: 100;
    display: flex;
}

.instructor-modal .more-options-wrapper > .btn-secondary {
    background: transparent;
    color: #333;
    border: none;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    border-radius: 6px;
    transform: none;
    box-shadow: none;
    margin-right: 0;
}

.instructor-modal .more-options-wrapper > .btn-secondary:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
    color: #555;
}

.instructor-modal .more-options-wrapper > .btn-secondary:focus,
.instructor-modal .more-options-wrapper > .btn-secondary:active {
    outline: none;
    box-shadow: none;
    transform: none;
}

.instructor-modal .doc-options-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    min-width: 120px;
    overflow: hidden;
}

.instructor-modal .doc-options-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    color: #333;
    font-family: inherit;
}

.instructor-modal .doc-options-menu button:hover {
    background: #f5f5f5;
}

.instructor-modal .doc-options-menu button.danger {
    color: #e53e3e;
}

.instructor-modal .doc-options-menu button.danger:hover {
    background: #fee;
}

.instructor-modal .toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.instructor-modal .toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.instructor-modal .toggle-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background: #ced4da;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.instructor-modal .toggle-label:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.instructor-modal .toggle-switch input[type="checkbox"]:checked + .toggle-label {
    background: #667eea;
}

.instructor-modal .toggle-switch input[type="checkbox"]:checked + .toggle-label:before {
    transform: translateX(26px);
}

.instructor-modal .bulk-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}


.instructor-modal .btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
}

.instructor-modal .loading-message {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.instructor-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    flex-shrink: 0;
}

.instructor-modal .footer-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.instructor-modal .footer-buttons .btn {
    min-width: 120px;
    flex: 0 0 auto;
}

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

@media (max-width: 768px) {
    .instructor-modal {
        align-items: flex-start;
        padding: 20px 0 80px 0;
    }

    .instructor-modal .modal-content {
        width: 95%;
        max-height: calc(100vh - 100px);
        margin: 0 auto;
    }

    .instructor-modal .modal-header,
    .instructor-modal .modal-body,
    .instructor-modal .modal-footer {
        padding: 1rem;
    }

    .instructor-modal .modal-body {
        max-height: calc(100vh - 240px);
        overflow-y: auto;
    }

    .instructor-modal .bulk-actions {
        flex-direction: column;
    }

    .instructor-modal .class-types-list,
    .instructor-modal .locations-list {
        max-height: 200px;
    }
}

/* ── Document Upload Form Overlay ── */

.doc-upload-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.doc-upload-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.doc-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.doc-upload-header h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.doc-upload-form .form-group {
    margin-bottom: 14px;
}

.doc-upload-form .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #374151;
}

.doc-upload-form .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.doc-upload-form .file-name {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ── Dropzone in Upload Form ── */

.doc-upload-form .upload-dropzone {
    text-align: center;
    margin-bottom: 14px;
}

.doc-upload-form .file-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.doc-upload-form .dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 14px;
    border: 2px dashed #667eea;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.doc-upload-form .dropzone-label:hover {
    background: rgba(102, 126, 234, 0.04);
    border-color: #5a6fd8;
}

.doc-upload-form .dropzone-icon {
    width: 26px;
    height: 26px;
    color: #667eea;
}

.doc-upload-form .dropzone-browse-btn {
    display: inline-block;
    padding: 5px 20px;
    background: #667eea;
    color: white;
    border-radius: 16px;
    font-size: 0.82rem;
    font-weight: 500;
}

.doc-upload-form .dropzone-hint {
    color: #9ca3af;
    font-size: 0.78rem;
}

.doc-upload-form .dropzone-supported {
    color: #667eea;
    font-size: 0.72rem;
    font-weight: 500;
    margin: 6px 0 0 0;
}

/* ── Renewal Date & Notify Toggle in Upload Form ── */

/* Renewal row: always stacked vertically with toggle inline */
.doc-upload-form .renewal-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 14px;
}

.doc-upload-form .renewal-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.instructor-modal .doc-upload-form .notify-toggle-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}

.doc-upload-form .renewal-row input[type="date"].form-input {
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
}

.doc-upload-form .renewal-row input[type="date"].form-input::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.instructor-modal .doc-upload-form .notify-toggle-group > .toggle-switch {
    display: flex;
    align-items: center;
}

.instructor-modal .doc-upload-form .notify-toggle-group .toggle-label {
    display: inline-block;
    margin-bottom: 0;
}

.doc-upload-form .notify-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.instructor-modal .doc-upload-form .notify-label-row > label {
    display: inline;
    margin: 0;
}

.doc-upload-form .notify-info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease;
}

.doc-upload-form .notify-info-icon:hover {
    color: #667eea;
}

.doc-upload-form .notify-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -8px;
    background: #f0f1f3;
    color: #333;
    font-size: 0.75rem;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 6px;
    width: 200px;
    z-index: 100;
    pointer-events: none;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.doc-upload-form .notify-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border: 5px solid transparent;
    border-top-color: #f0f1f3;
}


