/*
 Theme Name: Workplace Safety
 Theme URI: https://www.elegantthemes.com/gallery/divi/
 Description: Divi Child Theme
 Author: Netpower
 Author URI: https://netpower.no
 Template: Divi
 Version: 1.0.1
*/
 
/* =Theme customization starts here
------------------------------------------------------- */

/* Module wrappers: full-module anchor links (Person + Blurb) */
a.np_person_link,
a.np_blurb_link,
a.np_person_link:hover,
a.np_blurb_link:hover,
a.np_person_link:focus,
a.np_blurb_link:focus {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Accordion accessibility: real <button> wrapping the toggle title text.
   Reset native button styles so it visually matches the original heading,
   then add a visible focus ring for keyboard users. */
.et_pb_accordion .ws-toggle-button {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    cursor: pointer;
    display: block;
    width: 100%;
}

.et_pb_accordion .ws-toggle-button:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Group heading auto-injected before the first item of each np_group value. */
.et_pb_accordion .ws-toggle-group-heading {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: #006666;
    margin: 32px 0 16px;
    padding: 0;
}
.et_pb_accordion .ws-toggle-group-heading:first-child {
    margin-top: 0;
}

/* =============================================================
   WS Search module — FAQ live search + global WP search input
   ============================================================= */
.ws-search {
    position: relative;
    max-width: 600px;
}
.ws-search__form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
}
.ws-search__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 18px;
    border: 2px solid #006666;
    border-radius: 100px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s ease;
}
.ws-search__input:focus { border-color: #004d4d; }
.ws-search__button {
    background-color: #006666;
    color: #fff;
    border: 0;
    border-radius: 100px;
    padding: 10px 22px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.ws-search__button:hover,
.ws-search__button:focus { background-color: #004d4d; }

/* Dropdown is portaled to <body> at runtime to escape Divi stacking contexts.
   The non-portal rules below are only a fallback when JS hasn't moved it yet. */
.ws-search__results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-height: 380px;
    overflow-y: auto;
    z-index: 99999;
    display: none;
}
.ws-search__results--portal {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    z-index: 2147483647;
}
.ws-search__results.is-open { display: block; }

.ws-search__result {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.ws-search__result:last-child { border-bottom: 0; }
.ws-search__result:hover,
.ws-search__result.is-active { background: #f1f8f8; }
.ws-search__result-q {
    font-weight: 600;
    color: #006666;
    margin-bottom: 4px;
}
.ws-search__result-s {
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}
.ws-search__result mark {
    background: #cdebeb;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}
.ws-search__empty {
    padding: 14px 16px;
    color: #777;
    font-style: italic;
}
.ws-search__fallback-row {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}
.ws-search__fallback {
    display: inline-block;
    color: #006666;
    font-weight: 600;
    text-decoration: none;
}
.ws-search__fallback:hover,
.ws-search__fallback:focus { text-decoration: underline; }

.ws-faq-flash { animation: wsFaqFlash 1.8s ease; }
@keyframes wsFaqFlash {
    0%, 30% { box-shadow: 0 0 0 3px #ffd84d inset; }
    100%    { box-shadow: 0 0 0 0 transparent inset; }
}

@media (max-width: 768px) {
    .ws-search { max-width: 100%; }
    .ws-search__button { width: 100%; }
}

