/* ── Preloader Hiding: Prevent FOUC & showing early before page content reveals ── */
html.ss-preload .cmfw-switcher-wrap,
html:not(.ss-loaded) .cmfw-switcher-wrap,
body:not(.ss-loaded) .cmfw-switcher-wrap {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.5s ease, visibility 0.5s ease !important;
}

html.ss-loaded .cmfw-switcher-wrap,
body.ss-loaded .cmfw-switcher-wrap {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ── Floating & Shortcode Switcher (Golden & Black Theme) ── */
.cmfw-switcher-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    animation: cmfw-fade-in .4s ease;
}

.cmfw-switcher-wrap .cmfw-select,
.cmfw-select {
    background: #141516 !important;
    color: #eabe7c !important;
    border: 2px solid #eabe7c !important;
    border-radius: 50px !important;
    padding: 11px 38px 11px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 10px 25px rgba(234, 190, 124, 0.2), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    transition: all .25s ease-in-out !important;
    min-width: 170px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23eabe7c' d='M6 8 0 0h12z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
}

.cmfw-switcher-wrap .cmfw-select:hover,
.cmfw-switcher-wrap .cmfw-select:focus,
.cmfw-select:hover,
.cmfw-select:focus {
    border-color: #f5d49b !important;
    color: #f5d49b !important;
    box-shadow: 0 15px 35px rgba(234, 190, 124, 0.35), 0 4px 16px rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-2px) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23f5d49b' d='M6 8 0 0h12z'/%3E%3C/svg%3E") !important;
}

.cmfw-switcher-wrap .cmfw-select option,
.cmfw-select option {
    background: #141516 !important;
    color: #eabe7c !important;
    padding: 10px !important;
}

@keyframes cmfw-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Inline Shortcode Switcher ── */
.cmfw-switcher-wrap:not(.cmfw-floating) .cmfw-select {
    position: static;
    box-shadow: 0 4px 15px rgba(234, 190, 124, 0.15);
}

/* ── Loading State ── */
.cmfw-select.loading {
    opacity: .6;
    pointer-events: none;
}

/* ── Responsive Positioning for Mobile / Tablet ── */
@media screen and (max-width: 800px) {
    .cmfw-switcher-wrap {
        bottom: 85px !important;
        right: 16px !important;
    }

    .cmfw-switcher-wrap .cmfw-select,
    .cmfw-select {
        font-size: 13px !important;
        padding: 9px 34px 9px 16px !important;
        min-width: 150px !important;
    }
}

@media screen and (max-width: 480px) {
    .cmfw-switcher-wrap {
        bottom: 82px !important;
        right: 12px !important;
    }
}
