/**
 * Locker Theme - Custom Styles
 * Mobile-optimized styles for the locker help page
 */

/* Reset & Base */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overscroll-behavior-y: contain;
}

/* iOS Safe Areas */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    header.wp-block-template-part {
        padding-top: env(safe-area-inset-top);
    }
    
    footer.wp-block-template-part {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Header Sticky Fix */
header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Logo Styling */
.wp-block-site-logo img {
    max-height: 40px;
    width: auto;
}

/* Site Title in Header */
header .wp-block-site-title {
    margin: 0;
}

header .wp-block-site-title a {
    color: #ffffff !important;
    text-decoration: none;
}

/* Main Content Area */
main.wp-block-group {
    flex: 1;
}

/* Locker Form Container Override */
.locker-help-container {
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    /* Larger touch targets */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    button {
        min-height: 48px;
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    /* Remove hover effects on touch */
    @media (hover: none) {
        button:hover,
        a:hover {
            opacity: 1;
        }
    }
}

/* Hide scrollbar but keep functionality */
.locker-help-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.locker-help-container::-webkit-scrollbar {
    display: none;
}

/* Admin bar hide on mobile */
@media (max-width: 782px) {
    #wpadminbar {
        display: none !important;
    }
    
    html {
        margin-top: 0 !important;
    }
    
    body.admin-bar {
        margin-top: 0;
    }
}

/* Focus states for accessibility */
:focus-visible {
    outline: 2px solid var(--wp--preset--color--primary, #E31837);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .locker-help-container {
        background: #2a2a2a;
    }
    
    .locker-help-field input,
    .locker-help-field select,
    .choices__inner {
        background: #333;
        border-color: #444;
        color: #e0e0e0;
    }
}

/* Print styles - hide unnecessary elements */
@media print {
    header,
    footer,
    .locker-help-button {
        display: none !important;
    }
}
