/* ==========================================================================
   Text Alignment
   ========================================================================== */
   .media-box-album {
    text-align: left;
}

.media-boxes-breadcrumb {
    text-align: start;
}

.filter-category {
    text-align: start;
}

/* ==========================================================================
   Auto Photo Albums Container
   ========================================================================== */
   .auto-photo-albums {
    min-height: 600px;
    position: relative;
   }

   @media (max-width: 768px) {
    .auto-photo-albums {
        min-height: 300px;
    }
   }

/* ==========================================================================
   Auto Photo Albums Top Section Layout - UPDATED
   ========================================================================== */
.auto_photo_albums_top {
    background-color: #2020204f; /* Style similar to cm-submission-item */
    border: 1px solid #333;      /* Style similar to cm-submission-item */
    border-radius: 4px;          /* Style similar to cm-submission-item */
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Style similar to cm-submission-item */
    padding: 20px;               /* Overall internal padding */
    display: flex;
    flex-direction: column;
    /* gap: 15px; */
    margin-bottom: 20px;         /* Space below the top section */
    position: relative; /* Added for absolute positioning of children */
    width: 100%;
    /* max-width: 1105px; */
    justify-self: center;
    min-height: 177px;
}

/* Filter Checkboxes Section - Updated for Neumorphic Buttons */
.media-boxes-filter-neumorphic { /* Changed class name */
    display: flex;
    flex-direction: column; /* Categories stack vertically */
    gap: 15px; /* Space between category groups */
    width: 100%;
    /* order: 2; Removed to follow DOM order */
    align-items: center;
}

.filter-category-group {
    display: flex;
    flex-direction: column; /* Heading above buttons */
    gap: 8px; /* Space between heading and button container */
    /* margin-right: 20px; /* Not needed if categories stack */
    align-items: flex-start; /* Align heading to the left */
}

.filter-category-heading {
    /* margin: 0 10px 0 0; */
    margin: 0 0 5px 0; /* Space below heading */
    color: #ccc; /* Brighter color for heading */
    font-size: 16px; /* Slightly larger heading */
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
    padding-bottom: 3px;
    border-bottom: 1px solid #444; /* Underline for heading */
    width: 100%; /* Make heading take full width */
}

.neumorphic-buttons-container {
    display: flex;
    flex-wrap: wrap;
    /* gap: 12px; */
}

/* Neumorphic Toggle Button Styles */
.filter-neumorphic-button-wrapper label {
  position: relative;
  display: inline-block; /* Allow labels to sit side-by-side if space allows */
}

.filter-neumorphic-button-wrapper label input[type="checkbox"].filter-checkbox {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: absolute; /* Hide the actual checkbox */
  opacity: 0;
  width: 0;
  height: 0;
}

.filter-neumorphic-button-wrapper label .neumorphic-icon-button {
  position: relative;
  width: 45px; /* Slightly larger */
  height: 45px; /* Slightly larger */
  background: #2a2e3f; /* Darker base for neumorphism */
  line-height: 45px;
  text-align: center;
  margin: 0 4px;
  color: #6f6f6f; /* Default icon color (will be desaturated) */
  font-size: 20px; /* Adjust icon size as needed */
  border-radius: 50%;
  box-shadow: -2px -2px 5px rgba(255, 255, 255, 0.05), /* Softer white shadow */
              3px 3px 7px rgba(0, 0, 0, 0.5);  /* Softer dark shadow */
  transition: all 0.3s ease-in-out;
  display: flex; /* For centering icon if needed */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: grayscale(1) opacity(0.7); /* Desaturated and slightly transparent when off */
}

.filter-neumorphic-button-wrapper label .neumorphic-icon-button:hover {
  box-shadow: -2px -2px 5px rgba(255, 255, 255, 0.05),
              3px 3px 7px rgba(0, 0, 0, 0.5),
              inset -2px -2px 5px rgba(255, 255, 255, 0.03), /* Softer inset */
              inset 2px 2px 5px rgba(0, 0, 0, 0.3); /* Softer inset */
  filter: grayscale(0.5) opacity(0.85); /* Slightly less desaturated on hover */
}

.filter-neumorphic-button-wrapper label input[type="checkbox"].filter-checkbox:checked ~ .neumorphic-icon-button {
  /* color: #00fff1; /* Base color for the glow */
  box-shadow: inset -2px -2px 5px rgba(255, 255, 255, 0.05), /* Inset shadow for pressed effect */
              inset 3px 3px 7px rgba(0, 0, 0, 0.6);
  text-shadow: 0 0 8px rgba(0, 255, 241, 0.7),   /* Main glow */
               0 0 15px rgba(0, 255, 241, 0.5), /* Wider, softer glow */
               0 0 25px rgba(0, 255, 241, 0.3); /* Widest, faintest glow */
  filter: grayscale(0) opacity(1); /* Full color and opacity when on */
  color: #fff; /* Make icon white to allow text-shadow to create colored glow */
}


/* Remove old filter checkbox styles if they were very specific and might interfere */
/* For example, if you had .media-boxes-filter-checkboxes .filter-checkbox-wrapper or .media-boxes-filter-checkboxes .filter-checkbox */
.media-boxes-filter-checkboxes .filter-checkbox-wrapper,
.media-boxes-filter-checkboxes .filter-checkbox-wrapper label,
.media-boxes-filter-checkboxes .filter-checkbox-wrapper label::after,
.media-boxes-filter-checkboxes .filter-checkbox {
    /* If these were the old styles, you might want to comment them out or remove them */
    /* display: none !important; /* Or be more specific in removing them */
}


/* Mobile adjustments for neumorphic filters */
@media (max-width: 768px) {
    .media-boxes-filter-neumorphic {
        gap: 10px; /* Adjust gap for mobile */
    }
    .filter-category-heading {
        font-size: 14px;
    }
    .neumorphic-buttons-container {
        gap: 4%;
    }
    .filter-neumorphic-button-wrapper label .neumorphic-icon-button {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 18px;
    }
}

/* Search Bar - Improved layout to ensure single line */
.auto_photo_albums_top .media-boxes-search {
    position: relative;
    cursor: text;
    padding: 2px 2px;
    font-size: 16px;
    border: none;
    border-bottom: 2px solid #555;
    background-color: transparent;
    border-radius: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    order: 4;
    margin: 0 auto;
    max-width: 75%;
}

/* Make input fill available space */
.auto_photo_albums_top .media-boxes-search input {
    background-color: transparent;
    color: #ddd;
    flex: 1; /* Changed from min-width to flex: 1 to take available space */
    font-size: 16px;
    min-width: 0; /* Needed to allow flex shrinking */
    max-width: none !important;
    border: none;
    outline: none;
    padding: 5px 0;
}

/* Fixed width for icons */
.media-boxes-search .media-boxes-icon, 
.media-boxes-search .media-boxes-clear {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    height: 38px;
    width: 38px;
    flex-shrink: 0; /* Prevent icons from shrinking */
    background: transparent !important;
    color: #888 !important;
    margin-right: 4px;
}

/* Hide clear button by default and show it only when input has value */
.media-boxes-search .media-boxes-clear {
    display: none;
    cursor: pointer;
}

/* Add FontAwesome close icon */
.media-boxes-search .fa-close:before {
    content: "\f00d";
}

.media-boxes-search input:not([value=""]):not(:placeholder-shown) ~ .media-boxes-clear,
.media-boxes-search input[value]:not([value=""]) ~ .media-boxes-clear {
    display: flex;
}

/* When search gets focus */
.auto_photo_albums_top .media-boxes-search:focus-within {
    border-bottom-color: #4a89dc;
}

