/* =====================================================================
   Flag presentation — crisp, larger, consistent across mega/selects/dest
   Local SVG assets stay; this only strengthens display treatment.
   ===================================================================== */

:root {
    --sl-flag-radius: 5px;
    --sl-flag-ring: 0 0 0 1.5px rgba(17, 28, 68, 0.16), 0 2px 5px rgba(17, 28, 68, 0.1);
}

/* Shared rectangular flag stamp */
.sl-flag,
.sl-drawer-flag,
.sl-dest-flag,
.sl-destpage-card-flag,
.sl-dest-tile-flag,
.sl-select-flag,
.sl-dest-country-flag img,
.sl-mega-link-media.is-flag img {
    display: block;
    flex: 0 0 auto;
    object-fit: cover;
    object-position: center;
    border-radius: var(--sl-flag-radius);
    background: #E8EEF6;
    box-shadow: var(--sl-flag-ring);
    image-rendering: auto;
}

/* Default body/chip size */
.sl-flag,
.sl-drawer-flag {
    width: 28px;
    height: 21px;
}

.sl-destpage-card-flag {
    width: 28px;
    height: 21px;
}

.sl-dest-flag {
    width: 34px;
    height: 26px;
    border-radius: 4px;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 2px 6px rgba(0, 0, 0, 0.28);
}

.sl-dest-card--featured .sl-dest-flag {
    width: 40px;
    height: 30px;
}

/* Destination explorer chips — flag fills the badge */
.sl-dest-country-flag {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 26px;
    padding: 0;
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
    box-shadow: var(--sl-flag-ring);
}

.sl-dest-country-flag img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* Mega menu — flag IS the media tile, not a stamp in ice */
.sl-mega-link-media.is-flag {
    width: 42px;
    height: 32px;
    padding: 0;
    border-radius: 7px;
    background: transparent !important;
    overflow: hidden;
    box-shadow: var(--sl-flag-ring);
}

.sl-mega-link-media.is-flag img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

.sl-mega-group.is-grid .sl-mega-link {
    grid-template-columns: 42px minmax(0, 1fr);
}

.sl-mega-link:hover .sl-mega-link-media.is-flag {
    box-shadow: 0 0 0 1.5px rgba(54, 87, 164, 0.35), 0 4px 10px rgba(17, 28, 68, 0.14);
    transform: translateY(-1px);
}

/* Selects — stronger in list + trigger */
.sl-select-flag {
    width: 32px;
    height: 24px;
    border-radius: 5px;
}

.sl-select-value .sl-select-flag {
    width: 28px;
    height: 21px;
}

.sl-select-popover.is-sheet .sl-select-flag {
    width: 36px;
    height: 27px;
}

/* Chips / meta rows */
.sl-chip .sl-flag,
.sl-meta .sl-flag {
    width: 24px;
    height: 18px;
}

@media (prefers-reduced-motion: reduce) {
    .sl-mega-link:hover .sl-mega-link-media.is-flag {
        transform: none;
    }
}
