/* ============================================================
   Domain Visibility & Switcher – Frontend Styles
   ============================================================ */

/* Pre-hide — JS removes this class to reveal element */
.dvs-pre-hide {
    display: none !important;
}

/* ── Shared ──────────────────────────────────────────────── */
.dvs-switcher__sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}


@media (max-width:500px){
    .dvs-switcher.dvs-switcher--dropdown .dvs-switcher__active-name{
        display: none!important;
    }
}

/* ══════════════════════════════════════════════════════════
   FLAG IMAGES
   ══════════════════════════════════════════════════════════ */

/* Flag inside the toggle button */
.dvs-flag--btn {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

/* Flag inside dropdown items */
.dvs-flag-wrap {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
}

.dvs-flag--item {
    width: 24px;
    height: 17px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.10);
}

/* Flag inside row items */
.dvs-flag--row {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 3px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.10);
    flex-shrink: 0;
}

/* Fallback globe emoji when no flag uploaded */
.dvs-flag-empty {
    font-size: 16px;
    line-height: 1;
}

/* ══════════════════════════════════════════════════════════
   DROPDOWN  [domain_switcher type="dropdown"]
   ══════════════════════════════════════════════════════════ */

.dvs-switcher {
    position: relative;
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
}

.dvs-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #00205c;
    border: 1px solid #00205c;
    border-radius: 5px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    color: #fff;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
    outline: none;
}

.dvs-switcher__toggle:hover,
.dvs-switcher__toggle:focus,
.dvs-switcher__toggle:focus-visible {
    background-color: transparent;
    color: #00205c;
    outline: none;
    box-shadow: none;
}

.dvs-switcher__chevron {
    flex-shrink: 0;
    transition: transform 0.22s ease;
}
.dvs-switcher--open .dvs-switcher__chevron {
    transform: rotate(180deg);
}

.dvs-switcher__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    list-style: none;
    margin: 0;
    padding: 5px 0;
    z-index: 99999;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.dvs-switcher--open .dvs-switcher__dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dvs-switcher__dropdown li {
    margin: 0;
    padding: 0;
}

.dvs-switcher__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none !important;
    font-size: 14px;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease;
}

.dvs-switcher__item:hover {
    background: #f4f4f4;
    color: #000;
}

/* Push checkmark to the right */
.dvs-switcher__name { flex: 1; }

.dvs-switcher__check { flex-shrink: 0; color: #00205c; }

/* Active item */
.dvs-switcher__item.active {
    font-weight: 700;
    color: #00205c;
    cursor: default;
    pointer-events: none;
    background: #eef2fa;
}

.dvs-switcher__dropdown li + li {
    border-top: 1px solid #f0f0f0;
}

/* ══════════════════════════════════════════════════════════
   ROW  [domain_switcher type="row"]
   ══════════════════════════════════════════════════════════ */

.dvs-row-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.dvs-row-switcher__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 5px;
    border: 1px solid transparent;
    font-size: 14px;
    font-family: inherit;
    color: #00205c;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.dvs-row-switcher__item:hover {
    background: #f0f3fa;
    border-color: #00205c;
    color: #00205c;
}

.dvs-row-switcher__item.active {
    background: #00205c;
    color: #fff;
    border-color: #00205c;
    font-weight: 700;
    cursor: default;
    pointer-events: none;
}

/* Divider line between row items */
.dvs-row-switcher__item + .dvs-row-switcher__item {
    position: relative;
}
.dvs-row-switcher__item + .dvs-row-switcher__item::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 20%;
    height: 60%;
    width: 1px;
    background: #d0d5e0;
}