/* Showcase-specific styles — loaded on showcase and entry pages */

/* ─── Home page showcase rotator ─────────────────────────── */
.showcase-rotator {
    display: grid;
    margin-bottom: 2rem;
}

.showcase-rotator .showcase-card {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    pointer-events: none;
}

.showcase-rotator .showcase-card.active {
    opacity: 1;
    pointer-events: auto;
}

.showcase-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}

.showcase-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow);
}

.showcase-card-img {
    aspect-ratio: 16/9;
    background: var(--color-surface-2);
    overflow: hidden;
}

.showcase-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showcase-card-img--no-preview {
    background: linear-gradient(135deg, var(--color-surface-2) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-bottom: 1px solid rgba(249, 115, 22, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-card-img-placeholder {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.showcase-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.showcase-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.showcase-card-url {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.showcase-card-url a {
    color: inherit;
    text-decoration: none;
}

.showcase-card-url a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.showcase-card-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.showcase-card-author { display: flex; align-items: center; gap: 0.4rem; }

/* Showcase entry (single) page */
.showcase-entry { padding: 2.5rem 0 4rem; }

.entry-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.entry-og-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
    max-height: 400px;
}

.entry-og-image img { width: 100%; object-fit: cover; }

.entry-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

/* <details>-based owner controls */
.entry-edit-details,
.entry-delete-details,
.entry-report-details {
    display: inline-block;
}

.entry-edit-details > summary,
.entry-delete-details > summary,
.entry-report-details > summary {
    list-style: none;
    cursor: pointer;
}

.entry-edit-details > summary::-webkit-details-marker,
.entry-delete-details > summary::-webkit-details-marker,
.entry-report-details > summary::-webkit-details-marker { display: none; }

.entry-edit-form,
.entry-delete-confirm,
.entry-report-form {
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    min-width: 300px;
}

/* Admin hidden notice */
.admin-hidden-notice {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #ef4444;
}

/* Submit form */
.showcase-submit-form { max-width: 560px; }

.submit-criteria {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    max-width: 560px;
}

.submit-criteria-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.submit-criteria-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.submit-criteria-list li {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    padding-left: 1rem;
    position: relative;
}

.submit-criteria-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.submit-criteria-scan {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    opacity: 0.75;
    line-height: 1.5;
    margin: 0;
}

/* Muted link button */
.btn-link-muted {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.35rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.btn-link-muted:hover { color: var(--color-text); }

/* Entry-level action links (owner controls) */
.entry-action-link {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    list-style: none;
}
.entry-action-link:hover { color: var(--color-text); }
.entry-action-link--danger { color: rgba(239, 68, 68, 0.7); }
.entry-action-link--danger:hover { color: #ef4444; }

/* Refresh metadata icon button */
.refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s;
}
.refresh-btn:hover { color: var(--color-text); }
.refresh-btn:hover svg { transform: rotate(90deg); transition: transform 0.3s ease; }
.refresh-btn svg { transition: transform 0.3s ease; }
.refresh-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Dangerous link button variant */
.btn-link--danger { color: rgba(239, 68, 68, 0.8); }
.btn-link--danger:hover { color: #ef4444; }

/* ─── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 1rem 0;
}

.pagination-btn {
    padding: 0.5rem 1.1rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 0.9rem;
    transition: background 0.15s;
}
.pagination-btn:hover { background: var(--color-surface); text-decoration: none; }
.pagination-info { color: var(--color-text-muted); font-size: 0.9rem; }

/* ─── Comments ────────────────────────────────────────────── */
.comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.comments-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.comments-count {
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 0.95em;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    max-width: 680px;
}

.comment-login-prompt {
    margin-bottom: 2rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 760px;
}

.comment {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--color-surface);
}

.comment.reply {
    margin-left: 2rem;
    background: var(--color-surface-2);
    border-color: transparent;
}

.comment-replies {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.comment-header-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comment-flag-link {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.35;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.comment-flag-link:hover { opacity: 1; }

.comment-author {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.875rem;
}

.comment-time, .comment-edited {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.badge-helpful {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin-hidden {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.comment-body {
    color: var(--color-text);
    font-size: 0.925rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 0.65rem;
}

.comment-deleted-text, .comment-hidden-text {
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.vote-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.vote-up, .vote-down {
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    user-select: none;
}

.vote-up.active { color: #f97316; }
.vote-down.active { color: #60a5fa; }

/* Phase 6: vote buttons become clickable */
button.vote-up, button.vote-down {
    background: none;
    border: 1px solid var(--color-border);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    transition: color 0.15s, border-color 0.15s;
}
button.vote-up:hover { color: #f97316; border-color: #f97316; }
button.vote-down:hover { color: #60a5fa; border-color: #60a5fa; }

.btn-link {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.btn-link:hover { color: var(--color-text); }

.mark-helpful-placeholder {
    font-size: 0.8rem;
    color: #22c55e;
    font-weight: 600;
}

.reply-form {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.reply-form.hidden,
.edit-form.hidden,
.report-form.hidden,
.comment-flag-link.hidden { display: none; }

/* Small button variant */
.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

/* ─── Vanilla badge chips ─────────────────────────────────── */
.badge-vanilla {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-vanilla--verified {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-vanilla--likely {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-vanilla--uncertain {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Card footer right-side cluster */
.showcase-card-footer-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.showcase-card-verified {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* ─── Entry page verification block ──────────────────────── */
.entry-verification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.entry-verification--listed {
    background: rgba(34, 197, 94, 0.07);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.entry-verification--pending {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #fbbf24;
}

.entry-verification--rejected {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.entry-last-verified {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
