/*
Theme Name:    Guitaroverse
Theme URI:     https://guitaroverse.com
Description:   Standalone custom theme for Guitaroverse - a community built by guitarists, for guitarists.
Author:        Guitaroverse
Author URI:    https://guitaroverse.com
Version:       2.0.0
License:       GNU General Public License v2 or later
License URI:   http://www.gnu.org/licenses/gpl-2.0.html
Tags:          dark, community, news, music, guitar
Text Domain:   guitaroverse
*/

/*--------------------------------------------------------------
 * 1.0 Base / Reset
 *--------------------------------------------------------------*/
html {
    box-sizing: border-box;
    height: 100%;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/*--------------------------------------------------------------
 * 2.0 SVG Icon Sizing (prevent flash before Tailwind loads)
 *--------------------------------------------------------------*/
svg:not([width]):not([height]) {
    max-width: 24px;
    max-height: 24px;
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
}

.guitaroverse-vote-controls svg,
a[href*="comments-link"] svg,
.guitaroverse-share-comment-button svg {
    max-width: 16px;
    max-height: 16px;
    width: 16px;
    height: 16px;
}

.text-blue-500.hover\:underline.flex.items-center svg {
    max-width: 12px;
    max-height: 12px;
    width: 12px;
    height: 12px;
}

/*--------------------------------------------------------------
 * 3.0 Pagination
 *--------------------------------------------------------------*/
#primary .page-numbers,
.site-main .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    margin: 0 3px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    background-color: #374151;
    color: #d1d5db;
    border: 1px solid #4b5563;
}
#primary .page-numbers:hover,
.site-main .page-numbers:hover {
    background-color: #4b5563;
    color: #ffffff;
}
#primary .page-numbers.current,
.site-main .page-numbers.current {
    background-color: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    cursor: default;
}
#primary .page-numbers.dots,
.site-main .page-numbers.dots {
    background: none;
    border: none;
    cursor: default;
    color: #6b7280;
}
.pagination-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

/*--------------------------------------------------------------
 * 4.0 General Body Styles
 *--------------------------------------------------------------*/
body {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    margin: 0;
    padding: 0;
}
body.is-loaded {
    opacity: 1;
}

/*--------------------------------------------------------------
 * 5.0 Search Input
 *--------------------------------------------------------------*/
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

/*--------------------------------------------------------------
 * 6.0 Blocked Content
 *--------------------------------------------------------------*/
.gv-blocked-content {
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
    position: relative;
}

/*--------------------------------------------------------------
 * 7.0 Screen Reader / Accessibility
 *--------------------------------------------------------------*/
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    background-color: #f1f1f1;
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/*--------------------------------------------------------------
 * 8.0 Comments
 *--------------------------------------------------------------*/
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list .children {
    list-style: none;
    padding-left: 1.5rem;
    border-left: 2px solid #e5e7eb;
    margin-left: 1rem;
    margin-top: 0.75rem;
}

/*--------------------------------------------------------------
 * 9.0 Entry Content (prose styling for single post excerpts)
 *--------------------------------------------------------------*/
.entry-summary {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    line-height: 1.75;
}
.entry-summary p {
    margin-bottom: 1em;
}

/*--------------------------------------------------------------
 * 10.0 Autocomplete dropdown for block-users modal
 *--------------------------------------------------------------*/
#block-user-suggestions {
    position: absolute;
    z-index: 9999;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    top: 100%;
    left: 0;
}
#block-user-suggestions li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #d1d5db;
    list-style: none;
}
#block-user-suggestions li:hover {
    background: #374151;
    color: #fff;
}

/*--------------------------------------------------------------
 * 11.0 Notification dropdown
 *--------------------------------------------------------------*/
.notification-item {
    border-bottom: 1px solid #374151;
    transition: background-color 0.15s;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item.unread {
    background-color: rgba(79, 70, 229, 0.08);
}
.notification-item:hover {
    background-color: #374151;
}

/*--------------------------------------------------------------
 * 12.0 Profile picture upload preview
 *--------------------------------------------------------------*/
#profile-picture-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
}

/*--------------------------------------------------------------
 * 13.0 Gear Talk post type badge colours
 *--------------------------------------------------------------*/
