/* ================================================================
   Offside Zamka – Quiz Archive & Single Quiz styles
   Loaded only on: is_post_type_archive('oz_quiz') || is_singular('oz_quiz')
   ================================================================ */

/* Archive hero */
.oz-archive-hero {
    background:
        radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(135deg, #111 0%, #1a1a1a 60%, #1f1a00 100%);
    background-size: 26px 26px, 100% 100%;
    padding: 48px 0 40px;
    border-bottom: 3px solid var(--oz-yellow);
}

.oz-archive-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 197, 24, .12);
    border: 1px solid rgba(245, 197, 24, .3);
    color: var(--oz-yellow);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.oz-archive-hero-title {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    color: var(--oz-white);
    margin: 0 0 10px;
}

.oz-archive-hero-sub {
    color: var(--oz-gray);
    font-size: 15px;
    margin: 0;
}

/* Filter bar */
.oz-filter-bar {
    background: var(--oz-white);
    border-bottom: 1px solid var(--oz-border);
    position: sticky;
    top: 70px;
    z-index: 90;
    padding: 14px 0;
}

.oz-filter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Category pills */
.oz-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.oz-filter-pill {
    display: inline-block;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    border: 1.5px solid var(--oz-border);
    border-radius: 20px;
    color: var(--oz-black);
    background: var(--oz-white);
    text-decoration: none;
    transition: border-color .15s, background .15s, color .15s;
    white-space: nowrap;
}

.oz-filter-pill:hover {
    border-color: var(--oz-yellow);
    color: var(--oz-black);
    text-decoration: none;
}

.oz-filter-pill.active {
    background: var(--oz-yellow);
    border-color: var(--oz-yellow);
    color: var(--oz-black);
}

/* Sort + count */
.oz-filter-right {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 16px;
    flex-shrink: 0;
    margin-bottom: 32px;
}

.oz-filter-count {
    font-size: 13px;
    color: var(--oz-gray);
    white-space: nowrap;
}

.oz-sort-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.oz-sort-select {
    padding: 7px 32px 7px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: 1.5px solid var(--oz-border);
    border-radius: 8px;
    background: var(--oz-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    color: var(--oz-black);
}

.oz-sort-select:focus {
    outline: 2px solid var(--oz-yellow);
    border-color: var(--oz-yellow);
}

/* Archive body */
.oz-archive-body {
    padding: 16px 0 64px;
    background: var(--oz-light);
}

/* Quiz grid — 4 columns default */
.oz-quiz-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

@media (max-width: 1100px) {
    .oz-quiz-archive-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
    .oz-quiz-archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .oz-quiz-archive-grid { grid-template-columns: 1fr; }
}

/* Quiz card */
.oz-quiz-archive-card {
    background: var(--oz-white);
    border-radius: var(--oz-radius);
    overflow: hidden;
    border: 1px solid var(--oz-border);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

.oz-quiz-archive-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, .1);
}

/* Card image */
.oz-quiz-archive-img-wrap {
    display: block;
    position: relative;
    height: 160px;
    overflow: hidden;
    background: #1e1e12;
}

.oz-quiz-archive-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.oz-quiz-archive-card:hover .oz-quiz-archive-img-wrap img {
    transform: scale(1.05);
}

.oz-quiz-archive-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e1e12 0%, #2a2a18 100%);
}

/* Difficulty & new badges */
.oz-badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    background: #22B24C;
    color: #fff;
    padding: 3px 9px;
    border-radius: 4px;
    text-transform: uppercase;
}

.oz-badge-diff {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 3px 9px;
    border-radius: 4px;
    text-transform: uppercase;
    color: #fff;
}

.oz-diff-easy   { background: #22B24C; }
.oz-diff-medium { background: #E67E22; }
.oz-diff-hard   { background: #DC3232; }

.oz-badge-auth {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 3px 9px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* Card body */
.oz-quiz-archive-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.oz-quiz-archive-cat {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: var(--oz-dark);
    color: var(--oz-yellow);
    padding: 3px 10px;
    border-radius: 3px;
    width: fit-content;
}

.oz-quiz-archive-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
}

.oz-quiz-archive-title a {
    color: var(--oz-black);
    text-decoration: none;
}

.oz-quiz-archive-title a:hover {
    color: var(--oz-yellow);
}

.oz-quiz-archive-meta {
    font-size: 12px;
    color: var(--oz-gray);
    margin: 0;
    line-height: 1.5;
}

.oz-quiz-archive-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.oz-quiz-archive-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity .15s, transform .15s;
    flex: 1;
}

.oz-quiz-archive-btn:hover {
    opacity: .85;
    transform: translateY(-1px);
    text-decoration: none;
}

.oz-quiz-archive-btn-play {
    background: var(--oz-yellow);
    color: var(--oz-black);
}

.oz-quiz-archive-btn-detail {
    background: transparent;
    color: var(--oz-black);
    border: 1.5px solid var(--oz-border);
}

.oz-quiz-archive-btn-detail:hover {
    border-color: var(--oz-black);
    color: var(--oz-black);
}

/* Pagination */
.oz-archive-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.oz-archive-pagination a,
.oz-archive-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    border: 1.5px solid var(--oz-border);
    color: var(--oz-black);
    text-decoration: none;
    background: var(--oz-white);
    transition: all .15s;
}

.oz-archive-pagination a:hover,
.oz-archive-pagination span.current {
    background: var(--oz-yellow);
    border-color: var(--oz-yellow);
    color: var(--oz-black);
}

/* Empty state */
.oz-archive-empty {
    text-align: center;
    padding: 80px 24px;
    background: var(--oz-white);
    border: 2px dashed var(--oz-border);
    border-radius: var(--oz-radius);
}

.oz-archive-empty-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 20px;
}

.oz-archive-empty h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.oz-archive-empty p {
    color: var(--oz-gray);
    margin: 0;
    line-height: 1.7;
}

/* Filter bar mobile */
@media (max-width: 768px) {
    .oz-filter-bar {
        top: 0;
        position: relative;
    }

    .oz-filter-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .oz-filter-right {
        width: 100%;
    }

    .oz-filter-count {
        font-size: 12px;
    }
}
