/* My Gallery Slider */
.mygallery-slider-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mygallery-slider-overlay[ng-show="true"] {
    opacity: 1;
    visibility: visible;
}

.mygallery-slider {
    position: fixed;
    top: 0;
    right: -700px;
    width: 550px;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    overflow-y: auto;
    direction: rtl;
}

.mygallery-slider.show {
    right: 0;
}

/* Header */
.mygallery-slider .slider-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mygallery-slider .slider-header h3 {
    margin: 0;
    font-size: 21px;
    color: #333;
}

.mygallery-slider .close-btn {
    cursor: pointer;
    font-size: 24px;
    color: #666;
    transition: color 0.2s;
}

.mygallery-slider .close-btn:hover {
    color: #333;
}

/* Upload Area */
.mygallery-slider .upload-area {
    margin: 20px 10px 0;
    padding: 12px;
    border: 1px dashed #0d84b2;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.mygallery-slider .upload-area:hover {
    background: #e9ecef;
    border-color: #0a6a94;
}

.mygallery-slider .upload-area i {
    font-size: 34px;
    color: #0d84b2;
    display: block;
    margin-bottom: 1px;
}

.mygallery-slider .upload-area p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* Content */
.mygallery-slider .slider-content {
    padding: 20px;
}

.mygallery-slider .slider-content h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

/* Gallery Structure */
.mygallery-slider .badge-gallery {
    width: 100%;
}

