/* ==========================================================================
   Image Components
   ========================================================================== */

/* Drink Images */
.drink-main-image {
    max-width: 400px;
    max-height: 400px;
    cursor: pointer;
}

/* Smaller image variant for list/card contexts */
.drink-main-image--list {
    max-width: 160px;
    max-height: 160px;
}

.drink-thumbnail {
    max-width: 80px;
    max-height: 80px;
    cursor: pointer;
}

.drink-thumbnail-full {
    max-width: 400px;
    max-height: 400px;
}

/* Placeholder image styles */
.drink-placeholder {
    background-color: var(--color-neutral-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Drink Image Slot — universal persistent wrapper (A+B+C refactor)
   The wrapper div stays in the DOM forever; only its innerHTML is swapped.
   Size is controlled by the modifier class; JS needs no context detection.
   ========================================================================== */
.drink-img-slot {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f2f6fb;
    border: 1px solid rgba(10, 30, 70, 0.06);
    border-radius: 10px;
    box-sizing: border-box;
}

/* Drink can image inside the slot */
.drink-img-slot > img:not([alt="DrinkInTheWeeds"]) {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* DIW logo inside no-photo state */
.drink-img-slot > img[alt="DrinkInTheWeeds"] {
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.75;
}

/* "Photo coming soon" diagonal overlay text */
.drink-img-slot > p {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    white-space: nowrap;
    margin: 0;
    font-weight: 700;
    font-style: normal;
    color: #fff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    pointer-events: none;
}

/* ── Size modifiers ──────────────────────────────────────────────── */

/* List/menu drink card (~160×160) */
.drink-img-slot--card { width: 100%; aspect-ratio: 1 / 1; max-width: 160px; max-height: 160px; }
.drink-img-slot--card > img[alt="DrinkInTheWeeds"] { max-height: 80px; }
.drink-img-slot--card > p { font-size: 0.85rem; }

/* Small card column (100px wide) — slot fills the full height of the image-link container */
.drink-img-slot--small {
    width: 100px;
    height: 100%;
    min-height: 110px;
    border: none;          /* card's image-link owns the left edge */
    border-radius: 0;      /* card's border-radius handles corners */
}
.drink-img-slot--small > img:not([alt="DrinkInTheWeeds"]) {
    width: 100%;
    height: 100%;
    min-height: 110px;
    object-fit: cover;     /* cover fills the tall narrow slot like the old __image rule */
}
.drink-img-slot--small > img[alt="DrinkInTheWeeds"] { max-height: 50px; }
.drink-img-slot--small > p { font-size: 0.58rem; }

/* Match the 88px width used by .small-drink-card__image-link at narrow viewports */
@media (max-width: 579px) {
    .drink-img-slot--small {
        width: 88px;
        min-height: 90px;
    }
    .drink-img-slot--small > img:not([alt="DrinkInTheWeeds"]) {
        min-height: 90px;
    }
}

/* Drink details page — large carousel slot; fills .carousel-item which is 100% of carousel-inner */
.drink-img-slot--details {
    width: 100%;
    height: 100%;          /* fill the carousel-item / carousel-inner height */
    min-height: 240px;
    border-radius: 10px;
    border: none;          /* carousel owns the border */
}
.drink-img-slot--details > img:not([alt="DrinkInTheWeeds"]) {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.drink-img-slot--details > img[alt="DrinkInTheWeeds"] { max-height: 80px; }
.drink-img-slot--details > p { font-size: 0.85rem; }

/* Drink details page — 64×64 thumbnail strip */
.drink-img-slot--thumb { width: 60px; height: 60px; border-radius: 8px; padding: 4px; gap: 2px; }
.drink-img-slot--thumb > img[alt="DrinkInTheWeeds"] { max-height: 28px; }
.drink-img-slot--thumb > p { font-size: 0.42rem; }

/* Mini slot — review feed, wishlist (~60×60) */
.drink-img-slot--mini { width: 60px; min-height: 60px; border-radius: 8px; }
.drink-img-slot--mini > img[alt="DrinkInTheWeeds"] { max-height: 36px; }
.drink-img-slot--mini > p { font-size: 0.5rem; }
