/**
* 2010-2026 ADPixNet | WebMastering
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop or ThirtyBees to newer
* versions in the future. If you wish to customize PrestaShop or ThirtyBees for your
* needs please refer to https://www.prestashop.com or https://www.thirtybees.com for more information.
*
*
* @Module		PS DARK MODE
* @Description	Switch your PrestaShop back office and front office to dark mode
* @Version		2.0.0
* @Copyright	ADPixNet | WebMasterring <https://adpixnet.com/>
* @Addons		PrestaShop - ThirtyBees Developments <https://addons.adpixnet.com/>
* @support		Support Requests <https://admin.adpixnet.com/forms/ticket?styled=1&with_logo=1>
* @license		Valid for 1 website (or project) for each purchase of license International Registered 
*				Trademark & Property of ADPixNet. More information on <https://addons.adpixnet.com/content/1-politique-de-license>
*/

/* ══════════════════════════════════════════════
   CONTAINER
══════════════════════════════════════════════ */
#psdm-front-wrap {
    position: fixed;
	top: 5px;
    bottom: auto;
    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: 45px;
    height: 45px;
    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; }
}
