/* =====================================
   Dashboard: Profile Photos
   ===================================== */

.wr-profile-gallery-settings {
    margin-top: 30px;
}

.wr-profile-gallery-settings .form-group-description {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
}

.collabud-profile-gallery-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.collabud-profile-gallery-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.collabud-profile-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collabud-remove-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
}

.collabud-add-photos {
    margin-top: 5px;
}

/* =====================================
   Front-end: Desktop gallery strip
   ===================================== */

.collabud-profile-gallery {
    margin-bottom: 20px;
}

.collabud-profile-gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
}

/* Up to 3 square thumbnails (250x250 on desktop) */
.collabud-profile-thumb {
    position: relative;
    display: block;
    width: 250px;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
    flex: 0 0 auto;
}

.collabud-profile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Hover fade + slight zoom */
.collabud-profile-thumb:hover img {
    opacity: 0.86;
    transform: scale(1.02);
}

/* "+X" overlay on last thumb if more images */
.collabud-profile-thumb-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================
   Modal: full gallery grid
   ===================================== */

.collabud-profile-gallery-modal .modal-content {
    border-radius: 16px;
    overflow: hidden;
}

.collabud-profile-gallery-modal .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.collabud-profile-gallery-modal .modal-body {
    padding: 16px;
}

/* Grid of larger images */
.collabud-profile-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

/* Each image: target ~500x500 but responsive */
.collabud-profile-gallery-item-large {
    display: flex;
    align-items: center;
    justify-content: center;
}

.collabud-profile-gallery-item-large img {
    width: 500px;
    height: 500px;
    max-width: 100%;
    max-height: 70vh;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* =====================================
   Basic responsiveness for thumbs
   ===================================== */

@media (max-width: 1199px) {
    .collabud-profile-thumb {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 991px) {
    .collabud-profile-gallery-thumbs {
        gap: 8px;
    }
    .collabud-profile-thumb {
        width: 30%;
        height: 140px;
    }
}

@media (max-width: 767px) {
    .collabud-profile-gallery-thumbs {
        flex-wrap: wrap;
    }
    .collabud-profile-thumb {
        width: 48%;
        height: 140px;
    }

    .collabud-profile-gallery-modal .modal-dialog {
        margin: 20px auto;
        max-width: 95vw;
    }

    .collabud-profile-gallery-item-large img {
        height: 260px;
        width: 100%;
    }
}