.gv-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/*--------------------------------------------------------------
 * 14.0 Comments — threaded, one level of nesting
 *--------------------------------------------------------------*/

/* ── Thread list ─────────────────────────────────────── */
.gv-comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Individual thread ───────────────────────────────── */
.gv-thread {
    padding: 0;
}
.gv-thread > .flex > div:last-child {
    min-width: 0; /* prevent flex overflow */
}

/* ── Comment article ─────────────────────────────────── */
.comment-body {
    padding: 12px 0;
}
.comment-body img.rounded-full {
    flex-shrink: 0;
}

/* ── Comment content ─────────────────────────────────── */
.comment-content {
    word-break: break-word;
    overflow-wrap: break-word;
}
.comment-content p { margin: 0 0 0.5em; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-content a { color: #4f46e5; }
.comment-content a:hover { text-decoration: underline; }

/* ── Replies indented with left border ───────────────── */
.gv-replies-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.reply-item .comment-body {
    padding: 10px 0;
}

/* Mobile: less aggressive indent */
@media (max-width: 640px) {
    .gv-replies-list {
        padding-left: 0.75rem !important;
        margin-left: 0.5rem !important;
        border-left-width: 2px !important;
    }
    .comment-body {
        gap: 0.5rem;
    }
    .comment-body img.rounded-full,
    .comment-body .w-8 {
        width: 28px !important;
        height: 28px !important;
    }
}

/* ── Collapse button ─────────────────────────────────── */
.gv-collapse-btn {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 11px;
    line-height: 1;
    padding: 4px 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    min-width: 18px;
}
.gv-collapse-btn:hover {
    color: #4f46e5;
}
.gv-collapse-btn i {
    writing-mode: horizontal-tb;
    transform: rotate(180deg);
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}
.gv-collapse-btn .gv-collapse-label {
    display: none; /* hide text label on desktop, icon is enough */
}
@media (max-width: 640px) {
    .gv-collapse-btn {
        writing-mode: horizontal-tb;
        transform: none;
        flex-direction: row;
        padding: 2px 4px;
    }
    .gv-collapse-btn i {
        transform: none;
        display: inline;
        margin: 0 3px 0 0;
    }
}

/* ── Options ellipsis menu ───────────────────────────── */
.gv-comment-menu-wrap {
    position: relative;
}
.gv-comment-menu {
    min-width: 140px;
}
.gv-comment-menu button {
    white-space: nowrap;
}

/* ── Inline reply box ────────────────────────────────── */
.gv-inline-reply-box {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid #e5e7eb;
}
.gv-reply-textarea {
    min-height: 72px;
    transition: height 0.1s;
}

/* ── Comment submit form ─────────────────────────────── */
.guitaroverse-comment-form-container {
    margin-top: 24px;
}
.comment-textarea {
    min-height: 80px;
    transition: height 0.1s;
}

/* ── Load More button ────────────────────────────────── */
#gv-load-more-comments {
    transition: background-color 0.15s, border-color 0.15s;
}

/* ── Highlight when jumping to a comment ─────────────── */
.newly-added-comment-highlight {
    animation: gv-highlight-pulse 2.5s ease-out forwards;
    border-radius: 6px;
}
@keyframes gv-highlight-pulse {
    0%   { background-color: rgba(79, 70, 229, 0.12); }
    100% { background-color: transparent; }
}

/* ── Disabled vote buttons ───────────────────────────── */
.guitaroverse-comment-vote-button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── Section heading ─────────────────────────────────── */
.gv-comments-heading {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

/*--------------------------------------------------------------
 * 15.0 Image Carousel
 *--------------------------------------------------------------*/
.gv-carousel {
    border-radius: 0;
    overflow: hidden;
}
.gv-slides {
    background: #000;
}
/* Ensure slide container respects tallest image */
.gv-slide img {
    display: block;
    margin: 0 auto;
}
.gv-carousel-img {
    cursor: zoom-in;
    transition: opacity 0.15s;
}
.gv-carousel-img:hover {
    opacity: 0.92;
}
.gv-dots {
    min-height: 32px;
}
.gv-dot {
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    border: none;
    padding: 0;
}

/* Lightbox */
.gv-lightbox img {
    box-shadow: 0 4px 40px rgba(0,0,0,0.8);
}
.gv-lightbox-close {
    font-size: 2rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
}
