.tooltip.tooltip-small {
    --bs-tooltip-font-size: 0.75rem;
}

@media (min-width: 768px) {
    .g-md-2rem  { --bs-gutter-x: 2rem; --bs-gutter-y: 2rem; }
    .px-md-2rem { padding-left: 2rem !important; padding-right: 2rem !important; }
}

/*
    MARK: Hero Section
*/



.hero-section {
    position: relative;
    width: 100%;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--theme-color-200) 0%, var(--theme-color-300) 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    /* background cover image is added directly from html */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
    z-index: 1;
}

.hero-unauthenticated .hero-overlay {
    background: rgba(0,0,0,0.75);
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12rem;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.65));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 9rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}



.hero-logo {
    max-height: 50px;
}



.hero-info {
    text-align: center;
}

.hero-title {
    font-weight: 300;
}


.hero-meta {
    display: flex;
    justify-content: center;
    column-gap: 1.5rem;
    row-gap: 0.75rem;
    flex-wrap: wrap;
}



.login-overlay {
    color: var(--bs-body-color);
    background: var(--custom-body-bg);
    padding: 1.125rem 1.5rem 1rem 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    max-width: 30rem;
    width: 100%;
}



.user-info-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}



.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    white-space: nowrap;
}










/*
    MARK: File Type Filter
*/



.file-type-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-tabs {
    display: flex;
    background: var(--bs-body-bg);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
}

.filter-tab {
    background: var(--bs-body-bg);
    border: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid var(--bs-border-color);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.filter-tab:last-child {
    border-right: none;
}

.filter-tab:hover {
    background: var(--theme-color-50);
    color: var(--theme-color-600);
}

.filter-tab.active {
    background: var(--theme-color-500);
    color: white;
}

.filter-tab.active:hover {
    background: var(--theme-color-550);
}

.filter-tab i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.filter-tab span:not(.filter-count) {
    flex-shrink: 0;
}

.filter-count {
    background: rgba(0,0,0,0.2);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.filter-tab:not(.active) .filter-count {
    background: var(--bs-secondary);
    color: white;
}

.filter-tab:not(.active):hover .filter-count {
    background: var(--theme-color-500);
}

@media (max-width: 768px) {
    .filter-tabs {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .filter-tab {
        border-right: none;
        border-bottom: 1px solid var(--bs-border-color);
        justify-content: flex-start;
        padding: 0.5rem 1rem;
    }

    .filter-tab:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .filter-tab span:not(.filter-count) {
        display: none;
    }
    
    .filter-tabs {
        flex-direction: row;
        max-width: none;
    }
    
    .filter-tab {
        border-right: 1px solid var(--bs-border-color);
        border-bottom: none;
        justify-content: center;
        padding: 0.875rem 0.5rem;
    }
    
    .filter-tab:last-child {
        border-right: none;
    }
}










/*
    MARK: Gallery Section
*/



.gallery-section {
    background: var(--custom-body-bg);
    padding: 3rem 1.5rem 4rem 1.5rem;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}



.no-files {
    text-align: center;
    padding: 5rem 1rem;
    background: var(--bs-body-bg);
    border-radius: 0.5rem;
}



.file-item-inside {
    /*height: 100%;*/
    background: var(--bs-body-bg);
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.file-item.selected .file-item-inside {
    border: 3px solid var(--bs-primary);
}

@media (min-width: 768px) {
    .file-item.selected .file-item-inside {
        border: none;
        box-shadow: 0 0 0 3px var(--bs-primary);
    }
}



/* Selection overlay - covers entire card in selection mode */
.file-selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: none;
    cursor: pointer;
}

/* Show overlay in selection mode */
.bulk-actions-navbar.active ~ .sets-nav ~ .set-section .file-selection-overlay,
.bulk-actions-navbar.active ~ .set-section .file-selection-overlay,
.bulk-actions-navbar.active ~ .masonry-row .file-selection-overlay,
.bulk-actions-navbar.active ~ .masonry-center .file-selection-overlay {
    display: block;
}

.file-selection-checkbox-container {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 20;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-selection-checkbox {
    margin-top: 0 !important;
    cursor: pointer !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    border-radius: 50% !important;
    background-color: transparent;
    background-size: 1.125rem !important;
    border-width: 2px !important;
    border-color: #fff;
}

/* Show checkbox on hover (when no items selected) */
.file-item-inside:hover .file-selection-checkbox-container {
    opacity: 1;
}

/* Show ALL checkboxes when any item is selected (selection mode) */
.bulk-actions-navbar.active ~ .sets-nav ~ .set-section .file-selection-checkbox-container,
.bulk-actions-navbar.active ~ .set-section .file-selection-checkbox-container,
.bulk-actions-navbar.active ~ .masonry-row .file-selection-checkbox-container,
.bulk-actions-navbar.active ~ .masonry-center .file-selection-checkbox-container {
    opacity: 1;
}



.file-actions-container {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.file-item-inside:hover .file-actions-container {
    opacity: 1;
}

.edit-file-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1.25rem;
    line-height: 0;
    cursor: pointer;
}

.edit-file-btn:hover {
    opacity: 0.75;
}



.file-preview {
    width: 100%;
    background: var(--bs-body-bg);
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.file-item-inside:hover .file-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3rem;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    pointer-events: none;
    z-index: 3;
}

.file-item-inside.has-top-actions:hover .file-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent);
    pointer-events: none;
    z-index: 3;
}

.file-visibility-badge {
    position: absolute;
    bottom: 0.625rem;
    left: 0.625rem;
    z-index: 4;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 0;
    background: var(--bs-dark);
    border-radius: 50%;
    color: #fff;
}

/* Bottom-right icon buttons container (share + private toggle) */
.file-preview-bottom-right {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    z-index: 20;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item-inside:hover .file-preview-bottom-right {
    opacity: 1;
}

.file-preview-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 0;
}

.file-preview-btn:hover {
    opacity: 0.75;
}

.file-preview-btn:not(.file-private-toggle) {
    font-size: 1.25rem;
}

/* Floating Bulk Actions Navbar */
.bulk-actions-navbar {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 1rem));
    max-width: 800px;
    width: calc(100% - 2rem);
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1030;
    transition: transform 0.3s ease;
    display: block;
}