/* Breadcrumb and Sort container */
.breadcrumb-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    width: 100%;
}


/* Mobile styles */
@media (max-width: 768px) {
    .breadcrumb-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .media-boxes-breadcrumb {
        margin-bottom: 10px;
        order: 0 !important;
        width: 100%;
    }
}

/* ==========================================================================
   Auto Photo Albums Filters (Prefix: auto-photo-albums-filters-)
   ========================================================================== */
.auto-photo-albums-filters- {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    flex-grow: 1;
    justify-content: flex-end;
}

[class^="auto-photo-albums-filters-"] .filter-category {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: -20px;
}

[class^="auto-photo-albums-filters-"] h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
}

[class^="auto-photo-albums-filters-"] .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

[class^="auto-photo-albums-filters-"] .filter {
    display: inline-block;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
}

[class^="auto-photo-albums-filters-"] .filter:hover {
    background-color: #444;
    border-color: #666;
}

[class^="auto-photo-albums-filters-"] .filter.selected {
    background-color: #4a89dc;
    border-color: #3a79cc;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(74, 137, 220, 0.5);
    transform: translateY(-2px);
}

[class^="auto-photo-albums-filters-"] .filter.selected::before {
    content: '✓';
    margin-right: 5px;
    font-weight: bold;
}

[class^="auto-photo-albums-filters-"] .filter-category.multiple-selected .filter.selected {
    position: relative;
}

