/**
 * PS DARK MODE v2.0.0 — Front Office CSS
 * (c) 2010-2026 ADPixNet | WebMastering — https://adpixnet.com/
 */

/* ══════════════════════════════════════════════
   CONTAINER
══════════════════════════════════════════════ */
#psdm-front-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    animation: psdm-appear 0.4s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes psdm-appear {
    from { opacity: 0; transform: scale(0.5) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ══════════════════════════════════════════════
   BUTTON
══════════════════════════════════════════════ */
#psdm-front-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(120, 120, 160, 0.2);
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.2s ease;
}

#psdm-front-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 7px 24px rgba(0, 0, 0, 0.22);
}

#psdm-front-btn:active {
    transform: scale(0.92);
}

/* Dark mode state */
#psdm-front-btn.psdm-dark {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

/* ══════════════════════════════════════════════
   ICON WRAP
══════════════════════════════════════════════ */
.psdm-front-icons {
    position: relative;
    width: 24px;
    height: 24px;
    display: block;
}

/* ─── Sun icon ─── */
.psdm-fsun {
    position: absolute;
    top: 0; left: 0;
    width: 24px; height: 24px;
    fill: none;
    stroke: #f59e0b;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.35s ease, transform 0.4s ease;
    overflow: visible;
}

/* ─── Moon icon ─── */
.psdm-fmoon {
    position: absolute;
    top: 0; left: 0;
    width: 24px; height: 24px;
    fill: none;
    stroke: #818cf8;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.35s ease, transform 0.4s ease;
    overflow: visible;
}

/* ─── Default: light mode → show sun ─── */
.psdm-fsun  { opacity: 1; transform: rotate(0deg) scale(1); }
.psdm-fmoon { opacity: 0; transform: rotate(-50deg) scale(0.55); }

/* ─── Dark mode → show moon ─── */
#psdm-front-btn.psdm-dark .psdm-fsun {
    opacity: 0;
    transform: rotate(60deg) scale(0.55);
}
#psdm-front-btn.psdm-dark .psdm-fmoon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    stroke: #a5b4fc;
}

/* ─── Hover micro-animation ─── */
#psdm-front-btn:hover .psdm-fsun {
    transform: rotate(22deg) scale(1.12);
}
#psdm-front-btn.psdm-dark:hover .psdm-fsun {
    transform: rotate(75deg) scale(0.55);
}
#psdm-front-btn:hover .psdm-fmoon {
    transform: rotate(-60deg) scale(0.6);
}
#psdm-front-btn.psdm-dark:hover .psdm-fmoon {
    transform: rotate(-12deg) scale(1.12);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    #psdm-front-wrap { bottom: 18px; right: 18px; }
    #psdm-front-btn  { width: 44px; height: 44px; }
    .psdm-front-icons,
    .psdm-fsun,
    .psdm-fmoon { width: 22px; height: 22px; }
}

@media (max-width: 480px) {
    #psdm-front-wrap { bottom: 14px; right: 14px; }
    #psdm-front-btn  { width: 40px; height: 40px; }
    .psdm-front-icons,
    .psdm-fsun,
    .psdm-fmoon { width: 20px; height: 20px; }
}
