/* ─────────────────────────────────────────────────────────────────────────────
   Oko na Sztukę — [oko_catalog] shortcode styles
   ───────────────────────────────────────────────────────────────────────────── */

.oko-catalog {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: #111827;
}

/* ── Header ── */
.oko-cat-header {
    margin-bottom: 28px;
}

.oko-cat-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    line-height: 1.2;
}

.oko-cat-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

/* ── Filter bar ── */
.oko-cat-filter-bar {
    margin-bottom: 28px;
    overflow: hidden;
}

/* Technique chips row: icon + label + chips on one line */
.oko-cat-filter-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 5px 0px 20px 0px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.oko-cat-filter-label-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.oko-cat-filter-label-group svg {
    color: #374151;
}

/* ── Chip shared (mirrors panel.css exactly) ── */
.oko-chip-cb-hidden { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.oko-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.oko-chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1.5px solid rgba(0,0,0,0.12); border-radius: 0.5rem; background: #fff; color: #717182; font-size: 12.5px; font-weight: 400; font-family: inherit; cursor: pointer; white-space: nowrap; user-select: none; transition: border-color 0.12s, background 0.12s, color 0.12s; }
.oko-chip-btn:hover { border-color: rgba(139,0,255,0.35); color: #030213; background-color: #fff; }
.oko-chip-btn.is-active { background: #9810fa; border-color: #9810fa; color: #fff; font-weight: 500; }
.oko-chip-btn.is-active:hover { background: #7200d0; border-color: #7200d0; color: #fff; }
.oko-chip-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 999px; background: rgba(0,0,0,0.07); color: #717182; font-size: 10px; font-weight: 600; padding: 0 4px; flex-shrink: 0; }
.oko-chip-btn.is-active .oko-chip-badge { background: rgba(255,255,255,0.22); color: #fff; }

/* ── Filter fields section (mirrors admin panel) ── */
.oko-filter-fields-section { padding: 20px 0px 10px 0px; }

.oko-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.oko-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 100px;
}

.oko-filter-label {
    font-size: 11px;
    font-weight: 500;
    color: #717182;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}

input.oko-filter-input {
    height: 36px;
    padding: 7px 11px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.625rem;
    font-size: 13px;
    color: #030213;
    background: #f3f3f5;
    outline: none;
    font-family: inherit;
    transition: border-color 0.12s, background 0.12s;
    width: 100%;
    box-sizing: border-box;
}

.oko-filter-input:focus { border-color: #9810fa; background: #fff; }

/* AND/OR toggle */
.oko-toggle-group {
    display: flex;
    background: #f3f3f5;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 0.625rem;
    padding: 3px;
    gap: 2px;
    flex-shrink: 0;
}

.oko-toggle-btn {
    padding: 4px 12px;
    border-radius: 0.5rem;
    font-size: 12px;
    font-weight: 500;
    color: #717182;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}

.oko-toggle-btn.is-active { background: #9810fa; color: #fff; }

/* Year range */
.oko-year-range { display: flex; align-items: center; gap: 6px; }
.oko-year-range .oko-filter-input { width: 90px; min-width: 0; }
.oko-year-sep { font-size: 13px; color: #aaa; flex-shrink: 0; }

/* Filter actions */
.oko-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.oko-filter-btn-search,
.oko-filter-btn-clear,
.oko-filter-btn-export{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 0.625rem;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
}

.oko-filter-btn-search {
    background: #9810fa;
    border-color: #9810fa;
    color: #fff;
    border: none;
    height: 33px;
}
.oko-filter-btn-search:hover { background: #7200d0; }

.oko-filter-btn-clear,
.oko-filter-btn-export{
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    color: #717182;
    text-decoration: none;
    height: 33px;
}
.oko-filter-btn-clear:hover, .oko-filter-btn-export:hover { background: #f3f3f5; }

/* ── Results info ── */
.oko-cat-results-info {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 20px;
}

.oko-cat-active-filter {
    color: #9810fa;
}

/* ── Grid ── */
.oko-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

/* ── Card ── */
.oko-cat-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid #F3F4F6;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, transform 0.15s;
    text-decoration: none !important;
}

.oko-cat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* ── Card image ── */
.oko-cat-card-img-wrap {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #F3F4F6;
    flex-shrink: 0;
}

.oko-cat-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.oko-cat-card:hover .oko-cat-card-img {
    transform: scale(1.04);
}

.oko-cat-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
}

/* ── Card body ── */
.oko-cat-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Technique badge ── */
.oko-cat-technique-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(139,0,255,0.08);
    color: #9810fa;
    margin-bottom: 8px;
    white-space: nowrap;
}

/* ── Card name ── */
.oko-cat-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px !important;
}

/* ── Card author ── */
.oko-cat-card-author {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 2px;
}

/* ── Card year ── */
.oko-cat-card-year {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 8px;
}

/* ── Card location ── */
.oko-cat-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #9810fa;
    margin-top: auto;
    padding-top: 8px;
}

.oko-cat-card-location svg {
    flex-shrink: 0;
}

/* ── Empty state ── */
.oko-cat-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6B7280;
    font-size: 14px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.oko-cat-empty-sub {
    font-size: 13px;
    color: #9CA3AF;
    margin: 4px 0 0;
}

/* ── Pagination ── */
.oko-cat-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.oko-cat-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1.5px solid #E5E7EB;
    background: #fff;
    font-size: 13px;
    color: #374151;
    text-decoration: none !important;
    transition: background 0.12s, border-color 0.12s;
    font-family: inherit;
    white-space: nowrap;
}

.oko-cat-page-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.oko-cat-page-btn.active {
    background: #9810fa;
    border-color: #9810fa;
    color: #fff;
    font-weight: 600;
}

.oko-cat-page-ellipsis {
    font-size: 13px;
    color: #9CA3AF;
    padding: 0 4px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .oko-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .oko-cat-grid { grid-template-columns: 1fr; }
    .oko-cat-filter-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .oko-filter-row { flex-direction: column; }
    .oko-filter-field { max-width: unset !important; min-width: 0; width: 100%; }
    .oko-year-range .oko-filter-input { width: 100%; }
	.oko-toggle-btn { width: 50%; }
}

/* ── Card as link ─────────────────────────────────────────────── */
a.oko-cat-card {
    text-decoration: none;
    color: inherit;
}

/* ── [oko_top_viewed] widget ────────────────────────────────────── */
.oko-top-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.oko-top-img-wrap {
    position: relative;
}
.oko-top-num-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #9810fa;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    line-height: 1;
}
.oko-top-grid .oko-cat-card-name {
    font-size: 18px;
}
@media (max-width: 900px) {
    .oko-top-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .oko-top-grid { grid-template-columns: 1fr; }
}
