﻿/* AG Grid Core */
@import url("/lib/ag-grid-community/styles/ag-grid.css");

/* Quartz Theme */
@import url("/lib/ag-grid-community/styles/ag-theme-quartz.css");

/* Quartz Font */
/*@import url("/lib/ag-grid-community/styles/agGridQuartzFont.css");*/

/* ---------- Base / resets (seen repeated in your HTML) ---------- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
}

/* Use Merriweather when you want serif headings */
.font-serif {
    font-family: "Merriweather", serif;
}

/* Ensure consistent font family across all elements */
/*h1, h2, h3, h4, h5, h6, p, span, div, a, button, input, select, textarea, label, li, td, th {
    font-family: inherit;
}*/

/* ---------- FAQ <details> animations (from FAQs.html) ---------- */
details > summary {
    list-style: none;
}

    details > summary::-webkit-details-marker {
        display: none;
    }

details[open] summary ~ * {
    animation: slideDown 0.3s ease-in-out;
}

details[open] .fa-chevron-down {
    transform: rotate(180deg);
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect reduced-motion preferences (WCAG-friendly) */
@media (prefers-reduced-motion: reduce) {
    details[open] summary ~ * {
        animation: none !important;
    }

    * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ---------- Product card hover (from ProductSearch.html) ---------- */
.product-card:hover {
    transform: translateY(-4px);
}

a {
    text-decoration: none;
}

    a.underline, a[class*="underline"] {
        text-decoration: underline;
    }

/* Visible keyboard focus (WCAG-friendly) */
:focus-visible {
    outline: 2px solid rgba(34, 197, 94, 0.7);
    outline-offset: 2px;
}
/*
::-webkit-scrollbar {
    display: none;
}*/

/* =========================================================
   GLOBAL PAGE SCROLLBARS — ALWAYS VISIBLE
   ========================================================= */

/* Chrome / Edge / Safari */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: #e2e8f0;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 999px;
    border: 3px solid #e2e8f0;
}

    html::-webkit-scrollbar-thumb:hover,
    body::-webkit-scrollbar-thumb:hover {
        background: #475569;
    }

/* Firefox */
html,
body {
    scrollbar-width: auto;
    scrollbar-color: #64748b #e2e8f0;
}

.input-validation-error {
    border-color: #dc3545 !important;
    background: #f5e9ea !important;
}

.email-link {
    @apply text-blue-600 hover:text-blue-700 underline;
}

/* ---------- Tooltips for links ---------- */
[data-tooltip] {
    position: relative;
}

    [data-tooltip]::before {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        padding: 0.5rem 0.75rem;
        background-color: #1f2937;
        color: white;
        font-size: 0.75rem;
        font-weight: 500;
        border-radius: 0.375rem;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
        z-index: 9999;
        pointer-events: none;
    }

    [data-tooltip]::after {
        content: '';
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: #1f2937;
        margin-bottom: -12px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
        z-index: 9999;
        pointer-events: none;
    }

    [data-tooltip]:hover::before,
    [data-tooltip]:hover::after,
    [data-tooltip]:focus::before,
    [data-tooltip]:focus::after {
        opacity: 1;
        visibility: visible;
    }

.back-to-top {
    cursor: pointer;
    position: fixed;
    bottom: 60px;
    right: 20px;
    display: none;
    margin-right: 10px;
    z-index: 5;
    border: solid 2px;
    padding: 5px 10px;
    color: #fff;
    border-radius: 50px;
    background: var(--Red-Red-200) !important;
    border-color: var(--Red-Red-200) !important;
}

    .back-to-top:hover {
        border-color: var(--main-bg-color-shaded) !important;
        color: #fff;
        background: var(--main-bg-color-shaded) !important;
    }

/* =========================================================
   Product Search (AG Grid Quartz) – modern table styling
   ========================================================= */

/* =========================================================
   Product Search (AG Grid Quartz) – page-specific styles
   ========================================================= */

/* If the grid sits in a flex container anywhere, this prevents flex sizing issues */
#product-search-page #productGrid {
    min-height: 0;
}

