/* Overlay background */
.download-size-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* darker overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* ensure it's above LightGallery */
}

/* Modern vertical layout box */
.download-size-box.with-image {
    display: flex;
    flex-direction: column;
    max-width: 450px;
    max-height: 90vh;
    background: #000; /* dark background */
    border: 1px solid #ced4da;
    color: #20c997; /* green text */
    overflow: hidden; /* ensures image stays inside */
    position: relative; /* for close button */
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

/* Top image section */
.download-size-image {
    flex: 0 0 auto;
    padding: 0;
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.download-size-image img {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center top;
}

.download-size-image img:hover {
    transform: none;
}

/* Bottom content section (size options) */
.download-size-content {
    flex: 1;
    padding: 30px;
    box-sizing: border-box;
    text-align: left;
}

/* Title */
.download-size-title {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #20c997; /* brighter green */
}

/* Size option buttons - modern style */
.download-size-content .size-option {
    border: 1px solid #20c997;
    display: block;
    padding: 12px 16px;
    background-color: transparent;
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    margin: 8px 0;
    border-radius: 6px;
    font-weight: 500;
    text-align: left;
    width: 100%;
}

.download-size-content .size-option:hover {
    background: #20c997; /* bright green hover */
    cursor: pointer;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 201, 151, 0.3);
}

/* Credit styling - elegant bottom section */
.download-size-cancel-wrap {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.download-size-cancel-wrap p {
    margin: 0;
    font-size: 13px;
    color: #aaa;
    text-align: center;
    font-style: italic;
}

.download-size-cancel-wrap strong {
    color: #20c997;
    font-style: normal;
}

/* Close button */
.close-overlay-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    font-size: 20px;
    color: #20c997; /* match the green accent */
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    padding: 8px;
    user-select: none;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.close-overlay-btn:hover {
    background: black;
}

.close-overlay-btn:focus {
    outline: none;
}