/**
 * PTA Knowledge Hub — Glossary Page Styles
 *
 * Scoped under .ptk-glossary-wrap to prevent theme conflicts.
 */

.ptk-glossary-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Hero */
.ptk-glossary-wrap .ptk-glossary-hero {
    text-align: center;
    margin-bottom: 24px;
}
.ptk-glossary-wrap .ptk-glossary-title {
    font-size: 34px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.2;
}
.ptk-glossary-wrap .ptk-glossary-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 20px;
}

/* Search */
.ptk-glossary-wrap .ptk-glossary-search-wrap {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}
.ptk-glossary-wrap .ptk-glossary-search {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ptk-glossary-wrap .ptk-glossary-search:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.ptk-glossary-wrap .ptk-glossary-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: flex;
}

/* A–Z Navigation */
.ptk-glossary-wrap .ptk-glossary-az {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}
.ptk-glossary-wrap .ptk-az-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.ptk-glossary-wrap .ptk-az-active {
    color: #115e59;
    background: #ccfbf1;
}
.ptk-glossary-wrap .ptk-az-active:hover {
    background: #99f6e4;
    color: #0f766e;
}
.ptk-glossary-wrap .ptk-az-disabled {
    color: #d1d5db;
    cursor: default;
}

/* Term count */
.ptk-glossary-wrap .ptk-glossary-count {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 24px;
}

/* Letter Group */
.ptk-glossary-wrap .ptk-glossary-group {
    margin-bottom: 32px;
}
.ptk-glossary-wrap .ptk-glossary-letter {
    font-size: 22px;
    font-weight: 700;
    color: #14b8a6;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #ccfbf1;
}

/* Entry */
.ptk-glossary-wrap .ptk-glossary-entry {
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.ptk-glossary-wrap .ptk-glossary-entry:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #99f6e4;
}

.ptk-glossary-wrap .ptk-glossary-entry-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    transition: color 0.15s;
}
.ptk-glossary-wrap .ptk-glossary-entry-title:hover {
    color: #0f766e;
}

.ptk-glossary-wrap .ptk-glossary-entry-definition {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 6px 0 0;
}

/* Empty / No Results */
.ptk-glossary-wrap .ptk-glossary-empty,
.ptk-glossary-wrap .ptk-glossary-no-results {
    text-align: center;
    padding: 48px 20px;
    color: #6b7280;
}
.ptk-glossary-wrap .ptk-glossary-empty-icon {
    color: #9ca3af;
    margin-bottom: 12px;
}
.ptk-glossary-wrap .ptk-glossary-empty h2,
.ptk-glossary-wrap .ptk-glossary-no-results p {
    color: #374151;
    font-size: 16px;
    margin: 0 0 8px;
}
.ptk-glossary-wrap .ptk-glossary-empty p {
    font-size: 14px;
    margin: 0 0 20px;
}

/* Footer / Back Link */
.ptk-glossary-wrap .ptk-glossary-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}
.ptk-glossary-wrap .ptk-glossary-back-link {
    color: #14b8a6;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.ptk-glossary-wrap .ptk-glossary-back-link:hover {
    text-decoration: underline;
    color: #0f766e;
}

/* Focus Visible — Keyboard accessibility */
.ptk-glossary-wrap a:focus-visible,
.ptk-glossary-wrap input:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ptk-glossary-wrap * { transition-duration: 0.01ms !important; }
}

/* Responsive */
@media (max-width: 640px) {
    .ptk-glossary-wrap .ptk-glossary-title {
        font-size: 28px;
    }
    .ptk-glossary-wrap .ptk-az-letter {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Print */
@media print {
    .ptk-glossary-wrap .ptk-glossary-search-wrap,
    .ptk-glossary-wrap .ptk-glossary-az,
    .ptk-glossary-wrap .ptk-glossary-footer { display: none; }
    .ptk-glossary-wrap { padding: 0; }
}