[class^="auto-photo-albums-filters-"] .filter-category.multiple-selected .filter.selected::after {
    content: '&';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

[class^="auto-photo-albums-filters-"] .filter-category.multiple-selected .filter.selected:last-of-type::after {
    display: none;
}

/* Mobile adjustments for filters */
@media (max-width: 768px) {
    [class^="auto-photo-albums-filters-"] {
        order: 2;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    [class^="auto-photo-albums-filters-"] .filter-category {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 5px;
        margin-bottom: 0;
    }
    
    [class^="auto-photo-albums-filters-"] h4 {
        margin-bottom: -5px;
    }
    
    [class^="auto-photo-albums-filters-"] .filter {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 13px;
        padding: 5px 10px;
    }
}
/* ==========================================================================
   Sort and Dropdown - UPDATED
   ========================================================================== */
.sort-dropdown-container {
    z-index: 10;  /* Ensure it's above other elements in auto_photo_albums_top */
}

.sort-button {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: transparent;
    color: #888;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 16px;
    border: none;
    padding: 0px 0px;
}

.sort-arrow-icon {
    width: 25px;
    height: 25px;
    fill: #888;  /* Default color */
    transition: fill 0.2s ease;  /* Smooth transition for the icon */
}

/* When sort-button is hovered */
.sort-button:hover,
.sort-button:focus {
    color: #ddd;  /* Text turns white */
    background-color: transparent;
}

.sort-button:hover .sort-arrow-icon {
    fill: #ddd;  /* Icon turns white */
}

.sort-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #131622;
    /* border: 1px solid #555; */
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-top: 4px;
    z-index: 1000;
    min-width: 180px;
    max-width: 200px;
    display: none;
}

@media (max-width: 768px) {
    .sort-dropdown-menu {
        min-width: 120px;
        max-width: 150px;
    }
}

.sort-option {
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    color: #ddd;
    transition: background-color 0.2s ease;
}

.sort-option:hover {
    background-color: rgba(80, 80, 80, 0.5);
}

.sort-option.selected {
    background-color: rgba(74, 137, 220, 0.3);
    color: white;
    font-weight: 600;
}

/* Mobile adjustments for top section */
@media (max-width: 768px) {
    .auto_photo_albums_top {
        flex-direction: column;
        align-items: stretch; /* Explicitly set for mobile */
        padding: 15px;
    }
    
    .breadcrumb-container {
        padding: unset;
    }
    
    .sort-dropdown-container {
        margin-left: 0;
    }
    
    .media-boxes-filter-neumorphic {
        flex-wrap: nowrap;
        overflow-x: auto;
        /* padding-bottom: 10px; */
        gap: 5px;
        width: 100%;
    }
    
    .auto_photo_albums_top .media-boxes-search {
        /* max-width: 100%; */
        margin-left: 0;
    }
}

/* ==========================================================================
   Additional Filter Container (auto-photo-albums-filters-container)
   ========================================================================== */
.auto-photo-albums-filters-container {
    margin-bottom: 20px;
}

.auto-photo-albums-filters-container .filter-category {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.auto-photo-albums-filters-container .filter {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.auto-photo-albums-filters-container .filter:hover {
    background-color: #e9e9e9;
}

.auto-photo-albums-filters-container .filter.selected {
    background-color: #4a89dc;
    border-color: #3a79cc;
    color: white;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .auto-photo-albums-filters-container .filter-category {
        gap: 6px;
    }
    
    .auto-photo-albums-filters-container .filter {
        font-size: 13px;
        padding: 5px 10px;
        margin-bottom: 5px;
    }
}

/* ==========================================================================
   General Filter Styles (auto-photo-albums-filters and filter-buttons)
   ========================================================================== */
.auto-photo-albums-filters {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.filter-category {
    margin-bottom: 12px;
}

.filter-category h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons .filter {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-buttons .filter:hover {
    background-color: #f0f0f0;
}

.filter-buttons .filter.active {
    background-color: #007bff;
    color: white;
    border-color: #0069d9;
}

/* Filter controls */
.filter-controls {
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-end;
}

.clear-all-filters {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.clear-all-filters:hover {
    background-color: #e0e0e0;
}

.filter-logic-indicator {
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* ==========================================================================
   Media Box Styling
   ========================================================================== */
.media-box {
    position: relative;
    z-index: 1;
}

.media-box:hover {
    z-index: 1000;
}

.media-box-container {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.media-box-container:hover {
    transform: scale(0.995);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.thumbnail-overlay {
    display: none !important;
}

.media-box-image {
    position: relative;
    transition: box-shadow 0.3s ease;
    border-radius: 4px;
    overflow: visible;
}

/* .media-box-image:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
} */

.media-box-image img {
    transition: transform 0.3s ease;
    transform: scale(1) !important;
}

.media-box-container:hover .media-box-image img {
    transform: scale(1) !important;
}

/* ==========================================================================
   Media Boxes Filter Styling
   ========================================================================== */
.media-boxes-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px 0;
    padding: 10px 0;
    width: 100%;
}

.media-boxes-filter-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.media-boxes-filter-link:hover {
    background-color: #444;
    border-color: #666;
    color: #fff;
    text-decoration: none;
}

.media-boxes-filter-link.selected {
    background-color: #4a89dc;
    border-color: #3a79cc;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(74, 137, 220, 0.5);
    transform: translateY(-2px);
}

.media-boxes-filter-link.selected::before {
    content: '✓';
    margin-right: 5px;
    font-weight: bold;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .media-boxes-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch;
    }
    
    .media-boxes-filter-link {
        white-space: nowrap;
        flex: 0 0 auto;
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* ==========================================================================
   Fancybox and Slider Styling
   ========================================================================== */
.fancybox__infobar,
.slideshow-speed,
.f-button {
    opacity: 0.5;
}

.slideshow-speed:hover,
.f-button:hover {
    opacity: 1;
}

/* .fancybox-image {
    scale: 75%;
} */

.fancybox__backdrop {
    background: rgb(9 9 9 / 95%);
}

.fancybox-custom-slider {
    /* Prevent the entire slider from being dragged */
    -webkit-user-drag: none;
    user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
    
    /* Prevent text selection within the slider */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Ensure the slider stays in place */
    touch-action: pan-y;
    
    /* Add explicit positioning reinforcement */
    position: absolute !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(0) !important;
    z-index: 99999;
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out !important;
    opacity: 0.5;
    width: 340px;
    transform: translateY(0);
    will-change: transform;
}

/* Collapsed state - move it down out of view */
.fancybox-custom-slider.slider-collapsed {
    transform: translateX(-50%) translateY(100px) !important;
    opacity: 0 !important; /* Make fully invisible when collapsed */
    pointer-events: none !important;
}

/* During drag operations, ensure slider stays visible */
/* .fancybox-custom-slider.is-dragging {
    transform: translateY(0) !important;
    opacity: 1 !important;
} */

/* Make sure interaction with the slider works */
.fancybox-custom-slider:hover {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
    border: none; /* Remove debug border */
}

/* Handle when fancybox is in idle state */
.fancybox__container.is-idle .fancybox-custom-slider:not(:hover) {
    animation: none !important;
    transform: translateX(-50%) translateY(100px) !important;
    pointer-events: none !important;
}

/* Show slider button styling - improve animations and transitions */
.show-slider-button {
    position: absolute !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99990 !important;
    cursor: pointer !important;
    /* Use flex for proper centering of the SVG */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Improve transition with opacity */
    opacity: 0.5 !important;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    .show-slider-button {
        opacity: 0.25 !important;
    }
}

/* When slider is visible, hide the button with a smooth transition */
.fancybox-custom-slider:not(.slider-collapsed) ~ .show-slider-button {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(20px) !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;
}

/* Set additional styles to match Fancybox navigation */
.show-slider-button.is-next-custom {
    border-radius: 50% !important;
    background: transparent !important;
    transform: translateX(-50%) !important;
}

/* Improve hover state */
.show-slider-button:hover {
    opacity: 1 !important;
    /* background-color: rgba(0, 0, 0, 0.7) !important; */
}

/* Ensure button is ALWAYS visible when slider is collapsed, regardless of idle state */
.fancybox__container.is-idle .show-slider-button.always-visible {
    opacity: 0.5 !important;
    pointer-events: auto !important;
    display: flex !important;
}

@media (max-width: 768px) {
    .fancybox__container.is-idle .show-slider-button.always-visible {
        opacity: 0.25 !important;
    }
}

/* Special handling for when button should appear even during idle */
.show-slider-button.always-visible {
    display: flex !important;
    animation: none !important;
}

/* Ensure SVG looks correct */
.show-slider-button svg {
    width: 30px;
    height: 30px;
    stroke: #fff;
    stroke-width: 1;
    fill: none;
}

/* Remove debug styling */
.slider-debug-indicator {
    display: none !important;
}

/* Allow specific interactions on the slider handle and track */
.fancybox-slider-handle,
.fancybox-slider-track,
.fancybox-slider-track input {
    /* These elements should still be interactive */
    touch-action: none;
    cursor: pointer;
}

/* Ensure handle remains draggable */
.fancybox-slider-handle {
    cursor: grab;
}

.fancybox-slider-track {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 5px;
    cursor: pointer;
    width: 300px;
}

/* Tick marks using cleaner approach */
.fancybox-slider-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.4) 0px,
        rgba(255, 255, 255, 0.4) 1px,
        transparent 1px,
        transparent var(--tick-spacing, 33.33%)
    );
    background-position: 0 0;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 1;
}

/* For 2 slides case, show only start and end ticks */
.fancybox-slider-track.few-slides::before {
    background-image: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0.4) 0px,
        rgba(255, 255, 255, 0.4) 1px,
        transparent 1px,
        transparent calc(100% - 1px),
        rgba(255, 255, 255, 0.4) calc(100% - 1px),
        rgba(255, 255, 255, 0.4) 100%
    );
}

/* Hide tick marks completely when there are many slides */
.fancybox-slider-track.no-ticks::before {
    display: none;
}

.fancybox-slider-handle {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 30px;
    background: white;
    border-radius: 33%;
    transform: translate(-50%, -50%);
    cursor: grab;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

/* Create an invisible larger hit area around the handle */
.fancybox-slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 30px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 4;
}

.fancybox-slider-track input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 4;
}

.fancybox-slider-label {
    display: none;
}

.fancybox__container.is-idle .fancybox-custom-slider {
    animation: .15s ease-out both f-fadeOut;
    pointer-events: none;
}

.fancybox__container[data-carousel-page-count="1"] .fancybox-custom-slider {
    display: none;
}

/* Hide slider for fewer than 4 images */
.fancybox__container[data-carousel-page-count="1"],
.fancybox__container[data-carousel-page-count="2"],
.fancybox__container[data-carousel-page-count="3"] {
    .fancybox-custom-slider {
        display: none;
    }
}

/* Apply consistent scaling and pointer events to Fancybox content (images and videos) */
.fancybox__content {
    pointer-events: none !important; /* Container is not interactive */
    /* Fancybox will set width/height on contentEl based on media dimensions (JS helps for video AR) */
    /* Explicit width/height/min-width/min-height here are removed to let Fancybox/AR define size before scaling */
    /* scale: 75%; */
    background: transparent !important; /* Make background transparent */
    max-width: 100vw !important; /* Never larger than viewport width */
    max-height: 100vh !important; /* Never larger than viewport height */
    overflow: visible !important; /* Don't clip content */
    padding: 0 !important;
}

/* Prevent scrollbars on slide and carousel elements */
.fancybox__slide {
    overflow: visible !important; /* Change from auto to visible to prevent scrollbars */
    overscroll-behavior: none !important; /* Prevent scroll chaining */
}

.fancybox__carousel {
    overflow: hidden !important; /* Ensure no scrollbars at carousel level */
}

/* Ensure the media element (image or video) is interactive and sized appropriately */
.fancybox-image,
.fancybox__html5video {
    pointer-events: all !important; /* Media itself is interactive */
    display: block; /* Consistent block display */
    max-width: 100% !important; /* Never larger than parent container */
    max-height: 100vh !important; /* Never larger than viewport height */
    object-fit: contain !important; /* Maintain aspect ratio without overflow */
}

.fancybox-image {
    width: unset !important; /* Original: Allows image to use its intrinsic width within the content box */
    height: auto; /* Complement to width: unset */
}

.fancybox__html5video {
    width: 100% !important; /* Video fills its content box */
    height: 100% !important; /* Video fills its content box */
}

/* Mobile adjustments for slider and content scaling */
@media (max-width: 1024px) {
    .fancybox__content { /* Apply to videos too */
        scale: 100%; /* No scaling on smaller screens */
    }
}

/* Ensure image slides have transparent background and proper sizing */
.fancybox__slide.has-image > .fancybox__content,
.fancybox__slide[data-type="video"] > .fancybox__content {
    background: transparent !important;
    padding: 0 !important;
    overflow: visible !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
}

/* Fix for video specific issues */
.fancybox__slide[data-type="video"] {
    overflow: hidden !important; /* Prevent scrollbars specifically for video slides */
}

/* More specific targeting for HTML5 video content */
.has-html5video .fancybox__content {
    overflow: hidden !important;
    width: auto !important; /* Let the content size determine width */
    height: auto !important; /* Let the content size determine height */
    max-width: min(100vw, 960px) !important; /* Limit width to viewport or 960px */
    max-height: min(100vh, 540px) !important; /* Limit height to viewport or 540px */
    aspect-ratio: 16/9; /* Maintain standard video aspect ratio */
}

/* Ensure HTML5 video container is properly sized */
.fancybox__html5video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Fix for when the aspect ratio changes - prevent scrollbars */
.fancybox__container {
    overflow: hidden !important;
}

/* Better handling for window resize */
@media (orientation: portrait) {
    .has-html5video .fancybox__content {
        max-width: 100vw !important;
        max-height: calc(100vw * 9/16) !important; /* Maintain 16:9 ratio based on width */
    }
}

@media (orientation: landscape) {
    .has-html5video .fancybox__content {
        max-height: 100vh !important;
        max-width: calc(100vh * 16/9) !important; /* Maintain 16:9 ratio based on height */
    }
}

/* Ensure track doesn't cause horizontal overflow */
.fancybox__track {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    align-items: center !important;
}

/* Fix viewport to ensure it doesn't cause scrolling */
.fancybox__viewport {
    overflow: hidden !important;
}

/* Ensure content stays centered and properly sized */
.fancybox__slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important; /* Remove any margin that might cause overflow */
}

/* Fix for different aspect ratios affecting scaling */
.fancybox__slide.has-image {
    overflow: hidden !important; /* Override the visible setting for image slides */
}

/* Ensure image content maintains aspect ratio without scrollbars */
.fancybox__slide.has-image > .fancybox__content {
    max-width: min(100vw, 1200px) !important;
    max-height: min(100vh, 900px) !important;
    aspect-ratio: auto !important; /* Let the image determine the aspect ratio */
    transform-origin: center center !important; /* Ensure scaling happens from center */
}

/* Style tweaks to prevent scroll on any device/browser */
/* html.with-fancybox,
html.with-fancybox body {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
} */

/* Fix video interaction issues - prevent click-through that closes modal */
.has-html5video .fancybox__content,
.has-youtube .fancybox__content,
.has-vimeo .fancybox__content {
    pointer-events: auto !important; /* Override the none setting to allow interaction */
    position: relative !important;
    z-index: 30 !important; /* Ensure higher z-index than backdrop */
}

/* Make video elements interactive */
.fancybox__html5video,
iframe.fancybox__iframe {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 31 !important; /* Higher than content */
}

/* Make slide content capture clicks for videos */
.fancybox__slide.has-html5video,
.fancybox__slide.has-youtube,
.fancybox__slide.has-vimeo {
    pointer-events: auto !important;
}

/* Ensure backdrop clicks still close the modal but content clicks don't */
.fancybox__backdrop {
    pointer-events: auto !important; /* Allow backdrop clicks to close */
}

/* For videos, make content click-proof */
.has-html5video .fancybox__content::before,
.has-youtube .fancybox__content::before,
.has-vimeo .fancybox__content::before {
    display: none !important; /* Remove any overlay elements that might intercept clicks */
}

/* Target the video container specifically to prevent click-through */
.fancybox__slide.has-html5video > .fancybox__content,
.fancybox__slide.has-youtube > .fancybox__content,
.fancybox__slide.has-vimeo > .fancybox__content {
    cursor: auto !important; /* Override any cursor settings that might suggest clickability */
}

/* Add a transparent layer over the backdrop but under the content */
.fancybox__container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2; /* Above backdrop, below content */
    pointer-events: none; /* Let clicks through to backdrop by default */
}

/* When a video is active, change the pointer-events behavior */
.fancybox__container:has(.has-html5video),
.fancybox__container:has(.has-youtube),
.fancybox__container:has(.has-vimeo) {
    /* Special handling for browsers that support :has() */
}

/* Since :has() isn't supported everywhere, add these classes via JavaScript */
.fancybox__container.has-video-content::after {
    pointer-events: auto; /* Capture clicks outside video */
}

/* Override default fancybox click behavior for videos */
.can-zoom_in .fancybox__content,
.can-zoom_out .fancybox__content,
.is-draggable .fancybox__content {
    cursor: auto !important; /* Don't show zoom cursor on videos */
}

/* Fix for HTML5 video specifically */
.fancybox__slide.has-html5video video {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 32 !important;
}

/* Stop propagation for all video slides - direct solution for click issue */
.fancybox__slide.has-html5video,
.fancybox__slide.has-youtube,
.fancybox__slide.has-vimeo {
    user-select: auto !important; /* Allow text selection inside videos */
}

/* Create a click capture layer to prevent clicks from reaching backdrop */
.fancybox__slide.has-html5video::before,
.fancybox__slide.has-youtube::before,
.fancybox__slide.has-vimeo::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Above backdrop but below content */
    pointer-events: auto !important; /* Capture clicks */
}

