/**
 * Global Styles
 * 
 * Add your global CSS styles here
 * This file is automatically loaded via script-loader.php
 */

/* Example: Global utility classes */
/* SweetAlert2 — stay above drawers, quote modals, and preparing overlay */
.swal-custom-top-20 {
    margin-top: 50px !important;
    z-index: 2147483647 !important;
}

/* Also target the main SweetAlert2 container to ensure it's always on top */
.swal2-container {
    z-index: 2147483647 !important;
}

.swal2-title{
    padding-top:0px !important ;
}

/* Ensure SweetAlert2 popup is always visible at top */
.swal2-popup.swal-custom-top-20 {
    position: fixed !important;
    top: 20px !important;
    margin-top: 0 !important;
    padding-bottom: 20px !important;
}

.swal2-popup.swal-custom-top-20 .swal2-html-container {
    /* font-size: 12px !important; */
    font-weight: 600 !important;
}

@media (max-width: 1024px) {
    .swal2-container {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        padding: 0 10px !important;
    }
    
    .swal2-popup.swal-custom-top-20 {
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .swal2-container {
        padding: 0 15px !important;
    }
    
    .swal2-popup.swal-custom-top-20 {
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .swal2-popup.swal-custom-top-20 {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}


@media (min-width: 1025px) {
    .swal2-popup.swal-custom-top-20 {
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
    }
}

.hidden {
    display: none !important;
}

/*
 * iOS Safari: fixed + translateX(-50%) often mis-centers toasts (viewport/URL bar,
 * containing block quirks). Center with horizontal auto margins and an explicit width
 * band (not max-content — that crushes SweetAlert2’s normal ~32em popup).
 */
@supports (-webkit-touch-callout: none) {
    .swal2-container,
    .swal2-container.swal-custom-top-20-container {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: max(15px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(15px, env(safe-area-inset-right, 0px)) !important;
        padding-top: 0 !important;
    }

    .swal2-popup.swal-custom-top-20 {
        position: fixed !important;
        top: max(20px, env(safe-area-inset-top, 0px)) !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
        box-sizing: border-box !important;
        /* Match SweetAlert2 default popup scale; cap to viewport minus safe area */
        --wiz-swal-ios-toast-gutter: calc(
            env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px) + 24px
        );
        width: min(32em, calc(100vw - var(--wiz-swal-ios-toast-gutter))) !important;
        min-width: min(17.5rem, calc(100vw - var(--wiz-swal-ios-toast-gutter))) !important;
        max-width: calc(100vw - var(--wiz-swal-ios-toast-gutter)) !important;
    }
}

/* Add your global styles below */

/* Shared Placed By / Created by cell (orders + claims) */
.wiz-listing-placed-by {
    display: inline;
    font-size: 14px;
    line-height: 1.4;
    color: #111827;
    white-space: nowrap;
}
.wiz-listing-placed-by__name { font-weight: 400; color: #111827; }
.wiz-listing-placed-by__meta {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 400;
    /* #6b7280 was 4.38:1 on the striped #f2f4f7 rows (WZS-4206, WCAG 1.4.3 needs 4.5:1).
       #4b5563 is 7.6:1 on white and 6.9:1 on the grey rows. */
    color: #4b5563;
}

/* Visually hidden, still announced. Used by the new-tab warning in Global-scripts.js
   (M17) and available to any widget that needs text for screen readers only.
   Not display:none or visibility:hidden — both remove it from the accessibility tree,
   which is the entire point of the class. */
.wiz-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Pause control for decorative background videos (M12, WCAG 2.2.2 Pause Stop Hide).
   Injected by Global-scripts.js. Kept small and corner-anchored so it does not fight the
   design, but it must stay genuinely visible and operable — a control the user cannot see
   or reach does not satisfy the criterion. */
.wiz-video-pause {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    line-height: 0;
    /* Elementor's .elementor-background-video-container sets pointer-events: none so the
       decorative video never swallows clicks, and the button inherits it from that parent —
       keyboard worked, mouse clicks fell through (WZS-4051). Restore it on the button only;
       the video and its container still ignore the mouse. */
    pointer-events: auto;
}

.wiz-video-pause:hover {
    background: rgba(0, 0, 0, 0.75);
}

/* Focus must be obvious against arbitrary video content, hence the double ring. */
.wiz-video-pause:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.8);
}

.wiz-video-pause svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

/* Keyboard-opened ElementsKit menu panels (M02, WCAG 2.1.1). Global-scripts.js adds
   .wiz-menu-open to the <li> when its parent link receives keyboard focus; these rules
   mirror ElementsKit's own `li:hover > panel` rules, inside the same desktop media query,
   so a keyboard-opened panel looks and animates exactly like a hovered one. Below 1025px
   ElementsKit uses its own click-to-open off-canvas menu, which already works by keyboard. */
@media (min-width: 1025px) {
    .elementskit-navbar-nav-default .elementskit-dropdown-has.wiz-menu-open > .elementskit-dropdown,
    .elementskit-navbar-nav-default .elementskit-megamenu-has.wiz-menu-open > .elementskit-megamenu-panel,
    .ekit-vertical-navbar-nav li.elementskit-dropdown-has.wiz-menu-open > .elementskit-dropdown,
    .ekit-vertical-navbar-nav li.elementskit-megamenu-has.wiz-menu-open > .elementskit-megamenu-panel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Closing from the keyboard hides the panel instantly: ElementsKit's fade also delays
       `visibility`, which would leave the closed panel's links in the tab order for 0.4s. */
    .elementskit-dropdown-has.wiz-menu-closing > .elementskit-dropdown,
    .elementskit-megamenu-has.wiz-menu-closing > .elementskit-megamenu-panel {
        transition: none !important;
    }
}
