/* ====================================
   Preview Image Custom - Full Screen Modal
   ==================================== */

/* Modal Wrapper - Full Screen */
.preview-image-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 31;
}

.preview-image-modal-wrapper.active {
    display: flex;
}

/* Overlay Background */
.preview-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 19, 20, 0.95);
    z-index: 1;
    cursor: pointer;
}

/* Main Preview Container - Full Screen */
.preview-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   Header Section (Top)
   ==================================== */

.preview-header-section {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    background-color: #151314F2;
    position: relative;
    z-index: 10;
    gap: 16px;
}

/* Left Header Controls */
.preview-left-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Counter Section - Below Divider, Left Aligned */
.preview-counter-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    flex: 0 0 auto;
    background-color: #151314F2;
    justify-content: space-between;
}

.preview-counter-text {
    color: rgba(232, 232, 232, 0.7);
    font-size: 16px;
    font-family: Lato, sans-serif;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

/* Right Header Controls */
.preview-right-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-end;
}

/* Icon Button */
.preview-icon-button-white {
    width: 40px;
    height: 40px;
    padding: 0;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #717171;
}

.preview-icon-button-white:hover {
    background: #f0f0f0;
}

/* Contact Agent Button */
.preview-contact-agent-btn {
    padding: 10px 18px;
    background: radial-gradient(ellipse 192.31% 192.31% at 52.63% 123.08%, white 0%, #F57F20 23%, #F57F20 58%, white 100%);
    border: 1px solid rgba(245, 127, 32, 0.6);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: Lato, sans-serif;
    white-space: nowrap;
}

.preview-contact-agent-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.preview-contact-agent-icon {
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

/* Close Button */
.preview-close-icon {
    color: #717171;
    font-size: 24px;
}

.preview-close-icon:hover {
    color: rgba(255, 255, 255, 0.25);
}

/* Divider Line */
.preview-divider-line {
    height: 1px;
    background: rgba(62, 58, 57, 0.5);
    position: relative;
    z-index: 10;
    margin: 0 20px;
}

/* ====================================
   Main Image Area
   ==================================== */

.preview-image-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
    background-color: #151314F2;
}

.preview-image-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0px 20px 44px -4px rgba(0, 0, 0, 0.30);
}

/* ====================================
   Navigation Buttons (Left & Right)
   ==================================== */

.preview-nav-button {
    position: absolute;
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
    padding: 0;
    color: white;
}

.preview-nav-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.preview-nav-button:active {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.05);
}

.preview-nav-button-left {
    left: 20px;
}

.preview-nav-button-right {
    right: 20px;
}

/* Navigation Icon */
.preview-icon-small {
    width: 20px;
    height: 20px;
    position: relative;
}

.preview-icon-small-bg {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 2px;
}

.preview-icon-small-check {
    width: 5px;
    height: 9px;
    background: #717171;
    position: absolute;
    left: 7px;
    top: 5px;
    border-radius: 1px;
}

/* Counter Badges Container */
.preview-counter-badges-wrapper {
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    display: flex;
}

/* Badge Item Base Styles */
.preview-badge-item {
    padding-left: 18px;
    padding-right: 18px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-radius: 24px;
    gap: 4px;
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    cursor: pointer;
    user-select: none;
}

/* Badge Item Hover Effect */
.preview-badge-item:hover {
    opacity: 0.7;
}

/* Photos Badge - Left Aligned */
.preview-badge-item.photos {
    justify-content: flex-start;
}

/* Blueprint Badge - Center Aligned */
.preview-badge-item.blueprint {
    justify-content: center;
}

/* Active Badge State - Full opacity */
.preview-badge-item.active {
    opacity: 1;
}

/* Active Badge Hover - Maintain opacity */
.preview-badge-item.active:hover {
    opacity: 1;
}

/* Badge Text Base Styles */
.preview-badge-text {
    font-size: 16px;
    font-family: Lato;
    word-wrap: break-word;
}

/* Photos Badge Text - Default (grey when inactive) */
.preview-badge-text.photos {
    color: var(--Neutral-Grey-200, #717171);
    font-weight: 500;
    letter-spacing: 0.32px;
    transition: color 0.2s ease;
}

/* Photos Badge Text - Active (orange) */
.preview-badge-item.photos.active .preview-badge-text.photos {
    color: var(--Orange-Orange-200, #EE4733);
    font-weight: 600;
    letter-spacing: 0.32px;
}

/* Blueprint Badge Text - Default (grey when inactive) */
.preview-badge-text.blueprint {
    color: var(--Neutral-Grey-200, #717171);
    font-weight: 500;
    transition: color 0.2s ease;
}

/* Blueprint Badge Text - Active (orange same as photos) */
.preview-badge-item.blueprint.active .preview-badge-text.blueprint {
    color: var(--Orange-Orange-200, #EE4733);
    font-weight: 600;
}

/* ====================================
   Responsive
   ==================================== */

@media (max-width: 768px) {
    .preview-image-container {
        height: 100vh;
    }

    .preview-header-section {
        padding: 12px 16px;
        gap: 12px;
    }

    .preview-contact-agent-btn {
        padding: 8px 14px;
        border-radius: 20px;
        font-size: 13px;
    }

    .preview-contact-agent-text {
        font-size: 13px;
    }

    .preview-counter-text {
        font-size: 14px;
    }

    .preview-nav-button {
        width: 40px;
        height: 40px;
    }

    .preview-nav-button-left {
        left: 12px;
    }

    .preview-nav-button-right {
        right: 12px;
    }
}

@media (max-width: 480px) {
    .preview-image-content {
        padding: 12px;
    }

    .preview-left-controls {
        gap: 8px;
    }

    .preview-icon-button-white {
        width: 36px;
        height: 36px;
    }

    .preview-close-icon {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
        font-size: 16px;
    }

    .preview-header-section {
        padding: 10px 12px;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .preview-contact-agent-btn {
        padding: 8px 12px;
        font-size: 12px;
        order: 2;
    }

    .preview-counter-text {
        font-size: 13px;
    }

    .preview-nav-button {
        width: 36px;
        height: 36px;
    }
}

/* ====================================
   Make Photos Clickable
   ==================================== */

.photo-wrapper img {
    transition: all 0.2s ease;
}

.photo-wrapper img:hover {
    cursor: pointer;
    filter: brightness(0.9);
}