/* Ensure content itself is above the click capture layer */
.fancybox__slide.has-html5video > .fancybox__content,
.fancybox__slide.has-youtube > .fancybox__content,
.fancybox__slide.has-vimeo > .fancybox__content {
    position: relative !important;
    z-index: 2 !important; /* Above the click capture layer */
}

/* Ensure video element is clickable and above everything */
.fancybox__html5video,
iframe.fancybox__iframe {
    position: relative !important;
    z-index: 3 !important; /* Above content */
    pointer-events: auto !important; /* Ensure it receives clicks */
}

/* Fixed positioning for video content to ensure it's isolated from backdrop clicks */
.has-html5video .fancybox__content,
.has-youtube .fancybox__content,
.has-vimeo .fancybox__content {
    position: relative !important;
    isolation: isolate !important; /* Create a new stacking context */
}

/* Most direct solution - override the click event handling for videos */
.fancybox__container .fancybox__slide.has-html5video,
.fancybox__container .fancybox__slide.has-youtube,
.fancybox__container .fancybox__slide.has-vimeo {
    cursor: default !important;
}

/* Ensure the slide itself doesn't have a click handler for videos */
.fancybox__slide.has-html5video,
.fancybox__slide.has-youtube,
.fancybox__slide.has-vimeo {
    cursor: auto !important;
}

/* Add a high z-index container for video to ensure clicks stay within the video */
.fancybox__slide.has-html5video::after,
.fancybox__slide.has-youtube::after,
.fancybox__slide.has-vimeo::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 80px); /* Leave some margin for clicking outside to close */
    height: calc(100% - 80px);
    transform: translate(-50%, -50%);
    z-index: 20; /* High enough to be above most elements but below content */
    pointer-events: none; /* Let clicks through to content */
}

/* Give video content the highest z-index to ensure it's interactive */
.fancybox__slide.has-html5video .fancybox__content,
.fancybox__slide.has-youtube .fancybox__content,
.fancybox__slide.has-vimeo .fancybox__content {
    z-index: 30 !important;
    pointer-events: auto !important;
}

/* Make videos fully interactive */
video.fancybox__html5video,
iframe.fancybox__iframe {
    z-index: 31 !important;
    pointer-events: auto !important;
}

/* Remove focus outline on video elements */
.fancybox__html5video:focus-visible,
.fancybox__html5video:focus,
video:focus-visible,
video:focus,
iframe.fancybox__iframe:focus-visible,
iframe.fancybox__iframe:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

@media (max-width: 600px) {
    .fancybox-custom-slider {
        width: 280px;
    }
}

/* ==========================================================================
   Miscellaneous Styles
   ========================================================================== */
/* .tags-content {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px;
    z-index: 10;
} */

.media-boxes-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.filtering-isotope:after {
    content: 'Filtering...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 9999;
}

html.with-fancybox::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari and Opera */
}

/* .media-boxes-load-more-button {
    display: none !important;
} */

.media-boxes-no-more-entries {
    opacity: 0 !important;
}

.badge-separator {
    margin: 0 5px;
    display: inline-block;
    vertical-align: middle;
    font-weight: normal;
    opacity: 0.5;
}

.hidden-badge {
    display: none !important;
}

