.theme-default {
    --theme-color: #20dfc6;
    --theme-overlay-color: rgba(7, 51, 44, 0.9);
}

.theme-culture {
    --theme-color: #ff8b80;
    --theme-overlay-color: rgba(83, 2, 38, 0.9);
}

.theme-sport {
    --theme-color: #47d6ff;
    --theme-overlay-color: rgba(0, 43, 103, 0.9);
}

.switch-ios {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    vertical-align: middle;
    flex-shrink: 0;
}

.switch-ios input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-ios {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    box-sizing: border-box;
}

.slider-ios:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-ios.switch-ios--hydrating .slider-ios,
.switch-ios.switch-ios--hydrating .slider-ios:before {
    transition: none !important;
}

input:checked+.slider-ios {
    background-color: #006255;
}

input:checked+.slider-ios:before {
    transform: translateX(22px);
}

/* ==========================================================================
   WordPress Media Library Mobile Margins & Theme Options
   ========================================================================= */
@media (max-width: 900px) {

    .media-modal .media-sidebar {
        display: none !important;
    }

    .media-modal .attachments-browser:has(.attachment-details) .media-sidebar {
        display: block !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: 66% !important;
        width: 100% !important;
        max-width: none !important;
        border-left: none !important;
        border-top: 1px solid #dcdcde;
        padding: 15px !important;
        background: #f3f5f6 !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
        z-index: 100 !important;
    }

    .media-modal .attachments-browser:has(.attachment-details) .media-toolbar,
    .media-modal .attachments-browser:has(.attachment-details) .attachments,
    .media-modal .attachments-browser:has(.attachment-details) .uploader-inline {
        right: 0 !important;
        left: 0 !important;
        bottom: 34% !important;
    }

    .media-modal .attachments-browser:not(:has(.attachment-details)) .media-toolbar,
    .media-modal .attachments-browser:not(:has(.attachment-details)) .attachments,
    .media-modal .attachments-browser:not(:has(.attachment-details)) .uploader-inline {
        right: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
    }
}

@media (max-width: 782px) {

    /* Theme options responsive */
    .system-theme-option-desktop {
        display: none !important;
    }

    .system-theme-option-mobile {
        display: flex !important;
    }

    .media-modal {
        top: 20px !important;
        top: calc(env(safe-area-inset-top, 0px) + 20px) !important;
        left: 15px !important;
        right: 15px !important;
        bottom: 20px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 20px) !important;
        border-radius: 12px !important;
    }
}

/* ==========================================================================
   Theme Selector & Settings Appearance
   ========================================================================= */
.theme-selector-container {
    display: flex;
    gap: 24px;
    margin-top: 20px;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.theme-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-card {
    width: 90px;
    height: 60px;
    border-radius: 12px;
    padding: 3px;
    background: transparent;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-option input[type="radio"]:checked+.theme-card {
    border-color: #007aff;
}

.theme-mock-ui {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #74abe2 0%, #2f5fac 100%);
}

.theme-mock-ui.dark {
    background: linear-gradient(135deg, #1b2845 0%, #0c1424 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.theme-mock-ui.system {
    background: linear-gradient(90deg, #5185c4 50%, #1b2845 50%);
}

/* Floating Top Bar */
.mock-topbar {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 14px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.dark .mock-topbar,
.dark-inner .mock-topbar {
    background: rgba(30, 30, 30, 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mock-pill {
    width: 28px;
    height: 6px;
    background: #007aff;
    border-radius: 3px;
}

/* Floating Main Window */
.mock-window {
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 8px;
    height: 24px;
    background: #ffffff;
    border-radius: 6px 6px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    padding: 0 6px;
    gap: 3px;
}

.dark .mock-window,
.dark-inner .mock-window {
    background: #1c1c1e;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.mock-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.mock-dot.r {
    background: #ff5f56;
}

.mock-dot.y {
    background: #ffbd2e;
}

.mock-dot.g {
    background: #27c93f;
}

/* System Split structural hacks */
.system-half {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
}

.system-half.left {
    left: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.system-half.right {
    right: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.system-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    /* forces inner layer to be exactly same width as full card */
    height: 100%;
}

.system-half.right .system-inner {
    transform: translateX(-50%);
    /* aligns the right half perfectly */
}

.theme-label-text {
    margin-top: 8px;
    font-size: 13px;
    color: var(--resca-text-muted);
    font-weight: 500;
    transition: all 0.2s;
}

.theme-option input[type="radio"]:checked~.theme-label-text {
    color: var(--resca-dark);
    font-weight: 700;
}