/* Theme + typography */
#product-search-page .ag-theme-quartz {
    /* Match site fonts (Tailwind font-sans) */
    --ag-font-family: var(--tw-font-sans);
    --ag-font-size: 14px;
    /* Colors / surfaces */
    --ag-border-color: #e5e7eb;
    --ag-header-background-color: #f8fafc;
    --ag-background-color: #ffffff;
    --ag-row-hover-color: #f1f5f9;
    font-family: var(--tw-font-sans);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

    /* Header */
    #product-search-page .ag-theme-quartz .ag-header {
        background: #f8fafc;
        border-bottom: 1px solid #e5e7eb;
    }

    #product-search-page .ag-theme-quartz .ag-header-cell-label {
        font-weight: 600; /* was 800; 600 matches the rest of your site better */
        color: #0f172a;
        font-size: 15px;
    }

    /* Remove vertical dividers + inner borders that create “legacy” look */
    #product-search-page .ag-theme-quartz .ag-header-cell,
    #product-search-page .ag-theme-quartz .ag-cell {
        border-right: none !important;
        border: none !important;
    }

    /* Subtle row separators + zebra */
    #product-search-page .ag-theme-quartz .ag-row {
        border-bottom: 1px solid #f1f5f9 !important;
    }

        #product-search-page .ag-theme-quartz .ag-row:nth-child(even) .ag-cell {
            background: #fbfdff;
        }

    /* Cell spacing + text */
    #product-search-page .ag-theme-quartz .ag-cell {
        padding: 12px 16px;
        display: flex;
        align-items: center;
        color: #0f172a;
        font-size: 15px;
        font-weight: 500;
    }

    /* Hover: subtle background + green accent bar */
    #product-search-page .ag-theme-quartz .ag-row:hover .ag-cell {
        background: #f1f5f9;
    }

        #product-search-page .ag-theme-quartz .ag-row:hover .ag-cell:first-child {
            box-shadow: inset 4px 0 0 0 #16a34a;
        }

/* View document pill: match grid typography */
#product-search-page .product-doc-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px; /* matches grid cell */
    font-weight: 500; /* slightly stronger than body */

    color: #dc2626;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

    #product-search-page .product-doc-pill:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
        transform: translateY(-1px);
    }

/* Product Search - make PDF action compact on mobile (keep localized text in DOM) */


/* If you pin Product Details on mobile, remove the pinned divider/shadow */
#product-search-page .ag-theme-quartz .ag-pinned-right-header,
#product-search-page .ag-theme-quartz .ag-pinned-right-cols-container {
    box-shadow: none !important;
    border-left: 0 !important;
}

    #product-search-page .ag-theme-quartz .ag-pinned-right-header::before,
    #product-search-page .ag-theme-quartz .ag-pinned-right-cols-container::before {
        display: none !important;
    }

#product-search-page #scrollHint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* AG Grid loading spinner (used by overlayLoadingTemplate) */
#product-search-page .ag-grid-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.20);
    border-top-color: rgba(15, 23, 42, 0.70);
    display: inline-block;
    animation: agspin 0.8s linear infinite;
}

@keyframes agspin {
    to {
        transform: rotate(360deg);
    }
}
/* =========================================================
   Product Search - MOBILE (<= 640px)
   - No truncation in headers/cells (wrap instead of ellipsis)
   - Keep PDF column centered and balanced
   ========================================================= */