.hidden-media-boxes-by-filter {
    z-index: 0 !important;
}

/* ==========================================================================
   Filter Checkboxes - Updated to match portfolio style
   ========================================================================== */
.media-boxes-filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
    background-color: transparent;
    padding: 0;
    width: 100%;
}

/* Style the filter category groups like pp-filter */
.filter-category-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-right: 20px;
    align-items: center;
}

/* Hide original category headings */
.media-boxes-filter-checkboxes .filter-category-heading {
    margin: 0 10px 0 0;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Style checkboxes to be invisible but functional */
.media-boxes-filter-checkboxes .filter-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Style checkbox wrappers to look like portfolio filter items */
.media-boxes-filter-checkboxes .filter-checkbox-wrapper {
    margin: 0;
    display: inline-block;
    background-color: transparent;
    border: none;
    padding: 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Style labels to match portfolio-pro filters */
.media-boxes-filter-checkboxes .filter-checkbox-wrapper label {
    display: inline-block;
    padding: 8px 12px;
    margin: 0;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: all 0.3s ease;
}

/* Create the underline effect that only shows when active */
.media-boxes-filter-checkboxes .filter-checkbox-wrapper label::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #4a89dc;
    transition: all 0.3s ease;
}

/* Hover state - ONLY change text color */
.media-boxes-filter-checkboxes .filter-checkbox-wrapper:hover label {
    color: #fff;
}

/* Don't show underline on hover, only on checked/active state */
.media-boxes-filter-checkboxes .filter-checkbox-wrapper:hover label::after {
    width: 0;
    left: 50%;
}

/* Checked/active state - show text highlight AND underline */
.media-boxes-filter-checkboxes .filter-checkbox:checked + label {
    color: #fff;
    font-weight: 700;
}

.media-boxes-filter-checkboxes .filter-checkbox:checked + label::after {
    width: 100%;
    left: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .media-boxes-filter-checkboxes {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .filter-category-group {
        flex-wrap: nowrap;
        margin-right: 15px;
    }
    
    .media-boxes-filter-checkboxes .filter-checkbox-wrapper label {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Complete hiding of checkboxes with label::before */
.media-boxes-filter-checkboxes .filter-checkbox-wrapper input[type="checkbox"] {
    display: none; /* Completely hide the checkbox */
}

/* Optional: if you want to style the checkbox area with a custom element */
.media-boxes-filter-checkboxes .filter-checkbox-wrapper label::before {
    content: '';
    display: none; /* Hide any default checkbox styling */
}

/* Improved fade animation for show-slider-button */
.fancybox__container.is-closing .show-slider-button {
    animation: .15s ease-out both f-fadeOut !important;
    pointer-events: none !important;
    transition: none !important; /* Override any competing transitions */
    opacity: 0 !important;
}

/* More specific selector to target the button */
.fancybox__container.is-closing [data-fancybox-show-slider] {
    animation: .15s ease-out both f-fadeOut !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity .15s ease-out, visibility .15s ease-out !important;
}

/* Ensure the button doesn't suddenly disappear */
.fancybox__container.is-animated [data-fancybox-show-slider] {
    animation: .15s ease-out both f-fadeOut !important;
}

/* Fix any opacity transitions that might be competing */
.show-slider-button {
    will-change: opacity, transform;
}


/* Improved overlay wrapper */
.overlay-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* Make sure the media-box-image maintains its original display properties */
.media-box-image {
    position: relative;
    overflow: visible;
}

/* Update the overlay positioning for better centering */
.album-permission-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    text-align: center;
    padding: 15px;
    box-sizing: border-box;
    margin: 0;
    cursor: default;
    overflow-x: hidden;
    overflow-y: auto;
}

.album-permission-overlay h3 {
    color: white;
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: normal;
}

.album-permission-overlay p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: normal;
}


.upgrade-membership-button {
    cursor: pointer;
    position: relative;
    padding: 10px 24px;
    font-size: 18px;
    color: #FFD700;
    border: 2px solid #FFD700;
    border-radius: 10px;
    background-color: transparent;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    overflow: hidden;
    text-transform: uppercase;
    min-height: 40px;
  }
  
  .upgrade-membership-button::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 50px;
    height: 50px;
    border-radius: inherit;
    scale: 0;
    z-index: -1;
    background-color: #FFD700;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  }
  
  .upgrade-membership-button:hover::before {
    scale: 3;
  }
  
  .upgrade-membership-button:hover {
    color: #212121;
    scale: 1.1;
    box-shadow: 0 0px 20px rgba(193, 163, 98,0.4);
  }
  
  .upgrade-membership-button:active {
    scale: 1;
  }
  

/* Add a close button style */
.overlay-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    color: white;
    font-size: 26px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1001;
    opacity: 0.7; /* Make slightly more visible initially */
}

.overlay-close-button:hover {
    /* background: rgba(0, 0, 0, 0.8); */
    transform: scale(1.1);
    opacity: 1;
}

/* Style the badge container in the overlay */
.overlay-badge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Make badges larger in the overlay */
.overlay-badge-container .album-badge {
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: rgba(255, 255, 255, 0.1); */
    border-radius: 50%;
    padding: 5px;
    transition: transform 0.2s ease;
}

/* Add a hover effect */
/* .overlay-badge-container .album-badge:hover {
    transform: scale(1.1);
} */

/* Style specific role badges */
.overlay-badge-container .flirtation-badge {
    color: #8bc34a; /* Green */
}

.overlay-badge-container .passion-badge {
    color: #ffc107; /* Yellow */
}

.overlay-badge-container .obsession-badge {
    color: #ff5722; /* Orange/Red */
}

/* Ensure the paragraph above badges has the right spacing */
.album-permission-overlay p {
    margin-bottom: 10px;
}

.download-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.download-message {
    font-size: 18px;
    font-weight: bold;
}


.rate-limit-message h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 18px;
    text-transform: uppercase;
}

.rate-limit-message p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    font-size: 14px;
}

.close-message-button {
    font-size: 16px;
    padding: 6px 20px;
    background-color: transparent;
    color: #ff6b6b;
    text-decoration: none;
    border: 2px solid #ff6b6b;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.close-message-button:hover {
    background-color: rgba(255, 107, 107, 0.1);
    color: #FFF;
    border-color: #FFF;
    transform: scale(1.05);
}

/* Album-specific loading overlay */
.album-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.album-loading-overlay .download-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
    margin-bottom: 10px;
}

.album-loading-overlay .download-message {
    font-size: 14px;
    text-align: center;
    padding: 0 10px;
}

/* Rate limit overlay */
.rate-limit-overlay h3 {
    color: #ff6b6b;
    font-size: 16px;
    margin-bottom: 10px;
}

.rate-limit-overlay p {
    font-size: 12px;
    margin-bottom: 15px;
}

.rate-limit-overlay .close-message-button {
    font-size: 14px;
    padding: 5px 15px;
}

/* ==========================================================================
   Fancybox Title Styling - Enhanced with Subtitle
   ========================================================================== */
.fancybox-title {
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    padding: 3px 10px 0px 10px;
    /* margin-right: 15px; */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50vw;
    display: block !important;
    order: -1;
    position: relative;
    z-index: 3;
    opacity: 0.9 !important;
}

/* Subtitle styling */
.fancybox-subtitle {
    color: #fff;
    font-size: 16px;
    font-weight: 300;
    position: absolute !important;
    top: 65%;
    left: 10px;
    display: block !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50vw;
    opacity: 0.6;
    z-index: 2;
}

