/**
 * Veno File Manager custom CSS
 */

/* Keep media preview inside viewport in zoom modal */
#zoomview .modal-dialog {
    max-width: min(1100px, 96vw);
}

#zoomview .modal-content {
    max-height: 96vh;
}

#zoomview .modal-body {
    max-height: calc(96vh - 64px);
    overflow: hidden;
}

#zoomview .mrsoe-zoom {
    height: 100%;
    max-height: calc(96vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#zoomview .mrsoe-zoom img,
#zoomview .mrsoe-zoom video,
#zoomview .mrsoe-zoom .plyr,
#zoomview .mrsoe-zoom .plyr__video-wrapper {
    max-width: 100%;
    max-height: calc(96vh - 90px);
}

#zoomview .mrsoe-zoom img,
#zoomview .mrsoe-zoom video {
    width: auto;
    height: auto;
    object-fit: contain;
}

.icon-placeholder .video-thumb {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}

/* Profile modal redesign */
#userpanel .modal-dialog {
    max-width: 760px;
    margin: 0.75rem auto;
}

#userpanel .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(17, 24, 39, 0.22);
    max-height: calc(100vh - 1.5rem);
}

#userpanel .modal-header {
    background: linear-gradient(135deg, #1e66da 0%, #0ea5e9 100%);
    border-bottom: none;
    color: #fff;
    padding: 1rem 1rem 0.85rem;
}

#userpanel .modal-header .form-label {
    position: static !important;
    margin: 0 !important;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    letter-spacing: 0.2px;
}

#userpanel .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

#userpanel .modal-body {
    padding: 1.1rem 1rem 1rem;
    background: #f7f9fc;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

#userpanel .nav-pills {
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    padding: 0.35rem;
}

#userpanel .nav-pills .nav-link {
    border-radius: 10px;
    color: #374151;
    font-weight: 600;
    padding: 0.6rem 0.75rem;
}

#userpanel .nav-pills .nav-link.active {
    background: #1e66da;
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 102, 218, 0.25);
}

#userpanel .tab-content {
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    padding: 1rem;
}

#userpanel .form-label {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.35rem;
}

#userpanel .input-group-text {
    background: #f3f6fb;
    border-color: #dce3ef;
    color: #4b5563;
}

#userpanel .form-control,
#userpanel .form-select {
    border-color: #dce3ef;
    background: #fcfdff;
}

#userpanel .form-control:focus,
#userpanel .form-select:focus {
    border-color: #1e66da;
    box-shadow: 0 0 0 0.15rem rgba(30, 102, 218, 0.15);
}

#userpanel .avatar-panel {
    padding: 0.75rem 0 0.25rem;
}

#userpanel .select-image-btn,
#userpanel .export {
    border-radius: 10px;
    min-width: 170px;
}

#userpanel .d-grid .btn,
#userpanel .d-grid .btn-primary {
    border-radius: 10px;
    font-weight: 600;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

@media (max-width: 576px) {
    #userpanel .modal-dialog {
        margin: 0.35rem;
    }

    #userpanel .tab-content {
        padding: 0.85rem;
    }

    #userpanel .modal-content {
        max-height: calc(100vh - 0.7rem);
    }

    #userpanel .modal-body {
        max-height: calc(100vh - 120px);
    }
}
