/* Juliana Nails Glossary - frontend v0.3.1 */
.jnds-glossary,
.jnds-glossary * {
    box-sizing: border-box;
}

.jnds-glossary {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: inherit;
}

.jnds-glossary__header {
    max-width: 820px;
    margin: 0 0 30px;
}

.jnds-glossary__title {
    margin: 0 0 10px;
    font-size: clamp(27px, 3vw, 42px);
    line-height: 1.13;
    font-weight: 750;
    letter-spacing: -.02em;
}

.jnds-glossary__intro {
    margin: 0;
    max-width: 760px;
    font-size: clamp(15px, 1.3vw, 18px);
    line-height: 1.65;
    color: #626262;
}

.jnds-glossary__search-wrap {
    margin: 0 0 18px;
}

.jnds-glossary__search-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.jnds-glossary__search-field {
    position: relative;
    max-width: 720px;
}

.jnds-glossary__search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 50%;
    transform: translateY(-56%);
    opacity: .55;
    pointer-events: none;
}

.jnds-glossary__search-icon::after {
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 7px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
    content: '';
}

.jnds-glossary__search {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 18px 12px 50px;
    border: 1px solid #dcdcdc;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 16px;
    line-height: 1.35;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.jnds-glossary__search:focus {
    border-color: #222;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
}

.jnds-glossary__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 30px;
}

.jnds-glossary__alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.jnds-glossary__letter {
    appearance: none;
    min-width: 34px;
    min-height: 34px;
    margin: 0;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: #f4f4f4;
    color: #333;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}

.jnds-glossary__letter:hover,
.jnds-glossary__letter:focus-visible {
    border-color: #d7d7d7;
    background: #fff;
    outline: none;
}

.jnds-glossary__letter.is-active {
    border-color: #222;
    background: #222;
    color: #fff;
}

.jnds-glossary__count {
    flex: 0 0 auto;
    color: #777;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.jnds-glossary__section {
    margin: 0 0 34px;
}

.jnds-glossary__section[hidden],
.jnds-glossary__term[hidden] {
    display: none !important;
}

.jnds-glossary__section-title {
    margin: 0 0 10px;
    padding: 9px 14px;
    border-radius: 10px;
    background: #f3f3f3;
    color: #171717;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
}

.jnds-glossary__terms {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jnds-glossary__term {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.jnds-glossary__term-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 8px;
    color: inherit;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color .14s ease, transform .14s ease;
}

.jnds-glossary__term-link:hover,
.jnds-glossary__term-link:focus-visible {
    background: #f7f7f7;
    color: inherit;
    outline: none;
}

.jnds-glossary__term-link:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .15);
}

.jnds-glossary__term-arrow {
    flex: 0 0 auto;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .14s ease, transform .14s ease;
}

.jnds-glossary__term-link:hover .jnds-glossary__term-arrow,
.jnds-glossary__term-link:focus-visible .jnds-glossary__term-arrow {
    opacity: .65;
    transform: translateX(0);
}

.jnds-glossary__no-results {
    margin: 24px 0 0;
    padding: 24px;
    border-radius: 12px;
    background: #f7f7f7;
    text-align: center;
}

/* Individual glossary entries: restrained defaults only; the theme keeps control. */
.single-glossary .entry-content {
    line-height: 1.7;
}

.single-glossary .entry-content > :first-child {
    margin-top: 0;
}

@media (max-width: 900px) {
    .jnds-glossary__terms {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .jnds-glossary__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 650px) {
    .jnds-glossary__header {
        margin-bottom: 24px;
    }

    .jnds-glossary__search {
        min-height: 50px;
        border-radius: 12px;
    }

    .jnds-glossary__toolbar {
        margin-bottom: 24px;
    }

    .jnds-glossary__alphabet {
        gap: 5px;
    }

    .jnds-glossary__letter {
        min-width: 32px;
        min-height: 32px;
        padding: 5px 8px;
    }

    .jnds-glossary__terms {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3px 8px;
    }

    .jnds-glossary__term-link {
        min-height: 38px;
        padding: 7px 8px;
        font-size: 13px;
    }

    .jnds-glossary__term-arrow {
        display: none;
    }
}

@media (max-width: 390px) {
    .jnds-glossary__terms {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jnds-glossary__search,
    .jnds-glossary__letter,
    .jnds-glossary__term-link,
    .jnds-glossary__term-arrow {
        transition: none;
    }
}