/* Make infobar float below title and subtitle */
.fancybox__infobar {
    position: absolute !important;
    top: 90%;
    left: 1px;
    display: block !important;
    margin-top: 0px;
    font-size: 16px;
    opacity: 0.5;
    z-index: 1;
    background: none !important;
}

/* Ensure title is visible in the toolbar */
.fancybox__toolbar__column.is-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    position: relative; /* For absolute positioning of children */
    min-height: auto !important; /* Remove fixed height */
    padding-bottom: 5px; /* Small padding at bottom */
}

/* Force visibility of the title */
.fancybox__container .fancybox-title,
.fancybox__container .fancybox-subtitle {
    visibility: visible !important;
}

/* Ensure toolbar doesn't expand */
.fancybox__toolbar {
    min-height: auto !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .fancybox-title {
        font-size: 16px;
        max-width: 42vw;
    }
    
    .fancybox-subtitle {
        font-size: 14px;
        top: 55%;
        max-width: 42vw;
    }
    
    .fancybox__infobar {
        font-size: 14px;
        top: 70%;
        left: 0;
    }
}

@media (max-width: 768px) {
    .auto_photo_albums_top {
        flex-direction: column; 
        align-items: stretch; /* Stretch items to full width */
    }
    /* .breadcrumb-container,
    .sort-dropdown-container,
    .auto_photo_albums_top .media-boxes-search {
        width: 100%;
    } */
}

/* YouTube and Vimeo specific fixes */
.has-youtube .fancybox__content,
.has-vimeo .fancybox__content {
    overflow: hidden !important;
    width: auto !important;
    height: auto !important;
    max-width: min(100vw, 960px) !important;
    max-height: min(100vh, 540px) !important;
    aspect-ratio: 16/9;
}

/* Fix iframe scaling to prevent scrollbars */
iframe.fancybox__iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    background: transparent !important;
}

/* General fix for all embedded content types */
.has-iframe .fancybox__content,
.has-map .fancybox__content,
.has-pdf .fancybox__content,
.has-youtube .fancybox__content,
.has-vimeo .fancybox__content,
.has-html5video .fancybox__content {
    overflow: hidden !important;
    max-width: min(calc(100vw - 20px), 960px) !important; /* Account for margins */
    max-height: min(calc(100vh - 80px), 540px) !important; /* Account for toolbar/UI */
}

/* Responsive adjustments for embedded content */
@media (max-width: 768px) {
    .has-iframe .fancybox__content,
    .has-map .fancybox__content,
    .has-pdf .fancybox__content,
    .has-youtube .fancybox__content,
    .has-vimeo .fancybox__content,
    .has-html5video .fancybox__content {
        width: 100% !important;
        height: auto !important;
        max-width: 100vw !important;
        max-height: calc(100vw * 9/16) !important;
    }
}

/* Ensure track doesn't cause horizontal overflow */
.fancybox__track {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}


.fancybox__container.has-video-content video {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 15 !important;
}

/* Allow backdrop to be clickable to close the modal */
.fancybox__container.has-video-content .fancybox__backdrop {
    cursor: pointer;
}

/* Remove the wrapper that was catching clicks */
.fancybox__container.has-video-content .fancybox__slide::before {
    content: none;
}

/* Make video controls accessible */
.fancybox-video::-webkit-media-controls {
    z-index: 50 !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Fix for focusing the video element */
.fancybox-video:focus {
    outline: none !important;
}

/* Fix aspect ratio and sizing for videos */
.fancybox__container.has-video-content .fancybox__content {
    max-width: min(100vw, 1200px) !important;
    max-height: min(100vh, 900px) !important;
    aspect-ratio: auto !important;
    transform-origin: center center !important;
    margin: auto !important;
    padding: 0 !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Match the styling to image slides for consistency */
.fancybox__container.has-video-content .fancybox__slide > .fancybox__content {
    position: relative !important;
    margin: auto !important;
}

/* Fix accessibility focus issues during modal close */
.fancybox__container.is-closing {
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.fancybox__container.is-closing .fancybox-video,
.fancybox__container.is-closing .fancybox-video-container,
.fancybox__container.is-closing .fancybox__content,
.fancybox__container.is-closing * {
    pointer-events: none !important;
    visibility: visible !important;
    transition: none !important;
}

/* Remove tabindex from elements during close to prevent focus issues */
.fancybox__container.is-closing [tabindex] {
    tabindex: -1 !important;
}

/* Fix for IE/Edge focus handling */
.fancybox__container.is-closing:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    pointer-events: none;
}

/* Allow backdrop to be clickable to close the modal */
.fancybox__container.has-video-content .fancybox__backdrop {
    cursor: pointer;
}

/* Fix for focusing the video element */
.fancybox-video:focus {
    outline: none !important;
}

/* Fix accessibility focus issues during modal close */
.fancybox__container.is-closing {
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.fancybox__container.is-closing .fancybox-video,
.fancybox__container.is-closing .fancybox-video-container,
.fancybox__container.is-closing .fancybox__content,
.fancybox__container.is-closing * {
    pointer-events: none !important;
    visibility: visible !important;
    transition: none !important;
}

/* Fix video slide vertical alignment issues - force proper centering */
.fancybox__container.has-video-content .fancybox__carousel,
.fancybox__container.has-video-content .fancybox__viewport,
.fancybox__container.has-video-content .fancybox__track {
    display: flex !important;
    align-items: center !important;
    /* justify-content: center !important; */
    height: 100% !important;
    width: 100% !important;
    overflow: visible !important;
    position: relative !important;
}

/* Reset any internal structure that might be causing divisions */
.fancybox__container.has-video-content .fancybox__slide {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    max-height: 100vh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

/* Force absolute positioning for perfect centering */
.fancybox__container.has-video-content .fancybox__content {
    position: absolute !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: min(100vw - 40px, 1200px) !important;
    max-height: min(100vh - 120px, 900px) !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Ensure the video itself is centered */
.fancybox-video {
    position: relative !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: auto !important;
    display: block !important;
}

/* Fix for internal structure that might be creating "split" appearance */
.fancybox__slide::before,
.fancybox__slide::after {
    content: none !important;
    display: none !important;
}

/* Enhance panzoom behavior for videos */
.fancybox__container.has-video-content .fancybox__content {
    cursor: grab !important;
}

.fancybox__container.has-video-content .fancybox__content:active {
    cursor: grabbing !important;
}

/* Better contrast for zoom button */
.f-button[data-fancybox-zoom] svg {
    stroke: white;
    stroke-width: 1.5;
    fill: none;
}

/* Show zoom level indicator */
.fancybox__container.has-video-content::after {
    content: attr(data-scale);
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.fancybox__container.has-video-content.is-zooming::after {
    opacity: 1;
}

/* Enhance drag-to-close behavior for videos */
.fancybox__container.has-video-content .f-spinner {
    display: none;
}

/* Set proper cursor for content that can be dragged to close */
.fancybox__container.has-video-content .fancybox__content {
    cursor: auto !important;
}

/* Show visual feedback during vertical drag-to-close */
.fancybox__container.is-dragging .fancybox__backdrop {
    opacity: 0.7 !important;
}

/* Ensure video container doesn't block drag events */
.fancybox-video-container {
    pointer-events: none !important;
}

/* But keep the video itself interactive */
.fancybox-video {
    pointer-events: auto !important;
    user-select: none !important; /* Prevent text selection during drag */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    
    /* Add a subtle visual indicator that the video can be dragged */
    cursor: move !important; /* Fallback */
    cursor: grab !important;
}

/* Change cursor during active dragging */
.fancybox-video:active {
    cursor: grabbing !important;
}

/* Don't interfere with video controls at the bottom */
.fancybox-video::-webkit-media-controls-panel {
    pointer-events: auto !important;
    cursor: auto !important;
}

/* Make sure dragging works properly on mobile */
@media (pointer: coarse) {
    .fancybox-video {
        touch-action: none !important; /* Disable browser's native touch actions */
    }
    
    /* But enable scrolling for the video controls */
    .fancybox-video::-webkit-media-controls-panel {
        touch-action: auto !important;
    }
}

/* Remove any lingering zoom-related styles */
.fancybox__container.has-video-content::after {
    display: none;
}

.fancybox__container.has-video-content.is-zooming::after {
    display: none;
}

/* Video drag glass overlay */
.video-drag-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 85%;
    background-color: rgba(255, 0, 0, 0.1); /* Make visible for testing */
    border: 2px dashed rgba(255, 0, 0, 0.5); /* Make visible for testing */
    z-index: 10; 
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto !important;
}

.video-drag-glass:active {
    cursor: grabbing;
}

/* Make sure videos don't trap pointer events completely */
.fancybox__container.has-video-content video {
    pointer-events: auto !important;
    touch-action: none;
}

/* Improve dragging on the container */
.fancybox__container.has-video-content .fancybox__carousel {
    touch-action: pan-y;
}

.fancybox__container.has-video-content .fancybox__slide {
    touch-action: pan-y;
}

/* Fix videos that might be affected by position */
.fancybox-video-container {
    position: relative;
    z-index: 1;
}

/* Video debug overlay */
.video-debug-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 85%;
    background-color: rgba(255, 0, 0, 0.1);
    border: 2px dashed rgba(255, 0, 0, 0.5);
    pointer-events: none;
    z-index: 9999;
}

/* Make the video element draggable */
.fancybox__container.has-video-content video {
    cursor: grab;
}

.fancybox__container.has-video-content video:active {
    cursor: grabbing;
}

/* Controls container layout */
.controls-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    clear: both;
}

/* Override any float properties that might interfere */
.auto_photo_albums_top .controls-container * {
    box-sizing: border-box;
}

/* Search in controls container */
.controls-container .media-boxes-search {
    flex: 1;
    float: none !important;
    min-width: 200px !important;
    max-width: 100%;
    margin: 0 !important;
    position: relative;
    display: flex;
    order: 0;
}

/* Sort dropdown in controls container */
.controls-container .sort-dropdown-container {
    margin: 16px -10px 0px 6px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    order: 1;
    width: 75px;
}

/* Ensure the sort button is visible */
.controls-container .sort-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    white-space: nowrap;
}

/* When both elements are present, adjust widths */
.controls-container.has-sort-dropdown .media-boxes-search {
    max-width: 100%;
}

/* Ensure breadcrumb is always above controls */
.auto_photo_albums_top {
    display: flex;
    flex-direction: column;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .controls-container {
        flex-direction: row; /* Keep as row on mobile */
        align-items: center;
    }
    
    .controls-container .sort-dropdown-container {
        flex: 0 0 auto; /* Don't expand, just fit content */
    }
    
    .controls-container .media-boxes-search {
        flex: 1; /* Take remaining space */
    }
    
    /* Make the sort button smaller on mobile */
    .controls-container .sort-button {
        min-width: 70px;
        padding: 6px 8px;
        font-size: 14px;
    }
    
    /* Adjust search input for mobile */
    .controls-container .media-boxes-search input {
        font-size: 14px;
        padding: 6px 30px 6px 10px;
    }
}


/* Style for the no-results message */
.no-results-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    margin: 20px auto;
    max-width: 80%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .no-results-message {
        margin: 15px auto;
        padding: 15px;
        font-size: 14px;
        max-width: 95%;
    }
}

/* Back button styles */
.back-directory-button {
    font-family: "Inter", Sans-serif;
    background-color: #4f4744;
    border: none;
    /* border-radius: 4px; */
    padding: 4px 10px;
    margin-right: 15px;
    /* margin-bottom: 10px; */
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    color: #ebf6ff;
    transition: all 0.3s ease;
    order: 1;
    position: absolute;
    left: 15px;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 0 20px #000;
    filter: drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.5)) drop-shadow(-1px 0px 0px rgba(0, 0, 0, 0.5)) drop-shadow(1px 0px 0px rgba(0, 0, 0, 0.5)) drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.5)) drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.8));
}

