﻿/* ===========================
   DARK MODE OVERRIDES
   =========================== */

/* Dark Mode Color Palette */
:root {
    --dm-bg: #141f26; /* Body background */
    --dm-bg2: #304C59; /* Body background */
    --dm-text: #e0e0e0; /* Body text, light gray */
    --dm-link: #ffa500; /* Links */
    --dm-link-hover: #ffcc00; /* Links on hover */
    --dm-header: #343434; /* Header background */
    --dm-footer: #313131; /* Footer background */
    --dm-button-bg: #e7480a; /* Buttons background, burnt-orange */
    --dm-button-hover: #ff9800; /* Buttons hover, burnt-yellow */
    --dm-section: #1b2830; /* Content sections background */
    --dm-secondary: #2d3943; /* Secondary areas like menus */
    --dm-social: #f5f5f5; /* Social icons / secondary links, off-white */
    --dm-black-text: #000000; /* Black text override */
    --dm-pricing-text: #a11b1a; /* Pricing text override, dim red */
    --dm-secondary-text: #283b4c; /* Secondary text override, dark navy */
    --dm-secondary-bg: #2d3a43; /* Darker secondary background */
    --dm-purple: #620251; /* A dark deep purple for contrast */
    --dm-gray: #4F4F4F; /* A light gray */
}
html.dark-mode {
    background-color: var(--dm-bg) !important;
    color: var(--dm-text) !important;
}
.dark-mode {
    transition: all 0.15s ease;
}
/* All hovers should transition over time */
    :hover,
    .dark-mode:hover {
        transition: 0.2s ease-out;
    }


