/*
Theme Name: Hello Biz Child - PPCU
Theme URI: https://ppcu.720media.com/
Description: Child theme for Hello Biz with ADA compliance enhancements for Pikes Peak Credit Union
Author: 720MEDIA
Author URI: https://720media.com/
Template: hello-biz
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hello-biz-child
*/

/* 
===========================================
PPCU Custom Styles
===========================================
Add your custom CSS below this line
*/

/* Import parent theme styles (handled in functions.php) */

/* 
===========================================
ADA COMPLIANCE STYLES
===========================================
All accessibility fixes are imported below
*/

/* ============================================
   SCREEN READER UTILITIES
   ============================================ */

.screen-reader-text,
.sr-only {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
}

.screen-reader-text:focus,
.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    clip-path: none;
    white-space: normal;
}

/* ============================================
   SKIP TO CONTENT LINK - Enhanced Visibility
   ============================================ */

.skip-to-content-link,
.ea11y-skip-to-content-link {
    position: absolute;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 999999;
}

.skip-to-content-link:focus,
.ea11y-skip-to-content-link:focus {
    position: fixed;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    padding: 15px 30px;
    background: #008957;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999999;
}

.skip-to-content-link:focus:hover,
.ea11y-skip-to-content-link:focus:hover {
    background: #006d44;
}

/* ============================================
   FOCUS INDICATORS - Visible & Clear
   ============================================ */

/* Primary focus style for all interactive elements */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 3px solid #008957 !important;
    outline-offset: 2px !important;
}

/* Focus for links within navigation */
nav a:focus {
    outline: 3px solid #008957 !important;
    outline-offset: 2px !important;
    background: rgba(0, 137, 87, 0.1);
}

/* Focus for buttons */
button:focus,
.elementor-button:focus,
input[type="submit"]:focus,
input[type="button"]:focus {
    outline: 3px solid #008957 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(0, 137, 87, 0.2) !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    a:focus,
    button:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline-width: 4px !important;
        outline-offset: 3px !important;
    }
}

/* ============================================
   COLOR CONTRAST FIXES
   ============================================ */

/* Fix light gray text that fails contrast */
.light-gray-text {
    color: #666666; /* Changed from #999999 for 4.6:1 contrast */
}

/* Footer disclaimer text */
.footer-disclaimer,
.loan-footer-disclaimer,
.cd-footer-disclaimer {
    color: #666666 !important; /* Changed from #999999 */
}

/* Ensure white text on green meets contrast */
.green-button {
    background: #008957;
    color: #ffffff;
}

/* Rate labels and small text */
.rate-label,
.small-text {
    color: #666666; /* Minimum 4.5:1 contrast on white */
}

/* ============================================
   HEADING STRUCTURE HELPERS
   ============================================ */