.back-directory-button:hover {
    background-color: #65534c
}

.back-directory-button .fa {
    margin-right: 5px;
}

/* Adjust the breadcrumb to grow within the container */
.media-boxes-breadcrumb {
    display: flex;
    align-items: center;
    order: 2; /* Force to be second */
    justify-content: center;
}

@media (max-width: 768px) {
    .back-directory-button {
        position: relative;
        left: unset;
    }
}

/* Prevent mobile tap highlight on filter buttons */
.new-filter-button,
.filter-checkbox,
.filter-button-wrapper,
.new-filter-label,
.new-filter-checkbox-input {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
}

/* Also add to parent containers to be thorough */
.neumorphic-buttons-container,
.new-filter-style-container,
.media-boxes-filter-neumorphic {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Add this at the end of the file */

/* Styling for SVG file badges */
.album-badge .badge-icon-image {
    width: 100%;
    max-width: 30px !important;
    /* height: 100%; */
    /* max-height: 30px; */
    display: block;
    /* margin: 0 auto; */
    filter: drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.5)) drop-shadow(-1px 0px 0px rgba(0, 0, 0, 0.5)) drop-shadow(1px 0px 0px rgba(0, 0, 0, 0.5)) drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.5)) drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.8));
}

/* Role badges with SVG files */
.album-badge.role-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Special formatting for the badges in the admin preview */
.icon-preview img {
    max-width: 32px;
    max-height: 32px;
    display: block;
}

/* Make sure SVGs render properly in Firefox */
.badge-icon-image {
    width: 100%;
    max-width: 30px !important;
    height: 100%;
    filter: drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.5)) drop-shadow(-1px 0px 0px rgba(0, 0, 0, 0.5)) drop-shadow(1px 0px 0px rgba(0, 0, 0, 0.5)) drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.5)) drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.8));
    user-select: none;
}

.preview-album-button.apa-button-secondary {
    /* Style for the preview button - make it distinct from unlock */
    background-color: #555; /* Example: Grey background */
    color: #fff;
    border: 2px solid #777;
}

.preview-album-button.apa-button-secondary:hover {
    background-color: #666;
    border-color: #888;
}

/* Adjust spacing if both buttons are present */
.album-permission-overlay .upgrade-membership-button + .preview-album-button,
.fullscreen-permission-overlay .upgrade-membership-button + .preview-album-button {
    margin-top: 20px;
    opacity: 0.9;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    order: 3;
}

/* Styles for membership links in permission overlays (moved from JS) */
.membership-link-container {
    margin-top: 10px; /* Consistent margin-top from jquery.autoPhotoAlbums.js */
    font-size: 14px;
    color: #8c8c8c;
    opacity: 0.7;
}

.membership-link-container a {
    color: #a0a0a0;
    text-decoration: underline;
    position: relative;
    z-index: 2;
    padding: 5px 0; /* 5px top/bottom padding, 0 left/right */
    cursor: pointer;
    pointer-events: auto;
}

/* Specific style for links in fullscreen permission overlay */
.membership-link-container a {
    font-weight: bold;
}