.bulk-actions-navbar.active {
    transform: translateX(-50%) translateY(0);
}

/* White text and icons */
.bulk-actions-navbar,
.bulk-actions-navbar * {
    color: #ffffff !important;
}

/* Icon buttons (square) */
.bulk-actions-navbar .btn-link:not(.selection-count-btn) {
    font-size: 1.25rem;
    text-decoration: none;
    color: #ffffff !important;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.bulk-actions-navbar .btn-link:not(.selection-count-btn):hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Selection count button (flexible width) */
.bulk-actions-navbar .selection-count-btn {
    font-size: 1rem;
    text-decoration: none;
    color: #ffffff !important;
    width: auto;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 0.75rem !important;
    white-space: nowrap;
}

.bulk-actions-navbar .selection-count-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Dropdown styling */
.bulk-actions-navbar .dropdown-menu {
    margin-bottom: 0.5rem;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bulk-actions-navbar .dropdown-item {
    color: #ffffff !important;
}

.bulk-actions-navbar .dropdown-item:hover,
.bulk-actions-navbar .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.bulk-actions-navbar .dropdown-header {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .bulk-actions-navbar {
        bottom: 0.5rem;
        width: calc(100% - 1rem);
    }
}

.file-preview.audio-preview {
    background: var(--bs-body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 1.75rem 1rem;
    cursor: auto;
}

@media (min-width: 768px) {
    .file-preview.audio-preview {
        padding: 3rem 2rem 2.5rem 2rem;
    }
}

.audio-container {
    width: 100%;
    max-width: 100%;
}

.audio-waveform {
    width: 100%;
    height: 80px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.audio-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.audio-play-btn {
    background: var(--theme-color-500);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
    font-size: 1.125rem;
}

@media (min-width: 768px) {
    .audio-play-btn {
        width: 40px;
        height: 40px;
        border-radius: 40px;
        font-size: 1.375rem;
    }
}

.audio-play-btn:hover {
    background: var(--theme-color-550);
}

.audio-time {
    font-size: 0.8em;
}

@media (min-width: 768px) {
    .audio-time {
        font-size: 0.875em;
    }
}



.file-preview.video-preview {
    background: linear-gradient(135deg, rgba(var(--theme-color-300-rgb), 0.3) 0%, rgba(var(--theme-color-500-rgb), 0.3) 100%);
}

.video-thumbnail-fallback {
    width: 100%;
    height: 224px;
    background: linear-gradient(135deg, rgba(var(--theme-color-300-rgb), 0.3) 0%, rgba(var(--theme-color-500-rgb), 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 50%;
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: background 0.3s ease;
}

.play-button:hover {
    background: rgba(0,0,0,0.9);
}

/* Document Preview */
.file-preview.document-preview {
    background: linear-gradient(135deg, rgba(var(--theme-color-300-rgb), 0.2) 0%, rgba(var(--theme-color-500-rgb), 0.2) 100%);
    height: 188px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (min-width: 768px) {
    .file-preview.document-preview {
        height: 224px;
    }
}

.document-icon-large {
    font-size: 4rem;
    color: var(--theme-color-500);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.file-preview.document-preview:hover .document-icon-large {
    opacity: 1;
    transform: scale(1.1);
}

.file-info {
    padding: 1rem;
}

.file-info .file-title {
    font-size: 0.8rem;
}

.file-info .file-description {
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .file-info .file-title {
        font-size: 0.9rem;
    }

    .file-info .file-description {
        font-size: 0.8rem;
    }
}



.file-roles {
    padding: 1rem;
}

.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.role-tag {
    background: var(--custom-body-bg);
    border: 1px solid var(--bs-border-color);
    line-height: 1;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.role-tag:hover {
    background: var(--theme-color-100);
    border-color: var(--theme-color-100);
    color: black;
}

.role-tag.active {
    background: var(--theme-color-500);
    border-color: var(--theme-color-500);
    color: white;
}

.role-tag.disabled {
    pointer-events: none;
    cursor: default;
    opacity: 0.5;
}



.selection-controls {
    background: var(--bs-body-bg);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
}

.selection-controls .bulk-actions .btn {
    cursor: not-allowed;
}

.selection-controls.active .bulk-actions .btn {
    cursor: pointer;
}



.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.selection-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .selection-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.5rem;
    }
    .selection-buttons {
        justify-content: center;
    }
}



.bulk-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
    margin-top: 1rem;
}

.bulk-actions-label {
    min-width: 10rem;
    font-size: 0.875rem;
}

.bulk-actions-row .btn {
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .bulk-actions-title {
        text-align: center;
    }
    .bulk-actions-row {
        justify-content: center;
        text-align: center;
    }
    .bulk-actions-label {
        min-width: 100%;
        text-align: center;
    }
}










/*
    MARK: Lightbox
*/



.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.lightbox.active {
    display: flex;
    background: rgba(0,0,0,0.95);
}

.lightbox-content {
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 2001;
    background: rgba(0,0,0,0.5);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(0,0,0,0.75);
}

.lightbox-slideshow {
    position: absolute;
    top: 20px;
    left: 30px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 2001;
    background: rgba(0,0,0,0.5);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-slideshow:hover {
    background: rgba(0,0,0,0.75);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2001;
}

.lightbox-nav:hover {
    background: rgba(0,0,0,0.75);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

@media (max-width: 768px) {
    .lightbox {
        padding: 1rem;
    }
    .lightbox-content {
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
    }
    .lightbox-close {
        top: 10px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .lightbox-slideshow {
        top: 10px;
        left: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .lightbox-prev {
        left: 15px;
    }
    .lightbox-next {
        right: 15px;
    }
}

/* Lightbox tooltip with higher z-index */
.lightbox-tooltip {
    z-index: 2100 !important;
}



/*
    MARK: Photo Sets Navigation & Sections
*/

.sets-nav {
    background: var(--custom-body-bg);
    padding: 1rem 0;
    margin-top: -1rem;
    margin-bottom: 2rem;
    top: 0;
    z-index: 100;
    /* Full-bleed: extend to full viewport width (margin approach preserves sticky) */
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.sets-nav-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.sets-nav-item {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sets-nav-item:hover {
    background: var(--theme-color-100);
    color: var(--theme-color-700);
}

.sets-nav-item.active {
    background: var(--theme-color-500);
    color: white;
}

/* Set Section */
.set-section {
    margin-bottom: 3rem;
    scroll-margin-top: 80px;
}

.set-section:last-child {
    margin-bottom: 0;
}

.set-section-title {
    text-align: center;
    color: var(--bs-body-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sets-nav {
        padding: 0.75rem 0;
    }

    .sets-nav-container {
        gap: 0.375rem;
    }

    .sets-nav-item {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }

    .set-section {
        scroll-margin-top: 70px;
    }
}


/*
    MARK: Masonry Center (few items)
*/

@media (min-width: 768px) {
    .masonry-center[data-items="1"] { max-width: 50%; }
}
@media (min-width: 992px) {
    .masonry-center[data-items="1"] { max-width: 33.333%; }
    .masonry-center[data-items="2"] { max-width: 66.667%; }
}
@media (min-width: 1400px) {
    .masonry-center[data-items="1"] { max-width: 25%; }
    .masonry-center[data-items="2"] { max-width: 50%; }
    .masonry-center[data-items="3"] { max-width: 75%; }
}