/* Body & Base */
body.dark-mode {
    background-color: var(--dm-bg) !important;
    color: var(--dm-text) !important;
}

    /* Links */
    body.dark-mode a {
        color: var(--dm-link) !important;
    }

        body.dark-mode a:hover {
            color: var(--dm-link-hover) !important;
        }

    /* Headings, paragraphs, spans, lists, and general text */
    body.dark-mode h1,
    body.dark-mode h2,
    body.dark-mode h3,
    body.dark-mode h4,
    body.dark-mode h6,
    body.dark-mode p,
    body.dark-mode li,
    body.dark-mode div {
        color: var(--dm-text) !important;
    }

    body.dark-mode .featured-equipment__overlay {
        background-color: var(--dm-bg) !important;
    }
        body.dark-mode .featured-equipment__overlay h3 {
            color: var(--dm-button-bg) !important;
        }
    body.dark-mode .equip-list a {
        color: var(--dm-black-text) !important;
    }

    body.dark-mode .equip-price {
        color: var(--dm-pricing-text) !important;
    }

    body.dark-mode .equip-list__item__details__location {
        color: var(--dm-secondary) !important;
    }

    body.dark-mode .equip-list__item__details__items .cell {
        color: var(--dm-secondary) !important;
    }

    body.dark-mode .equip-list__item__details__items strong{
        color: var(--dm-black-text) !important;
    }

    body.dark-mode .grid-x.hideonprint span {
        color: var(--dm-text) !important;
    }
        body.dark-mode .grid-x.hideonprint a.veritread-trigger-cta span {
        color: var(--dm-bg) !important;
    }


    /* Header, Footer, and Main Wrappers */
    body.dark-mode header,
    body.dark-mode footer,
    body.dark-mode .slide_menu {
        background-color: var(--dm-header) !important;
        color: var(--dm-text) !important;
    }

    /* Header */
    body.dark-mode #MastHead {
        background: var(--dm-bg2) !important
    }


    body.dark-mode #Footer li a {
        color: var(--dm-bg) !important;
    }

    body.dark-mode #Footer .grid-x p {
        color: var(--dm-bg2) !important;
    }

        body.dark-mode #Footer .grid-x a {
        color: var(--dm-bg2) !important;
    }

    /* Section backgrounds */
    body.dark-mode .section_segment {
        background-color: var(--dm-section) !important;
        color: var(--dm-text) !important;
    }

    /* Menus & Links */
    body.dark-mode .vertical.menu li a {
        color: var(--dm-text) !important;
    }

    body.dark-mode .secondary_links a,
    body.dark-mode .social_icons_menu a {
        color: var(--dm-social) !important;
    }

    /* Buttons */
    body.dark-mode .button {
        background-color: var(--dm-button-bg) !important;
        color: var(--dm-text) !important;
    }

        body.dark-mode .button:hover {
            background-color: var(--dm-button-hover) !important;
            color: var(--dm-black-text) !important;
        }

    /* Slide Menu / Side Menu */
    body.dark-mode .slide_menu {
        background-color: var(--dm-bg) !important;
    }

        body.dark-mode .slide_menu .secondary_login,
        body.dark-mode .slide_menu .social_icons_menu {
            background-color: var(--dm-secondary-bg) !important;
        }
            body.dark-mode .slide_menu .secondary_links a {
                color: var(--dm-secondary-text) !important
            }

    /* Settings Dropdown */
    body.dark-mode #MastHead ul.settings_menu li #settings-dropdown {
        background-color: var(--dm-secondary) !important;
        color: var(--dm-text) !important;
    }

        body.dark-mode #MastHead ul.settings_menu li #settings-dropdown a {
            color: var(--dm-text) !important;
        }

            body.dark-mode #MastHead ul.settings_menu li #settings-dropdown a:hover {
                color: var(--dm-link) !important;
            }

    /*=============================
        Edge Cases 
    =============================*/

    body.dark-mode .equipment-browse__search__type-options {
        background-color: var(--dm-bg2);
    }

    body.dark-mode .callout {
        background-color: var(--dm-section);
    }
    body.dark-mode .equip-sidebar details-dealer {
        background-color: var(--dm-section);
    }

    body.dark-mode .details-specs__info__title {
        background-color: var(--dm-section); /* matches your section bg */
        color: var(--dm-text); /* light text for dark bg */
    }
    body.dark-mode .details-specs__details__title {
        background-color: var(--dm-section); /* matches your section bg */
        color: var(--dm-text); /* light text for dark bg */
    }
    body.dark-mode .details-specs__notes__title {
        background-color: var(--dm-section); /* matches your section bg */
        color: var(--dm-text); /* light text for dark bg */
    }

    body.dark-mode .details-price .large-price,
    body.dark-mode .details-price .converted-price {
        color: var(--dm-text) !important;
    }

    body.dark-mode .burger_holder .burger {
        background-color: var(--dm-button-hover) !important;
        transition: 0.15s ease-in;
    }
        body.dark-mode .burger_holder:hover .burger {
            background-color: var(--dm-link-hover) !important;
            transition: 0.15s ease-out;
        }
    body.dark-mode .burger_holder .burger_mobile {
        background-color: var(--dm-button-hover) !important;
        transition: 0.15s ease-in;
    }
        body.dark-mode .burger_holder:hover .burger_mobile {
            background-color: var(--dm-link-hover) !important;
            transition: 0.15s ease-out;
        }

    body.dark-mode .select2-container--default .select2-results__option {
        color: var(--dm-black-text) !important;
    }
    body.dark-mode .select2-container--default .select2-results__option--selected {
        color: var(--dm-social) !important;
    }

    body.dark-mode .pagination li a {
        background-color: var(--dm-button-hover) !important;
        color: var(--dm-black-text) !important;
    }
        body.dark-mode .pagination li a:hover {
            background-color: var(--dm-link-hover) !important;
            color: var(--dm-black-text) !important;
        }
    body.dark-mode .pagination .active a {
        background-color: var(--dm-button-bg) !important;
        color: var(--dm-text) !important;
    }

    body.dark-mode .dealer-browse {
        background-color: var(--dm-bg) !important;
        color: var(--dm-text) !important;
    }

    body.dark-mode .dealer-browse__area {
        background-color: var(--dm-bg) !important;
        color: var(--dm-text) !important;
    }

    body.dark-mode #featured-equipment-widget {
        background-color: var(--dm-bg) !important;
        color: var(--dm-text) !important;
    }

    body.dark-mode .featured-equipment__listing__detail-btn,
    body.dark-mode .featured-equipment__listing__price {
        color: #e74709 !important;
    }
        body.dark-mode .featured-equipment__listing__detail-btn:hover {
            color: var(--dm-link) !important;
        }

    body.dark-mode .equip-list__item__thumb__etype {
        color: #f5f5f5 !important;
    }

    body.dark-mode .menu ul ul {
        background: var(--dm-bg2) !important;
    }
    body.dark-mode .equip-list__item .grid-x {
        box-shadow: 0px 1px 1px 2px var(--dm-gray) !important;
    }
        body.dark-mode .equip-list__item .grid-x:hover {
            box-shadow: 0px 1px 5px 3px #858585 !important;
        }

    body.dark-mode .slide_menu ul.accordion-menu li a:hover {
        color: var(--dm-button-bg) !important;
    }
/*=============================
        Toggle Styling
    =============================*/
/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid #888;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dark-mode-toggle .button {
    display: inline-flex;
    align-items: center;
    font-weight: bold;
    gap: 8px;
}

body.dark-mode .theme-toggle {
    border-color: #ddd;
}

.theme-toggle:hover {
    transform: scale(1.1);
    transition: transform 0.35s ease;
}
.dark-mode-toggle label,
.dark-mode-toggle p {
    color: #e0e0e0 !important; /* clean neutral light grey */
}
#dark-mode-icon {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

