/* Region / Currency Switcher */

.dc-region-switcher {
    position: relative;
    padding-left: 12px;
    font-family: inherit;
    z-index: 5;
}

.dc-region-trigger {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
    color: inherit;
    line-height: 1.3;
}

.dc-region-trigger-label {
    font-size: 10px;
    font-weight: 300;
    color: #989797;
    letter-spacing: 0.02em;
    margin-bottom: -3px;
    padding-left: 34px;
}

.dc-region-trigger-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 300;
    color: #1a1a1a;
    white-space: nowrap;
}

.dc-region-trigger-text {
    font-weight: 300;
}

.dc-region-trigger-compact {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    padding: 12px 0;
}

.dc-region-flag--trigger {
    width: 16px;
    height: 16px;
}

.dc-region-flag--trigger.dc-region-flag--globe {
    background-size: 12px;
}

.dc-region-flag--trigger.dc-region-flag--vn {
    background-size: 10px;
}

.dc-region-chevron {
    flex-shrink: 0;
    opacity: 0.6;
}

/* CRITICAL: display:flex must NOT apply when hidden, or panel always shows */
.dc-region-panel[hidden],
.dc-region-overlay[hidden] {
    display: none !important;
}

.dc-region-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99998;
}

.dc-region-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 99999;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
}

.dc-region-panel:not([hidden]) {
    display: flex;
}

.dc-region-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #eee;
}

.dc-region-panel-label {
    display: block;
    font-size: 11px;
    color: #989797;
    margin-bottom: 4px;
    /* Align with country name (flag 16px + gap 8px) */
    padding-left: 24px;
}

.dc-region-panel-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 400;
    color: #1a1a1a;
}

.dc-region-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #1a1a1a;
    line-height: 0;
}

.dc-region-panel-title {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #989797;
    padding: 28px 24px 20px;
    margin: 0;
    text-transform: uppercase;
}

.dc-region-list {
    list-style: none;
    margin: 0;
    padding: 0 24px 40px;
}

.dc-region-list li {
    margin: 0;
    padding: 0;
}

.dc-region-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 0;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    text-align: left;
    gap: 16px;
    color: #1a1a1a;
    transition: opacity 0.15s;
}

.dc-region-option:hover {
    opacity: 0.7;
}

.dc-region-option.is-active .dc-region-option-name {
    font-weight: 600;
}

.dc-region-flag {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.dc-region-flag--globe {
    background-color: #e8e8e8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
    background-size: 18px;
}

.dc-region-flag--it {
    background-image: linear-gradient(90deg, #009246 33.33%, #fff 33.33%, #fff 66.66%, #ce2b37 66.66%);
}

.dc-region-flag--no {
    background-color: #ba0c2f;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 20'%3E%3Crect width='28' height='20' fill='%23BA0C2F'/%3E%3Crect x='7' width='5' height='20' fill='%23FFFFFF'/%3E%3Crect y='7' width='28' height='5' fill='%23FFFFFF'/%3E%3Crect x='8' width='3' height='20' fill='%2300205B'/%3E%3Crect y='8' width='28' height='3' fill='%2300205B'/%3E%3C/svg%3E");
    background-size: cover;
}

.dc-region-flag--vn {
    background-color: #da251d;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpolygon fill='%23ffcd00' points='14,6 16.2,11.8 22.4,11.8 17.1,15.2 19.3,21 14,17.6 8.7,21 10.9,15.2 5.6,11.8 11.8,11.8'/%3E%3C/svg%3E");
    background-size: 16px;
}

.dc-region-option-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dc-region-option-name {
    font-size: 15px;
}

.dc-region-option-currency {
    font-size: 14px;
    color: #666;
}

.dc-region-option-chevron {
    flex-shrink: 0;
    opacity: 0.4;
}

body.dc-region-open {
    overflow: hidden;
}

/* Mobile footer compact trigger */
.dc-region-switcher--mobile-footer {
    padding-left: 0;
    z-index: 1;
    width: 100%;
}

.dc-region-switcher--mobile-footer .dc-region-trigger {
    width: 100%;
}

/* Desktop: dropdown under trigger (not right drawer) */
@media (min-width: 769px) {
    .mont_header_sticky-header,
    .mont_header_nav,
    .mont_header_nav-left,
    .mont_header_switchers--desktop {
        overflow: visible;
    }

    .dc-region-switcher--desktop {
        z-index: 120;
    }

    .dc-region-switcher--desktop .dc-region-overlay {
        background: transparent;
    }

    .dc-region-switcher--desktop .dc-region-panel {
        position: absolute;
        top: calc(100% + 14px);
        left: 0;
        right: auto;
        width: 380px;
        max-width: min(380px, calc(100vw - 32px));
        height: auto;
        max-height: min(72vh, 560px);
        border-radius: 2px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    }

    .dc-region-switcher--desktop .dc-region-panel-header {
        padding: 20px 20px 14px;
    }

    .dc-region-switcher--desktop .dc-region-panel-title {
        padding: 22px 20px 14px;
    }

    .dc-region-switcher--desktop .dc-region-list {
        padding: 0 20px 28px;
    }

    .dc-region-switcher--desktop .dc-region-option {
        padding: 16px 0;
    }
}

/* Header layout */
.mont_header_switchers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mont_header_second_menu_header .mont_header_switchers {
    margin-left: auto;
}

.mont_header_second_menu_header .dc-region-trigger-label,
.mont_header_second_menu_header .dc-region-trigger-value {
    color: #fff;
}

.mont_header_second_menu_header .dc-region-trigger-label {
    color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 768px) {
    .mont_header_nav-left .mont_header_switchers--desktop {
        display: none;
    }
}

@media (min-width: 769px) {
    .mont_header_mobile_menu_container {
        display: none !important;
    }
}

/* Hide Google Translate chrome when we drive language via region */
#google_translate_element2,
.skiptranslate,
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Multi-currency fields in CRM */
.dc-multicurrency-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    margin-top: 8px;
}

.dc-multicurrency-grid .dc-form-group label {
    font-size: 12px;
    color: #666;
}

.dc-multicurrency-grid .dc-form-group input {
    width: 100%;
}

.dc-bulk-selected-count {
    font-weight: 400;
    color: #888;
    font-size: 14px;
}

.dc-bulk-edit-hint {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px;
}

.dc-bulk-edit-fields h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin: 20px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.dc-bulk-edit-fields h4:first-child {
    margin-top: 0;
}

.dc-bulk-multicurrency-grid {
    margin-bottom: 8px;
}

.dc-modal-content {
    max-width: 640px;
}

@media (max-width: 600px) {
    .dc-multicurrency-grid {
        grid-template-columns: 1fr;
    }
}