/* Use these classes to style text WITHOUT using wrong heading levels */
.heading-style-large {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.heading-style-medium {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

.heading-style-small {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

/* ============================================
   MOBILE MENU ACCESSIBILITY
   ============================================ */

/* Ensure hamburger menu has proper focus */
.elementor-menu-toggle:focus,
.menu-toggle:focus {
    outline: 3px solid #008957 !important;
    outline-offset: 2px !important;
    background: rgba(0, 137, 87, 0.1);
}

/* Mobile menu container when expanded */
.elementor-nav-menu--dropdown[aria-hidden="false"] {
    display: block;
}

.elementor-nav-menu--dropdown[aria-hidden="true"] {
    display: none;
}

/* ============================================
   FORM ACCESSIBILITY
   ============================================ */

/* Ensure form labels are visible or screen-reader accessible */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Required field indicator */
.required::after {
    content: " *";
    color: #d32f2f;
    font-weight: bold;
}

/* Error states with sufficient contrast */
.form-field-error,
input.error,
textarea.error {
    border: 2px solid #d32f2f;
}

.error-message {
    color: #d32f2f;
    font-weight: 600;
    margin-top: 5px;
}

/* Focus state for inputs */
input:focus,
textarea:focus,
select:focus {
    border-color: #008957;
    box-shadow: 0 0 0 3px rgba(0, 137, 87, 0.2);
}

/* ============================================
   TABLE ACCESSIBILITY (ADA COMPLIANT - IMPROVED)
   ============================================ */

/* Desktop tables */
table thead th {
    background: #f5f5f5;
    font-weight: 600;
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #008957;
}

table tbody th {
    font-weight: 600;
    background: #fafafa;
}

table caption {
    font-weight: 600;
    text-align: left;
    margin-bottom: 10px;
    font-size: 18px;
}

/* ADA-Compliant Mobile Tables - FIT SCREEN WITHOUT SCROLLING */
@media (max-width: 768px) {
    /* Force table containers to fit viewport */
    .wptb-table-container,
    .wptb-table-container-matrix {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
    
    /* Force tables themselves to fit */
    table,
    .wptb-preview-table {
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        font-size: 13px !important;
    }
    
    /* Force table cells to share space equally */
    table th,
    table td,
    .wptb-cell {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 6px 4px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Keep headers visible - CRITICAL for accessibility */
    table thead th,
    .wptb-row:first-child .wptb-cell {
        background: #008957 !important;
        color: white !important;
        font-size: 11px !important;
        padding: 6px 3px !important;
        font-weight: 600 !important;
        text-align: center !important;
        vertical-align: middle !important;
        line-height: 1.2 !important;
    }
    
    /* Body cells */
    table tbody td,
    table tbody th {
        font-size: 12px !important;
        padding: 6px 4px !important;
        vertical-align: middle !important;
        text-align: center !important;
    }
    
    /* First column (Account Type) - keep left aligned */
    table tbody tr td:first-child,
    table tbody tr th:first-child,
    .wptb-row:not(:first-child) .wptb-cell:first-child {
        text-align: left !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
    }
    
    /* Reduce font size on very small screens */
    @media (max-width: 480px) {
        table,
        .wptb-preview-table {
            font-size: 11px !important;
        }
        
        table th,
        table td,
        .wptb-cell {
            padding: 4px 2px !important;
            font-size: 10px !important;
        }
        
        table thead th,
        .wptb-row:first-child .wptb-cell {
            font-size: 9px !important;
            padding: 4px 2px !important;
        }
        
        table tbody tr td:first-child,
        table tbody tr th:first-child,
        .wptb-row:not(:first-child) .wptb-cell:first-child {
            font-size: 9px !important;
        }
    }
}

/* ============================================
   IMAGE LINK ACCESSIBILITY
   ============================================ */

/* Ensure image links have clear focus states */
a img:focus,
a:focus img {
    outline: 3px solid #008957;
    outline-offset: 2px;
}

/* ============================================
   SLIDER/CAROUSEL ACCESSIBILITY
   ============================================ */

/* Slider control buttons */
.slider-prev,
.slider-next,
.slick-prev,
.slick-next {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.slider-prev:focus,
.slider-next:focus,
.slick-prev:focus,
.slick-next:focus {
    outline: 3px solid #008957;
    outline-offset: 2px;
    border-color: #ffffff;
    background: rgba(0, 137, 87, 0.8);
}

/* Slider pause button */
.slider-pause-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
}

/* ============================================
   MODAL/DIALOG ACCESSIBILITY
   ============================================ */

/* Modal overlay */
.modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* Modal close button must be clearly visible */
.modal-close,
.dialog-close {
    background: transparent;
    border: 2px solid #666;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
}

.modal-close:focus,
.dialog-close:focus {
    outline: 3px solid #008957;
    outline-offset: 2px;
    border-color: #008957;
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@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;
    }
}

/* ============================================
   MINIMUM TOUCH TARGET SIZE (44x44px)
   ============================================ */

button,
a.elementor-button,
input[type="submit"],
input[type="button"],
input[type="checkbox"],
input[type="radio"],
.clickable {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Exception for inline text links */
p a,
li a {
    min-width: auto;
    min-height: auto;
    display: inline;
}

/* ============================================
   PRINT STYLES FOR ACCESSIBILITY
   ============================================ */

@media print {
    /* Ensure links show URL */
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    /* Don't print navigation */
    nav,
    .menu,
    .header-search {
        display: none;
    }
    
    /* Ensure good contrast in print */
    * {
        background: white !important;
        color: black !important;
    }
}

/* 
===========================================
PPCU BRAND COLORS
===========================================
*/
:root {
    --ppcu-green: #008957;
    --ppcu-dark-green: #006d44;
    --ppcu-gray: #58666e;
    --ppcu-text: #333333;
    --ppcu-light-gray: #666666;
}

/* 
===========================================
ADD YOUR CUSTOM STYLES BELOW
===========================================
*/