@media (max-width: 640px) {

    /* Give wrapped headers enough height (2 lines) */
    #product-search-page .ag-theme-quartz {
        --ag-header-height: 72px; /* bump to 80px if you ever see 3-line headers */
    }

        /* -------------------------
     HEADERS: wrap, no ellipsis
     ------------------------- */
        #product-search-page .ag-theme-quartz .ag-header-cell-label,
        #product-search-page .ag-theme-quartz .ag-header-cell-text {
            white-space: normal !important;
            overflow: visible !important;
            text-overflow: clip !important;
            line-height: 1.15;
        }

        /* Make header label container allow wrapping nicely */
        #product-search-page .ag-theme-quartz .ag-header-cell-label {
            align-items: center;
        }

        /* -------------------------
     CELLS: wrap, no ellipsis
     ------------------------- */

        /* Your cells are flex + centered by default; allow multi-line text to start at top */
        #product-search-page .ag-theme-quartz .ag-cell {
            align-items: flex-start; /* better for wrapped multi-line content */
        }

        /* Allow wrapping in the value wrapper */
        #product-search-page .ag-theme-quartz .ag-cell-value,
        #product-search-page .ag-theme-quartz .ag-cell-value span {
            white-space: normal !important;
            overflow: visible !important;
            text-overflow: clip !important;
            line-height: 1.2;
        }

    /* -------------------------
     PDF column: centered header + centered pill
     ------------------------- */

    /* Center the header for the PDF column */
    #product-search-page #productGrid .ag-header-cell[col-id="pdfUrl"] .ag-header-cell-label {
        justify-content: center !important;
        text-align: center !important;
    }

    #product-search-page #productGrid .ag-header-cell[col-id="pdfUrl"] .ag-header-cell-text {
        text-align: center !important;
    }

    /* Center the pill inside PDF cells */
    #product-search-page #productGrid .ag-cell[col-id="pdfUrl"] {
        justify-content: center !important;
        align-items: center !important; /* keep the pill vertically centered even when other cells wrap */
    }

    /* Optional: tighten padding for PDF column only */
    #product-search-page #productGrid .ag-header-cell[col-id="pdfUrl"],
    #product-search-page #productGrid .ag-cell[col-id="pdfUrl"] {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

    /* End Product Search Styling*/

    /* =========================================================
   HEADER NAV - Fix truncation/overlap for 1025px-1400px
   ========================================================= */
    @media (min-width: 1024px) and (max-width: 1400px) {
        /* Reduce nav item padding and font size for medium desktop */
        #header nav a {
            padding-left: 0.375rem !important; /* px-1.5 */
            padding-right: 0.375rem !important;
            font-size: 0.75rem !important; /* text-xs */
        }

        /* Reduce spacing between nav items */
        #header nav {
            gap: 0 !important;
        }

            /* Hide nav item icons to save space */
            #header nav a i {
                display: none !important;
            }

        /* Reduce language toggle padding */
        #header #language-toggle {
            padding-left: 0.375rem !important;
            padding-right: 0.375rem !important;
        }

        /* Reduce brand text size slightly */
        #header #brandName {
            font-size: 0.875rem !important; /* text-sm */
            line-height: 1rem !important;
        }

        /* Ensure brand area doesn't take too much space */
        #header a[href="/"] {
            flex: 0 1 auto !important;
            min-width: 0 !important;
            max-width: 280px !important;
        }

        /* Allow nav to wrap if needed */
        #header nav {
            flex-wrap: wrap !important;
        }
    }

    /* For very tight 1024-1200px range, further reduce */
    @media (min-width: 1024px) and (max-width: 1200px) {
        #header nav a span {
            font-size: 0.6875rem !important; /* 11px */
        }

        #header nav a {
            padding-left: 0.25rem !important;
            padding-right: 0.25rem !important;
        }

        /* Reduce brand max-width further */
        #header a[href="/"] {
            max-width: 220px !important;
        }

            /* Truncate brand name if needed */
            #header a[href="/"] .text-base.sm\:text-lg {
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
                max-width: 180px !important;
            }
    }

    /* =========================================================
   SELECT/DROPDOWN - Safari Browser Consistency Fix
   ========================================================= */
    select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 12px;
        padding-right: 2.5rem !important;
    }

    /* Safari-specific fixes */
    @supports (-webkit-touch-callout: none) {
        select {
            background-color: #f9fafb;
            border-radius: 0.5rem;
            line-height: 1.5;
        }
    }

    /* Ensure consistent height with text inputs */
    select,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"] {
        min-height: 3.5rem;
        line-height: 1.5;
    }

        /* Fix for Safari rendering select differently */
        select::-webkit-inner-spin-button,
        select::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        /* Suffix dropdown specific styling */
        #ddl_Suffix,
        select[id*="Suffix"],
        select[name*="Suffix"] {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 12px;
            padding-right: 2.5rem !important;
            min-height: 3.5rem;
        }

    /* =========================================================
   reCAPTCHA Badge - Position inline above submit button
   ========================================================= */
    .grecaptcha-badge {
        position: static !important;
        display: inline-block !important;
        width: auto !important;
        height: auto !important;
        box-shadow: none !important;
        margin: 0 auto !important;
    }