/* =========================================================
   SDR PREMIUM LAYER SWITCHER
   Glass / Modern / Minimal
   ========================================================= */


/* =========================================================
   LAYER SWITCHER ROOT
   ========================================================= */

.layer-switcher {
    position: absolute;

    top: 12px;
    right: 12px;

    z-index: 1200;

    user-select: none;
    text-align: right;
}


/* =========================================================
   TOGGLE BUTTON
   ========================================================= */

.layer-toggle-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 8px 14px;

    box-sizing: border-box;

    border: 1px solid rgba(255,255,255,0.92);
    border-radius: 999px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.94),
            rgba(232,250,242,0.88)
        );

    color: #078e80;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.95),
        0 3px 7px rgba(7,145,130,0.08),
        0 9px 20px rgba(15,23,42,0.10);

    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);

    transition:
        transform 0.3s cubic-bezier(.16,1,.3,1),
        background 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}


/* =========================================================
   TOGGLE HOVER
   ========================================================= */

.layer-toggle-btn:hover {
    transform:
        translateY(-2px)
        scale(1.025);

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #d9f7e9 100%
        );

    color: #067d70;

    border-color: rgba(7,145,130,0.30);

    box-shadow:
        inset 0 1px 1px rgba(255,255,255,1),
        0 5px 10px rgba(7,145,130,0.10),
        0 14px 30px rgba(7,145,130,0.18),
        0 0 0 4px rgba(7,145,130,0.045);
}


/* =========================================================
   TOGGLE ACTIVE
   ========================================================= */

.layer-toggle-btn:active {
    transform:
        translateY(0)
        scale(0.96);

    transition-duration: 0.1s;
}


/* =========================================================
   LAYER PANEL
   ========================================================= */

.layer-panel {
    display: none;

    position: relative;

    width: 190px;

    box-sizing: border-box;

    margin-top: 8px;

    padding: 10px;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.92);

    border: 1px solid rgba(255,255,255,0.95);

    box-shadow:
        0 4px 10px rgba(15,23,42,0.04),
        0 12px 28px rgba(15,23,42,0.09),
        0 25px 55px rgba(15,23,42,0.11);

    backdrop-filter:
        blur(22px)
        saturate(150%);

    -webkit-backdrop-filter:
        blur(22px)
        saturate(150%);

    direction: rtl;

    animation:
        sdr-layer-panel-enter
        0.28s
        cubic-bezier(.16,1,.3,1)
        both;
}


/* =========================================================
   PANEL OPEN
   ========================================================= */

.layer-panel.open {
    display: block;
}


/* =========================================================
   PANEL TITLE
   ========================================================= */

.layer-panel h4 {
    margin: 6px 0 8px 0;

    padding-bottom: 7px;

    border-bottom:
        1px solid rgba(7,145,130,0.12);

    color: #173b38;

    font-family: inherit;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.4;
}


/* =========================================================
   PANEL LABELS
   ========================================================= */

.layer-panel label {
    position: relative;

    display: block;

    padding: 8px 9px;

    margin: 2px 0;

    border-radius: 12px;

    color: #244541;

    font-family: inherit;

    font-size: 13px;
    font-weight: 500;

    line-height: 1.5;

    cursor: pointer;

    transition:
        background 0.22s ease,
        color 0.22s ease,
        transform 0.22s cubic-bezier(.16,1,.3,1);
}


/* =========================================================
   LABEL HOVER
   ========================================================= */

.layer-panel label:hover {
    background:
        linear-gradient(
            90deg,
            rgba(207,244,228,0.30),
            rgba(207,244,228,0.70)
        );

    color: #067c70;

    transform: translateX(-2px);
}


/* =========================================================
   CHECKBOX / RADIO ACCENT
   ========================================================= */

.layer-panel input {
    accent-color: #079182;
}


/* =========================================================
   KEYBOARD ACCESSIBILITY
   ========================================================= */

.layer-toggle-btn:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(255,255,255,0.95),
        0 0 0 6px rgba(7,145,130,0.30),
        0 12px 28px rgba(7,145,130,0.18);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .layer-switcher {
        top: 80px;
        right: 10px;
    }


    .layer-toggle-btn {
        min-height: 42px;

        padding: 10px 14px;

        font-size: 16px;
    }


    .layer-panel {
        width: 200px;

        margin-top: 8px;

        padding: 10px;

        border-radius: 18px;
    }


    .layer-panel label {
        padding: 9px 10px;

        font-size: 14px;
    }
}


/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 380px) {

    .layer-switcher {
        top: 70px;
        right: 8px;
    }


    .layer-toggle-btn {
        min-height: 38px;

        padding: 8px 12px;

        font-size: 14px;
    }


    .layer-panel {
        width: 185px;
    }
}


/* =========================================================
   PANEL ANIMATION
   ========================================================= */

@keyframes sdr-layer-panel-enter {

    from {
        opacity: 0;

        transform:
            translateY(-7px)
            scale(0.97);

        filter: blur(3px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);

        filter: blur(0);
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .layer-panel {
        animation: none;
    }

    .layer-toggle-btn,
    .layer-panel label {
        transition: none;
    }
}