/* Mobile styles for album permission overlay */
@media (max-width: 600px) {
    .album-permission-overlay {
        padding: 10px;
    }

    .album-permission-overlay h3 {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .album-permission-overlay p {
        font-size: 12px;
        margin-bottom: 3px;
        text-wrap-mode: nowrap;
    }

    .album-permission-overlay .overlay-badge-container {
        gap: 8px;
        margin-bottom: 9px;
    }

    .album-permission-overlay .overlay-badge-container .album-badge {
        font-size: 1.3em;
        width: 35px;
        height: 35px;
    }

    .album-permission-overlay .upgrade-membership-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .album-permission-overlay .upgrade-membership-button + .preview-album-button,
    .fullscreen-permission-overlay .upgrade-membership-button + .preview-album-button {
        margin-top: 8px;
        padding: 3px 8px;
        font-size: 0.8rem;
        line-height: 1rem;
    }

    .overlay-close-button {
        top: 5px;
        right: 5px;
        width: 25px;
        height: 25px;
        font-size: 22px;
        line-height: 22px;
    }

    /* Responsive styles for membership links */
    .album-permission-overlay .membership-link-container,
    .fullscreen-permission-overlay .membership-link-container {
        margin-top: 8px;
        font-size: 11px;
    }

    .album-permission-overlay .membership-link-container a,
    .fullscreen-permission-overlay .membership-link-container a {
        padding: 4px 0;
    }
}

/* Preview Upgrade Message Styles */
.preview-upgrade-message {
    font-family: "Inter", Sans-serif;
    position: relative;
    padding: 20px;
    margin-top: -180px;
    text-align: center;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow: hidden;
    isolation: isolate;
    z-index: 1000;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) calc(100% - 70px), rgba(0, 0, 0, 0) 90%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) calc(100% - 70px), rgba(0, 0, 0, 0) 90%);
}


.preview-upgrade-message::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5800px;
    height: 4300px;
    background: radial-gradient(rgba(255, 255, 100, 0.09) 0%, rgba(0, 0, 0, 0) 4%);
    z-index: -1;
    pointer-events: none;
    overflow: visible !important;
}

.preview-upgrade-message h3 {
    font-family: "Inter", Sans-serif;
    margin-top: 50px;
    margin-bottom: 5px;
    font-size: 1.3em;
    color: #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 0 20px #000;
}

.preview-upgrade-message .overlay-badge-container {
    margin-bottom: 10px; /* More space below badges */
    justify-content: center;
    /* Styles for badges inside this container are inherited from .overlay-badge-container .album-badge */
}

.preview-upgrade-message .upgrade-membership-button {
    /* Styles are inherited, ensure it stands out */
    /* Consider adding display: inline-block if not already set by inherited styles */
    display: inline-block;
}

@media (max-width: 768px) {
    /* .preview-upgrade-message {
        padding: 20px 15px;
        margin-top: 15px;
        margin-bottom: 15px;
    } */

    .preview-upgrade-message h3 {
        font-size: 1.15em; /* Adjust heading size for mobile */
        margin-bottom: 15px;
    }

    .preview-upgrade-message .overlay-badge-container {
        margin-bottom: 10px;
        /* Adjust badge sizes or gap if necessary for mobile within .overlay-badge-container .album-badge */
    }
}

/* Bottom fade effect for Preview directories - container fades to transparency */
.auto-photo-albums.in-preview-directory .mediaboxes_auto-photo-albums,
.auto-photo-albums.in-preview-directory [class^="mediaboxes_"] {
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, 
    rgba(0, 0, 0, 1) calc(100% - 250px), 
    rgba(0, 0, 0, 0) 85%);
    mask-image: linear-gradient(to bottom, 
    rgba(0, 0, 0, 1) calc(100% - 250px), 
    rgba(0, 0, 0, 0) 85%);
}

/* Position container properly */
.auto-photo-albums.in-preview-directory {
    position: relative;
}

/* Remove the overlay approach */
.auto-photo-albums.in-preview-directory::after {
    display: none;
}

/* Ensure the preview message isn't affected by the mask since it's outside the mediaboxes container */
.auto-photo-albums.in-preview-directory .preview-upgrade-message {
    position: relative;
    z-index: 1001;
    margin-bottom: 0;
}

/* Hide no-results message when visible media boxes (filtered) exist in the sibling container */
.auto-photo-albums:has(.media-boxes-container .visible-media-boxes-by-filter) > .no-results-message {
    display: none !important;
}

/* Hide .no-results-message if its parent .media-boxes-container also has a .visible-media-boxes-by-filter child */
.media-boxes-container:has(> .media-box.visible-media-boxes-by-filter) > .no-results-message {
    display: none !important;
}

.clear-all-apa-filters-search-button {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: #555;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.clear-all-apa-filters-search-button:hover {
    background-color: #666;
    border-color: #777;
}

/* From Uiverse.io by andrew-demchenk0 */ 
.download-current-dir-button.button {
    position: absolute;
    right: 15px;
    width: 150px;
    height: 30.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border: 1px solid #17795E;
    background-color: #209978;
    overflow: hidden;
    border-radius: 5px;
    padding: 0;
    filter: drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.5)) drop-shadow(-1px 0px 0px rgba(0, 0, 0, 0.5)) drop-shadow(1px 0px 0px rgba(0, 0, 0, 0.5)) drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.5)) drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.8));
}

.download-current-dir-button.button, 
.download-current-dir-button.button .button__icon, 
.download-current-dir-button.button .button__text {
  transition: all 0.3s;
}

.download-current-dir-button.button .button__text {
    font-family: "Inter", Sans-serif;
    transform: translateX(6px);
    color: #fff;
    font-weight: 400;
    font-size: 15px;
    text-shadow: 1px 1px 0 #00000075, -1px -1px 0 #00000075, 1px -1px 0 #00000075, -1px 1px 0 #00000075, 0 0 20px #00000075;
}

.download-current-dir-button.button .button__icon {
  position: absolute;
  transform: translateX(108px);
  height: 100%;
  width: 39px;
  background-color: #17795E;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-current-dir-button.button .svg {
    width: 20px;
    fill: #fff;
    filter: drop-shadow(1px 1px 0px rgba(8, 44, 34, 0.3)) drop-shadow(-1px 0px 0px rgba(8, 44, 34, 0.3)) drop-shadow(1px 0px 0px rgba(8, 44, 34, 0.3)) drop-shadow(0px 1px 0px rgba(8, 44, 34, 0.5)) drop-shadow(0px 0px 2px rgba(8, 44, 34, 0.3));
}

.download-current-dir-button.button:hover {
  background: #17795E;
}

.download-current-dir-button.button:hover .button__text {
  color: transparent;
}

.download-current-dir-button.button:hover .button__icon {
  width: 148px; /* Adjusted for 150px total width - 1px borders */
  transform: translateX(0);
}

.download-current-dir-button.button:active .button__icon {
  background-color: #146c54;
}

.download-current-dir-button.button:active {
  border: 1px solid #146c54;
}

/* Remove or comment out old styles for .download-current-dir-button */
/*
.download-current-dir-button {
    background-color: #5cb85c;
    color: white;
    border: none;
    padding: 8px 12px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 10px; 
}

.download-current-dir-button:hover {
    background-color: #4cae4c;
}

.download-current-dir-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.download-current-dir-button .fa {
    margin-right: 5px;
}
*/

@media (max-width: 768px) {
    .download-current-dir-button.button {
        min-width: 40px; /* Ensure icon is visible */
        top: 46px;
    }

    .auto_photo_albums_top {
        flex-direction: column; 
        align-items: stretch; /* Stretch items to full width */
    }
    /* .breadcrumb-container,
    .sort-dropdown-container,
    .auto_photo_albums_top .media-boxes-search {
        width: 100%;
    } */
}

.apa-main-loader {
    z-index: 1000;
}
