/**
 * Glossary public pages styling.
 */

/* --- Term page --- */
.poznet-term {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.poznet-term__header {
    margin-bottom: 2rem;
}

.poznet-term__title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.poznet-term__subtitle {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

/* Difficulty badge styles are defined below with HowTo styles */

/* --- TOC --- */
.poznet-toc {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.poznet-toc__title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.poznet-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.poznet-toc li {
    margin: 0.25rem 0;
}

.poznet-toc a {
    color: #2271b1;
    text-decoration: none;
}

.poznet-toc a:hover {
    text-decoration: underline;
}

/* --- FAQ --- */
.poznet-faq {
    margin: 2rem 0;
}

.poznet-faq__item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.poznet-faq__question {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    background: #f8f9fa;
    list-style: none;
}

.poznet-faq__question::-webkit-details-marker {
    display: none;
}

.poznet-faq__question::before {
    content: "+";
    display: inline-block;
    width: 1.5em;
    font-weight: bold;
    color: #2271b1;
}

details[open] .poznet-faq__question::before {
    content: "-";
}

.poznet-faq__answer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e9ecef;
}

/* --- Backlinks --- */
.poznet-backlinks {
    margin: 2rem 0;
}

.poznet-backlinks__list {
    list-style: none;
    padding: 0;
}

.poznet-backlinks__item {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.poznet-backlinks__link {
    font-weight: 600;
    color: #2271b1;
    text-decoration: none;
}

.poznet-backlinks__link:hover {
    text-decoration: underline;
}

.poznet-backlinks__date {
    font-size: 0.85rem;
    color: #888;
    margin-left: 0.5rem;
}

.poznet-backlinks__context {
    font-size: 0.9rem;
    color: #555;
    margin: 0.25rem 0 0;
}

/* --- Related Terms --- */
.poznet-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.poznet-related__card {
    display: block;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.poznet-related__card:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.poznet-related__card-title {
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.poznet-related__card-def {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* --- Archive --- */
.poznet-archive {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.poznet-archive__header {
    text-align: center;
    margin-bottom: 2rem;
}

.poznet-archive__title {
    font-size: clamp(1.5rem, 4vw + 1rem, 2.5rem);
    margin-bottom: 0.5rem;
}

.poznet-archive__intro {
    color: #666;
    font-size: 1.1rem;
}

/* Filters */
.poznet-archive__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.poznet-archive__filter-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.poznet-archive__filter-link {
    padding: 8px 16px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 16px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

.poznet-archive__filter-link:hover,
.poznet-archive__filter-link--active {
    background: #2271b1;
    color: #fff;
}

.poznet-archive__filter-count {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* A-Z index */
.poznet-archive__az-index {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.poznet-archive__az-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.poznet-archive__az-link:hover {
    background: #2271b1;
    color: #fff;
}

/* Letter sections */
.poznet-archive__letter-section {
    margin-bottom: 2rem;
}

.poznet-archive__letter {
    font-size: 1.5rem;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 0.25rem;
    margin-bottom: 1rem;
}

.poznet-archive__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.poznet-archive__card {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
}

.poznet-archive__card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.poznet-archive__card-title {
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.poznet-archive__card-title a {
    color: #2271b1;
    text-decoration: none;
}

.poznet-archive__card-fullname {
    font-size: 0.85rem;
    color: #888;
    margin: 0 0 0.25rem;
}

.poznet-archive__card-def {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
}

/* --- Breadcrumbs --- */
.poznet-breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.poznet-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}

.poznet-breadcrumbs__item::after {
    content: ">";
    margin-left: 0.25rem;
    color: #999;
}

.poznet-breadcrumbs__item:last-child::after {
    display: none;
}

.poznet-breadcrumbs__item a {
    color: #2271b1;
    text-decoration: none;
    padding: 8px 4px;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.poznet-breadcrumbs__item--current {
    color: #666;
}

/* --- VS page --- */
.poznet-vs {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.poznet-vs__verdict {
    background: #f0f7ff;
    border: 1px solid #c8ddf0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.poznet-vs__term-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.poznet-vs__term-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 2px solid #2271b1;
    border-radius: 8px;
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.poznet-vs__term-link:hover {
    background: #2271b1;
    color: #fff;
}

/* --- Comparison table --- */
.poznet-comparison-table__wrapper {
    overflow-x: auto;
    position: relative;
}

.poznet-comparison-table__wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Show scroll indicator only when content overflows */
@media (max-width: 600px) {
    .poznet-comparison-table__wrapper::after {
        opacity: 1;
    }

    .poznet-comparison-table__table {
        min-width: 500px;
    }
}

.poznet-comparison-table__table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.poznet-comparison-table__table th,
.poznet-comparison-table__table td {
    padding: 0.75rem 1rem;
    border: 1px solid #e9ecef;
    text-align: left;
}

.poznet-comparison-table__table thead th {
    background: #f8f9fa;
    font-weight: 600;
}

.poznet-comparison-table__table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* --- HowTo page --- */
.poznet-howto {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.poznet-howto__meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Shared difficulty badge */
.poznet-term__difficulty,
.poznet-howto__difficulty {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.poznet-term__difficulty--easy, .poznet-howto__difficulty--easy { background: #d4edda; color: #155724; }
.poznet-term__difficulty--medium, .poznet-howto__difficulty--medium { background: #fff3cd; color: #856404; }
.poznet-term__difficulty--advanced, .poznet-howto__difficulty--advanced { background: #f8d7da; color: #721c24; }

.poznet-howto__steps-list {
    list-style: none;
    padding: 0;
    counter-reset: step;
}

.poznet-howto__step {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.poznet-howto__step-title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.poznet-howto__step-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* --- Taxonomy --- */
.poznet-taxonomy {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.poznet-taxonomy__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

/* --- Missing element styles --- */

.poznet-term__content,
.poznet-vs__content,
.poznet-howto__content {
    margin: 2rem 0;
    line-height: 1.7;
}

.poznet-term__external {
    margin: 2rem 0;
}

.poznet-term__external ul {
    list-style: none;
    padding: 0;
}

.poznet-term__external li {
    margin: 0.5rem 0;
}

.poznet-term__external a {
    color: #2271b1;
    text-decoration: none;
}

.poznet-term__external a:hover {
    text-decoration: underline;
}

.poznet-vs__header,
.poznet-howto__header {
    margin-bottom: 2rem;
}

.poznet-vs__title,
.poznet-howto__title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.poznet-vs__terms {
    margin: 2rem 0;
}

.poznet-howto__tools {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.poznet-howto__tools h2 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.poznet-howto__tools ul {
    margin: 0;
    padding-left: 1.25rem;
}

.poznet-howto__step-desc {
    margin-top: 0.5rem;
    line-height: 1.6;
}

.poznet-howto__related-term {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: #f0f7ff;
    border-radius: 8px;
}

.poznet-faq__list {
    margin-top: 1rem;
}

.poznet-taxonomy__header {
    margin-bottom: 2rem;
}

.poznet-taxonomy__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.poznet-taxonomy__desc {
    color: #666;
    font-size: 1rem;
}

.poznet-archive__empty {
    text-align: center;
    color: #888;
    padding: 3rem 1rem;
    font-size: 1.1rem;
}

/* Focus styles for interactive elements */
.poznet-archive__filter-link:focus-visible,
.poznet-archive__az-link:focus-visible,
.poznet-related__card:focus-visible,
.poznet-vs__term-link:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .poznet-archive__grid,
    .poznet-taxonomy__grid,
    .poznet-related__grid {
        grid-template-columns: 1fr;
    }

    .poznet-term__title {
        font-size: 1.5rem;
    }
}