.mygallery-slider .badge-gallery > ol {
    display: flex;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.mygallery-slider .badge-gallery > ol > li {
    flex: 1;
    list-style: none;
}

.mygallery-slider .badge-gallery > ol > li > ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.mygallery-slider .badge-gallery > ol > li > ul > li {
    list-style: none;
    margin-bottom: 15px;
}

/* Badge Item */
.mygallery-slider .badge-gallery li.badge {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f0f0f0;
}

.mygallery-slider .badge-gallery li.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mygallery-slider .badge-gallery li.badge img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mygallery-slider .badge-gallery li.badge img.fade {
    opacity: 1;
}

.mygallery-slider .badge-gallery li.badge img.blurContrastImg {
    filter: blur(2px) brightness(0.7);
}

/* Overlay */
.mygallery-slider .badge-gallery li.badge .ol {
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Action Icons */
.mygallery-slider .badge-gallery li.badge span.bcg,
.mygallery-slider .badge-gallery li.badge span.trash {
    position: absolute;
    top: 10px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
}

.mygallery-slider .badge-gallery li.badge span.bcg:hover,
.mygallery-slider .badge-gallery li.badge span.trash:hover {

    transform: scale(1.1);
}

.mygallery-slider .badge-gallery li.badge span.bcg {
    left: 10px;
}

.mygallery-slider .badge-gallery li.badge span.bcg i {
    color: #0d84b2;
    font-size: 18px;
}

.mygallery-slider .badge-gallery li.badge span.trash {
    right: 10px;
}

.mygallery-slider .badge-gallery li.badge span.trash i {
    color: #FFFFFF;
    font-size: 18px;
}

/* Pin and Time Info */
.mygallery-slider .badge-gallery li.badge p {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    margin: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mygallery-slider .badge-gallery li.badge p span.pin {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mygallery-slider .badge-gallery li.badge p span.pin:hover {
    transform: scale(1.1);
}

.mygallery-slider .badge-gallery li.badge p span.pin i {
    color: #FFFFFF;
    font-size: 24px;
}

.mygallery-slider .badge-gallery li.badge p span.pin i.fa-slash {
    position: absolute;
    font-size: 20px;
    margin-right: -21px;
    margin-top: 3px;
}

.mygallery-slider .badge-gallery li.badge p span.time {
    color: #fff;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Empty and Loading States */
.mygallery-slider .no-badges,
.mygallery-slider .loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.mygallery-slider .loading p {
    margin: 0;
}

/* Helper Classes */
.p-abs {
    position: absolute;
}

.hw100 {
    height: 100%;
    width: 100%;
}

/* Skeleton Loading Effect */
.mygallery-slider .skeleton-gallery {
    margin-top: 20px;
}

.mygallery-slider .skeleton-item {
    list-style: none;
    margin-bottom: 15px;
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.mygallery-slider .skeleton-box {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.mygallery-slider .skeleton-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.5) 50%,
            transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mygallery-slider {
        width: 100%;
        right: -100%;
    }

    .mygallery-slider.show {
        right: 0;
    }
}

/* ===================================
   Gallery Frame - Business Profile Display
   =================================== */

/* Business Profile: Override slider styles for inline display */
.business-profile .mygallery-frame {
    position: relative;
    width: 100%;
    background: transparent;
    box-shadow: none;
    height: auto;
    overflow: visible;
}

.business-profile .mygallery-frame .slider-header {
    display: none; /* Hide header in business profile */
}

/* Main container uses flexbox for reordering */
.business-profile .mygallery-frame .slider-content {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Upload Area - First Item via order */
.business-profile .mygallery-frame .upload-area {
    position: relative;
    width: 172px; /* 4 columns with gap */
    /* aspect-ratio: 1 / 1; */ /* Square aspect ratio */
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    margin: 0;
    padding: 66px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    order: -1;
    flex-shrink: 0;
    padding: 27px;
    height: 172px;
    text-align: center;
}

.business-profile .mygallery-frame .upload-area:hover {
    background: #f0f4ff;
    border-color: #4e8fc7;
}

.business-profile .mygallery-frame .upload-area i {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6b7280;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin: 0;
}

.business-profile .mygallery-frame .upload-area:hover i {
    background: #4e8fc7;
    color: #ffffff;
    transform: scale(1.1);
}

.business-profile .mygallery-frame .upload-area p {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: color 0.3s ease;
    margin: 0;
    white-space: nowrap;
}

.business-profile .mygallery-frame .upload-area:hover p {
    color: #4e8fc7;
}

/* Hide no-badges and loading messages */
.business-profile .mygallery-frame .no-badges,
.business-profile .mygallery-frame .loading {
    display: none;
}

/* Badge Gallery - Flatten to flex items */
.business-profile .mygallery-frame .badge-gallery {
    display: contents;
}

.business-profile .mygallery-frame .badge-gallery > ol {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: right;
}

.business-profile .mygallery-frame .badge-gallery > ol > li {
    display: inline-block;
    margin: 0;
    padding: 0;
    width: 23%;
    vertical-align: top;
    margin-left: 10px;
}

.business-profile .mygallery-frame .badge-gallery > ol > li > ul {
    display: contents;
}

.business-profile .mygallery-frame .badge-gallery > ol > li > ul > li {
    list-style: none;
    margin: 0;
    padding: 0;
    width: calc(25% - 9px); /* 4 columns with gap */
    flex-shrink: 0;
}

/* Badge Items - Gallery Images */
.business-profile .mygallery-frame .badge-gallery li.badge {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 0; /* Remove extra space below image */
    margin-bottom: 15px;
}

.business-profile .mygallery-frame .badge-gallery li.badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.business-profile .mygallery-frame .badge-gallery li.badge img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    vertical-align: top;
}

/* Overlay for actions */
.business-profile .mygallery-frame .badge-gallery li.badge .ol {
    background: rgba(0, 0, 0, 0.4);
}

/* Trash button styling */
.business-profile .mygallery-frame .badge-gallery li.badge span.trash {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(231, 76, 60, 0.95);
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.business-profile .mygallery-frame .badge-gallery li.badge span.trash:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.business-profile .mygallery-frame .badge-gallery li.badge span.trash i {
    color: white;
    font-size: 14px;
}

/* Skeleton Loading for Images */
.business-profile .mygallery-frame .badge-gallery .skeleton-item {
    position: relative;
    width: 100% !important;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    padding: 0;
    margin: 0;
}

.business-profile .mygallery-frame .badge-gallery .skeleton-item .skeleton-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Square aspect ratio */
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
}

.business-profile .mygallery-frame .badge-gallery .skeleton-item .skeleton-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
    background-size: 200% 100%;
    animation: shimmer-slide 1.5s ease-in-out infinite;
}

@keyframes shimmer-slide {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive Layout */
@media (max-width: 1200px) {
    .business-profile .mygallery-frame .upload-area {
        width: calc(33.333% - 8px); /* 3 columns */
    }

    .business-profile .mygallery-frame .badge-gallery > ol > li > ul > li {
        width: calc(33.333% - 8px); /* 3 columns */
    }
}

@media (max-width: 768px) {
    .business-profile .mygallery-frame .slider-content {
        gap: 8px;
    }

    .business-profile .mygallery-frame .upload-area {
        width: calc(50% - 4px); /* 2 columns */
    }

    .business-profile .mygallery-frame .badge-gallery > ol > li > ul > li {
        width: calc(50% - 4px); /* 2 columns */
    }

    .business-profile .mygallery-frame .upload-area i {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .business-profile .mygallery-frame .upload-area p {
        font-size: 12px;
    }

    .business-profile .mygallery-frame .badge-gallery li.badge span.trash {
        width: 28px;
        height: 28px;
    }

    .business-profile .mygallery-frame .badge-gallery li.badge span.trash i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .business-profile .mygallery-frame .slider-content {
        gap: 6px;
    }

    .business-profile .mygallery-frame .upload-area {
        width: calc(50% - 3px); /* 2 columns */
    }

    .business-profile .mygallery-frame .badge-gallery > ol > li > ul > li {
        width: calc(50% - 3px); /* 2 columns */
    }
}
