/*
 * Tattoo Blog Theme — Custom CSS
 * Supplements Tailwind CDN styles
 */

/* ── Pagination styling ─────────────────────────────────── */
.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: #201f1f;
    color: #e5e2e1;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
    min-width: 40px;
}
.nav-links a:hover {
    background: var(--tw-primary, #C0392B);
    color: #ffe5e1;
}
.nav-links .current {
    background: var(--tw-primary, #C0392B);
    color: #ffe5e1;
}
.nav-links .prev,
.nav-links .next {
    background: transparent;
    border: 1px solid rgba(89,65,61,0.4);
}

/* ── Comments styling ───────────────────────────────────── */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-list li {
    margin-bottom: 1.5rem;
}
.comment-body {
    padding: 1.5rem;
    background: #201f1f;
    border-left: 2px solid transparent;
    transition: border-color 0.2s;
}
.comment-body:hover {
    border-left-color: #C0392B;
}
.comment-author img {
    border-radius: 9999px;
}
.comment-metadata {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c4b8b4;
    margin-top: 0.25rem;
}
.comment-content p {
    color: #e5e2e1;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 0.75rem;
}
.reply a {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #C0392B;
    font-weight: 700;
    text-decoration: none;
}
.reply a:hover {
    text-decoration: underline;
}

/* Comment form */
.comment-form label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #c4b8b4;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: #201f1f;
    border: none;
    border-bottom: 1px solid rgba(89,65,61,0.5);
    padding: 0.75rem 0.5rem;
    color: #e5e2e1;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 1rem;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-bottom-color: #C0392B;
}
.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}
.comment-form input[type="submit"] {
    background: #C0392B;
    color: #ffe5e1;
    border: none;
    padding: 0.875rem 2.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.2s;
}
.comment-form input[type="submit"]:hover {
    opacity: 0.85;
}
.comment-form .comment-notes,
.comment-form .logged-in-as {
    font-size: 0.75rem;
    color: #c4b8b4;
    margin-bottom: 1rem;
}
.comment-form .comment-notes a,
.comment-form .logged-in-as a {
    color: #ffb4a9;
    text-decoration: underline;
}

/* ── Widgets ────────────────────────────────────────────── */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(89,65,61,0.15);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.widget ul li a {
    color: #c4b8b4;
    text-decoration: none;
    transition: color 0.2s;
}
.widget ul li a:hover {
    color: #e5e2e1;
}
.widget select {
    background: #201f1f;
    border: 1px solid rgba(89,65,61,0.4);
    color: #e5e2e1;
    padding: 0.5rem;
    font-size: 0.75rem;
    width: 100%;
}

/* ── TOC active highlight ───────────────────────────────── */
#toc-list a {
    display: block;
    padding: 0.375rem 0 0.375rem 1rem;
    border-left: 2px solid transparent;
    color: #c4b8b4;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
#toc-list a:hover,
#toc-list a.active {
    color: #C0392B;
    border-left-color: #C0392B;
}

/* ── Sticky sidebar offset ──────────────────────────────── */
.sticky-sidebar {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #353534 transparent;
}
.sticky-sidebar::-webkit-scrollbar {
    width: 3px;
}
.sticky-sidebar::-webkit-scrollbar-thumb {
    background: #353534;
}

/* ── Card hover lift ────────────────────────────────────── */
article.group:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* ── Prose dark mode overrides ──────────────────────────── */
.prose a {
    color: #ffb4a9;
}
.prose a:hover {
    color: #C0392B;
}
.prose strong {
    color: #e5e2e1;
    font-weight: 700;
}
.prose em {
    color: #c4b8b4;
}
.prose hr {
    border-color: rgba(89,65,61,0.3);
    margin: 2.5rem 0;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.prose table th {
    background: #201f1f;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: #C0392B;
}
.prose table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(89,65,61,0.2);
    color: #c4b8b4;
}
.prose code {
    background: #201f1f;
    padding: 0.2em 0.5em;
    font-size: 0.85em;
    color: #ffb4a9;
}
.prose pre {
    background: #0e0e0e;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}
.prose pre code {
    background: transparent;
    padding: 0;
    color: #e5e2e1;
}

/* ── line-clamp utility (for Safari compatibility) ──────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Search form focus ──────────────────────────────────── */
.search-form input:focus {
    outline: none;
    box-shadow: none;
}

/* ── Affiliate disclaimer ───────────────────────────────── */
.affiliate-disclaimer {
    border-left: 4px solid #D4AF37;
    background: #1c1b1b;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: #c4b8b4;
    line-height: 1.7;
}

/* ── WP Alignments ──────────────────────────────────────── */
.alignleft { float: left; margin: 0 2rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 2rem; }
.aligncenter { display: block; margin: 2rem auto; }
.alignfull { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }
.alignwide { width: calc(100% + 4rem); position: relative; left: -2rem; }
.wp-caption {
    max-width: 100%;
    font-size: 0.75rem;
    color: #c4b8b4;
    font-style: italic;
    text-align: center;
    margin: 1.5rem auto;
}
.wp-caption img { margin: 0 auto; }

/* ── Mobile menu transition ─────────────────────────────── */
#mobile-menu {
    will-change: transform;
}

/* ── Responsive images in entry-content ─────────────────── */
.entry-content img {
    max-height: 70vh;
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

/* ── Focus rings for accessibility ──────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C0392B;
    outline-offset: 2px;
}

/* ── Skip link ──────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #C0392B;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    font-size: 0.75rem;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

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

/* ── Smooth scroll ──────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ── Selection color ────────────────────────────────────── */
::selection {
    background: #C0392B;
    color: #ffe5e1;
}
