﻿.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Added padding to ensure buttons fit */
}

.modal-image {
    max-width: 90vw;
    max-height: 85vh; /* Slightly reduced to accommodate buttons */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1; /* Ensure image is below buttons */
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0026ff; /* Green to match cottage rules */
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2; /* Above image */
    visibility: visible;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #0026ff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    visibility: visible;
}

    .modal-nav:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

.modal-prev {
    left: 10px; /* Moved inside modal-content */
}

.modal-next {
    right: 10px; /* Moved inside modal-content */
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 10px;
    }

    .modal-image {
        max-width: 95vw;
        max-height: 80vh; /* Adjusted for mobile */
    }

    .modal-close {
        top: 5px;
        right: 5px;
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .modal-prev {
        left: 5px;
    }

    .modal-next {
        right: 5px;
    }
}
