/* src/Templates/documentation/osha_glossary/index.html.twig
   Page-owned stylesheet (CSP-hardening Phase 3E): migrated verbatim out of
   that template's inline <style> block plus three application-authored
   style="..." attributes, so the page no longer carries its own <style>
   element or relies on inline styles for static presentation. */

/* Overall Page Structure */
.glossary-index {
    /* Global variables like --qc-color-primary are used directly in rules below with fallbacks */
}

/* Header Section */
.glossary-index__header {
    background: linear-gradient(135deg, var(--qc-color-primary, #6a3de8), var(--qc-color-primary-dark, #5227cf));
    padding: 3.5rem 1rem; /* Increased padding */
    text-align: center;
    color: white;
    margin-bottom: 2.5rem; /* Increased margin */
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.glossary-index__title {
    font-size: clamp(1.75rem, 5vw, 2.5rem); /* Responsive font size */
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}
.glossary-index__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem); /* Responsive font size */
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0; /* Removed margin, handled by header padding */
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Info Bar */
.glossary-index__info-bar {
    background-color: var(--qc-color-bg-light, #f7f9fc);
    border-left: 4px solid var(--qc-color-primary, #6a3de8);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    border-radius: var(--qc-radius-md, 8px);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.glossary-index__info-icon {
    color: var(--qc-color-primary, #6a3de8);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}
.glossary-index__info-text {
    margin: 0;
    color: var(--qc-color-text-dark, #1a2a42);
    line-height: 1.6;
}
.glossary-index__info-text strong {
    color: var(--qc-color-primary, #6a3de8);
}

/* Search Bar Section */
.glossary-index__search-container {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    padding: 0 1rem; /* Padding for smaller screens */
}
.glossary-index__search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 650px; /* Increased max-width */
}
.glossary-index__search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--qc-color-text-light, #4a5568);
    font-size: 1.5rem;
    pointer-events: none; /* Allow click through to input */
}
.glossary-index__search-input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3.5rem; /* Increased padding, especially left for icon */
    border-radius: var(--qc-radius-md, 8px);
    border: 1px solid var(--qc-color-border, #e2e8f0);
    font-size: 1rem;
    box-shadow: var(--qc-shadow-sm);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glossary-index__search-input:focus {
    border-color: var(--qc-color-primary, #6a3de8);
    box-shadow: 0 0 0 3px rgba(106, 61, 232, 0.25), var(--qc-shadow-md);
    outline: none;
}
.glossary-index__search-helper {
    font-size: 0.9rem;
    color: var(--qc-color-text-light, #4a5568);
    text-align: center;
    margin-top: 0.75rem;
}

/* A-Z Navigation */
.glossary-index__az-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem; /* Consistent gap */
    margin-bottom: 2.5rem;
    padding: 1rem;
    background-color: var(--qc-color-bg-white, #fff);
    border-radius: var(--qc-radius-lg, 12px); /* More rounded */
    box-shadow: var(--qc-shadow-md); /* Softer shadow */
}
.glossary-index__az-link {
    display: flex; /* For centering content */
    align-items: center;
    justify-content: center;
    width: 38px; /* Fixed width */
    height: 38px; /* Fixed height */
    color: var(--qc-color-primary, #6a3de8);
    background-color: transparent; /* Transparent background initially */
    border: 1px solid var(--qc-color-primary-light, #8a65f0); /* Purple border */
    border-radius: var(--qc-radius-md, 8px); /* More rounded */
    text-decoration: none;
    font-weight: 600; /* Bolder font */
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
}
.glossary-index__az-link:hover,
.glossary-index__az-link--active { /* Combined hover and active state for consistency */
    background-color: var(--qc-color-primary, #6a3de8);
    color: white;
    text-decoration: none;
    transform: translateY(-2px) scale(1.05); /* More pronounced hover effect */
    box-shadow: 0 2px 8px rgba(106, 61, 232, 0.3);
    border-color: var(--qc-color-primary, #6a3de8);
}
.glossary-index__az-link--disabled {
    color: var(--qc-color-text-light, #4a5568);
    background-color: var(--qc-color-bg-light, #f7f9fc); /* Light bg for disabled */
    border-color: var(--qc-color-border, #e2e8f0);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none; /* No transform for disabled */
    box-shadow: none;
}
.glossary-index__az-link--disabled:hover {
    background-color: var(--qc-color-bg-light, #f7f9fc); /* Keep bg same on hover for disabled */
    color: var(--qc-color-text-light, #4a5568);
    border-color: var(--qc-color-border, #e2e8f0);
}

/* Glossary Sections (A, B, C...) */
.glossary-section {
    margin-bottom: 2.5rem;
    padding: 1.75rem; /* Increased padding */
    background-color: var(--qc-color-bg-white, #fff);
    border-radius: var(--qc-radius-lg, 12px);
    box-shadow: var(--qc-shadow-md);
    border-top: 4px solid var(--qc-color-primary-light, #8a65f0); /* Purple top border accent */
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.glossary-section__title {
    font-size: clamp(1.5rem, 4vw, 2rem); /* Responsive font size */
    font-weight: 700;
    color: var(--qc-color-primary-dark, #5227cf);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--qc-color-border, #e2e8f0); /* Lighter border */
    display: flex;
    align-items: center;
}
.glossary-section__title-icon { /* BEM class for icon */
     margin-right: 0.75rem;
     color: var(--qc-color-primary, #6a3de8);
     font-size: 1.8rem; /* Adjust icon size */
}
.glossary-section__list {
    list-style: none;
    padding: 0;
    column-count: 1;
    column-gap: 2rem; /* Increased gap */
}
@media (min-width: 576px) { /* Small devices (landscape phones, 576px and up) */
    .glossary-section__list {
        column-count: 2;
    }
}
@media (min-width: 992px) { /* Medium devices (tablets, 768px and up) */
    .glossary-section__list {
        column-count: 3;
    }
}
.glossary-section__item {
    margin-bottom: 0.9rem; /* Increased bottom margin */
    break-inside: avoid-column;
    padding: 0.25rem 0;
}
.glossary-section__link {
    color: var(--qc-color-text-dark, #1a2a42);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem; /* Standardized font size */
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    position: relative;
    padding-left: 1.25rem; /* Space for pseudo-element */
    cursor: pointer;
}
.glossary-section__link::before { /* Bullet-like pseudo-element */
    content: '•';
    position: absolute;
    left: 0;
    color: var(--qc-color-primary, #6a3de8);
    font-weight: bold;
    transition: transform 0.2s ease;
}
.glossary-section__link:hover {
    color: var(--qc-color-primary, #6a3de8);
    transform: translateX(4px); /* Subtle shift */
}
.glossary-section__link:hover::before {
    transform: scale(1.5); /* Enlarge bullet on hover */
}
.glossary-section__no-terms {
    color: var(--qc-color-text-light, #4a5568);
    font-style: italic;
    padding: 1rem 0;
    text-align: center;
}
.glossary-section--empty {
    opacity: 0.7;
    border-top-color: var(--qc-color-border, #e2e8f0);
    /* Placeholder for letters with no terms: hidden by default, matches the
       former style="display: none;" on this element in the template. Search
       filtering (osha-glossary-index.js) only ever re-hides it via inline
       style, never reveals it, so a plain (non-!important) rule here is
       always safely overridable if that ever changes. */
    display: none;
}
.glossary-section--empty .glossary-section__title {
    color: var(--qc-color-text-light, #4a5568);
}
 .glossary-section--empty .glossary-section__title-icon {
    color: var(--qc-color-text-light, #4a5568);
}

/* How to Use This Glossary */
.glossary-index__how-to {
    background-color: var(--qc-color-bg-light, #f7f9fc);
    border-radius: var(--qc-radius-lg, 12px);
    padding: 2rem;
    margin-bottom: 3rem;
    margin-top: -2rem;
}
.glossary-index__how-to-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--qc-color-primary-dark, #5227cf);
    margin-bottom: 1.5rem;
}
.glossary-index__how-to-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.glossary-index__how-to-item {
    display: flex;
    gap: 1rem;
}
.glossary-index__how-to-icon {
    color: var(--qc-color-primary, #6a3de8);
    font-size: 1.75rem;
    flex-shrink: 0;
}
.glossary-index__how-to-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--qc-color-primary-dark, #5227cf);
    font-size: 1.1rem;
}
.glossary-index__how-to-content p {
    margin: 0;
    color: var(--qc-color-text-dark, #1a2a42);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* CTA Section */
.glossary-index__cta {
    background: linear-gradient(135deg, var(--qc-color-primary, #6a3de8), var(--qc-color-primary-dark, #5227cf));
    color: white;
    border-radius: var(--qc-radius-lg, 12px);
    padding: 2.5rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: var(--qc-shadow-lg);
}
.glossary-index__cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.glossary-index__cta-text {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.glossary-index__cta-button {
    display: inline-block;
    background-color: white;
    color: var(--qc-color-primary, #6a3de8);
    padding: 0.75rem 2rem;
    border-radius: var(--qc-radius-md, 8px);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.glossary-index__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}
@media (min-width: 576px) {
    .container { max-width: 540px; }
}
@media (min-width: 768px) {
    .container { max-width: 720px; }
}
@media (min-width: 992px) {
    .container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

/* "No results" search message (osha-glossary-index.js toggles this via
   inline style when a search yields zero matches) -- was
   style="display: none; text-align: center; font-size: 1.1rem;
   margin-top: 2rem;" directly on #noResultsMessage. Hidden by default here;
   the script's explicit inline style="display:block" (an author-normal
   declaration with higher specificity than this class selector) still wins
   when it shows the message, exactly as it did against the old inline
   style. */
.glossary-index__no-results {
    display: none;
    text-align: center;
    font-size: 1.1rem;
    margin-top: 2rem;
}

/* Icon inside the "no results" message -- was
   style="vertical-align: middle; margin-right: 0.5rem;" on the icon span. */
.glossary-index__no-results-icon {
    vertical-align: middle;
    margin-right: 0.5rem;
}
