/**
 * Modal & panel overlays (Drive-style)
 */
:root {
    --fc-modal-radius: 16px;
    --fc-modal-shadow: 0 4px 24px rgba(60, 64, 67, 0.18), 0 8px 48px rgba(60, 64, 67, 0.12);
    --fc-modal-header-bg: #fff;
    --fc-modal-footer-bg: #f8f9fa;
}

.modal-backdrop.show {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.fc-modal .modal-dialog {
    max-width: 420px;
}

.fc-modal.fc-modal--wide .modal-dialog,
.fc-modal.fc-modal-lg .modal-dialog {
    max-width: 560px;
}

.fc-modal .modal-content {
    border: 1px solid #e0e0e0;
    border-radius: var(--fc-modal-radius);
    box-shadow: var(--fc-modal-shadow);
    overflow: hidden;
}

.fc-modal .modal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: none;
    background: var(--fc-modal-header-bg);
}

.fc-modal .modal-header .btn-close {
    margin: 0;
    padding: 0.5rem;
    opacity: 0.55;
    flex-shrink: 0;
}

.fc-modal .modal-header .btn-close:hover {
    opacity: 0.85;
}

.fc-modal .modal-title-wrap {
    flex: 1;
    min-width: 0;
}

.fc-modal .modal-title {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
    color: #202124;
}

.fc-modal .modal-subtitle {
    font-size: 0.8125rem;
    color: #5f6368;
    margin: 0.25rem 0 0;
    word-break: break-word;
}

.fc-modal .modal-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
}

.fc-modal .modal-header-icon--primary {
    background: #e8f0fe;
    color: #1a73e8;
}

.fc-modal .modal-header-icon--folder {
    background: #fef7e0;
    color: #f9ab00;
}

.fc-modal .modal-header-icon--share {
    background: #e6f4ea;
    color: #188038;
}

.fc-modal .modal-header-icon--move {
    background: #e8f0fe;
    color: #1a73e8;
}

.fc-modal .modal-body {
    padding: 0.25rem 1.5rem 1.25rem;
    color: #202124;
}

.fc-modal .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #e8eaed;
    background: var(--fc-modal-footer-bg);
}

.fc-modal .modal-footer .btn {
    min-height: 40px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-radius: 8px;
}

.fc-modal .modal-footer .btn-primary {
    background: #1a73e8;
    border-color: #1a73e8;
}

.fc-modal .modal-footer .btn-primary:hover,
.fc-modal .modal-footer .btn-primary:focus {
    background: #1765cc;
    border-color: #1765cc;
}

.fc-modal .modal-footer .btn-outline-secondary {
    border-color: #dadce0;
    color: #3c4043;
    background: #fff;
}

.fc-modal .modal-footer .btn-outline-secondary:hover {
    background: #f1f3f4;
    border-color: #dadce0;
    color: #202124;
}

.fc-modal .form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #3c4043;
    margin-bottom: 0.35rem;
}

.fc-modal .form-control,
.fc-modal .form-select {
    border-radius: 8px;
    border-color: #dadce0;
    min-height: 44px;
    font-size: 0.9375rem;
}

.fc-modal .form-control:focus,
.fc-modal .form-select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.fc-modal .form-text {
    color: #5f6368;
    font-size: 0.75rem;
}

.fc-modal-section {
    padding: 1rem 0 0;
    margin-top: 1rem;
    border-top: 1px solid #e8eaed;
}

.fc-modal-section:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

.fc-modal-section__title {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f6368;
    margin: 0 0 0.75rem;
}

/* Upload modal */
.fc-modal .file-drop-zone {
    border: 2px dashed #dadce0;
    border-radius: 12px;
    padding: 2rem 1.25rem;
    background: #f8f9fa;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.fc-modal .file-drop-zone:hover {
    border-color: #1a73e8;
    background: #f8fbff;
}

.fc-modal .file-drop-zone.dragover {
    border-color: #1a73e8;
    background: #e8f0fe;
    box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.25);
}

.fc-modal .file-drop-zone .bi-cloud-upload {
    color: #1a73e8 !important;
}

.fc-modal .upload-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fc-modal .upload-action-bar .btn {
    flex: 1 1 auto;
    min-height: 40px;
    border-radius: 8px;
    font-weight: 500;
}

.fc-modal .upload-preview-list {
    max-height: 220px;
    padding: 0.25rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e8eaed;
}

.fc-modal .upload-preview-item {
    border-color: #e8eaed;
    background: #fff;
}

.fc-modal #uploadProgressWrap .progress {
    height: 8px;
    border-radius: 4px;
    background: #e8eaed;
}

.fc-modal #uploadProgressWrap .progress-bar {
    background: #1a73e8;
}

.fc-modal .upload-folder-alert {
    background: #fef7e0;
    border: 1px solid #fce8b2;
    border-radius: 10px;
    color: #3c4043;
}

/* Share / access modal */
.fc-modal .share-user-list {
    max-height: 200px;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    padding: 0.5rem 2rem;
    background: #f8f9fa;
}

.fc-modal .share-user-item {
    padding: 0.5rem 0.25rem;
    border-radius: 8px;
}

.fc-modal .share-user-item:hover {
    background: #fff;
}

.fc-modal .file-access-share-section[hidden] {
    display: none !important;
}

.fc-modal .input-group .form-control {
    min-height: 44px;
}

.fc-modal .input-group .btn {
    min-height: 44px;
    border-color: #dadce0;
}

/* Details offcanvas (same visual language) */
.fc-details-offcanvas {
    border-inline-start: 1px solid #e0e0e0;
    box-shadow: -4px 0 24px rgba(60, 64, 67, 0.12);
}

.fc-details-offcanvas .offcanvas-header {
    padding: 1.25rem 1.5rem;
    background: #fff;
}

.fc-details-offcanvas .offcanvas-title {
    font-weight: 500;
    font-size: 1.125rem;
}

.fc-details-offcanvas .offcanvas-body {
    padding: 1rem 1.5rem 1.5rem;
}

.fc-details-offcanvas .fc-details-list dt {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5f6368;
}

.fc-details-offcanvas .fc-details-list dd {
    color: #202124;
    margin-bottom: 1rem;
}

@media (max-width: 575.98px) {
    .fc-modal .modal-dialog {
        margin: 0.75rem;
        max-width: calc(100% - 1.5rem);
    }

    .fc-modal.fc-modal--wide .modal-dialog,
    .fc-modal.fc-modal-lg .modal-dialog {
        max-width: calc(100% - 1.5rem);
    }

    .fc-modal .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .fc-modal .modal-footer .btn {
        width: 100%;
    }

    .fc-modal .upload-action-bar .btn {
        flex: 1 1 100%;
    }
}
