/* =============================================================================
   JoomVote Board Styles
   ============================================================================= */

.jv-board {
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
    color: #1a202c;
    text-align: left;
}

/* Header — centered submit button */
.jv-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

/* Sort bar — between filter box and list */
.jv-sort-bar {
    text-align: center;
    margin-bottom: 1rem;
}

/* Sort select */
.jv-sort-select {
    padding: .38rem .7rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: .875rem;
    color: #495057;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
    flex-shrink: 0;
}
.jv-sort-select:focus { border-color: #19b0f2; }
.jv-title {
    display: none;
}

/* Submit button */
.jv-btn-submit {
    background: #102f43;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 6px;
    padding: .5rem 1.1rem;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.jv-btn-submit:hover {
    background: #e0f4ff;
    color: #0082bf;
    border-color: #0082bf;
}

/* Filter wrap */
.jv-filters-wrap {
    background: #fff;
    border-radius: 12px;
    padding: .55rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border: 2px solid #ccc;
}

/* Chip row — wraps naturally, label always on its own line */
.jv-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    padding: .4rem 0;
}
.jv-filters + .jv-filters {
    border-top: 1px solid rgba(0,0,0,.06);
    margin-top: .1rem;
}

/* Group label — full width so it sits on its own row above the chips */
.jv-filter-label {
    width: 100%;
    display: block;
    font-size: .68rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .1rem;
}

/* Filter chip — inactive */
.jv-board .jv-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .45rem;
    border-radius: 5px;
    border: none;
    font-size: .825rem;
    font-weight: 500;
    color: #000 !important;
    background: #eee;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: background .15s, color .15s;
    text-decoration: none !important;
}
.jv-board .jv-filter-btn:hover {
    background: #e5e7eb;
    color: #111827 !important;
    text-decoration: none !important;
}
/* Active chip — brand color fill */
.jv-board .jv-filter-btn.active {
    background: #0077b3;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none !important;
}
.jv-count {
    font-size: .72rem;
    font-weight: 600;
    background: rgba(0,0,0,.1);
    border-radius: 10px;
    padding: .05rem .32rem;
    line-height: 1.4;
}
.jv-board .jv-filter-btn.active .jv-count {
    background: rgba(255,255,255,.25);
    color: #fff;
    border: 1px solid #fff;
}

.jv-filters-status { /* no extra overrides needed */ }

/* Feature list */
.jv-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.jv-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow .15s;
}
.jv-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Vote button */
.jv-vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: .5rem .4rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}
.jv-vote-btn:hover {
    border-color: #19b0f2;
    background: #f0faff;
    color: #19b0f2;
}
.jv-vote-btn:hover .jv-vote-label {
    color: #19b0f2;
}
.jv-vote-arrow {
    font-size: 1rem;
    line-height: 1;
}
.jv-vote-count {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}
.jv-vote-label {
    font-size: .7rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Done state (no voting) */
.jv-vote-done {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: .5rem .4rem;
    border: none;
    background: transparent;
    flex-shrink: 0;
    cursor: default;
}

/* Feature content */
.jv-content {
    flex: 1;
    min-width: 0;
}
.jv-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: .25rem;
}
.jv-submitted-meta {
    font-size: .8rem;
    color: #6c757d;
    padding-bottom: .4rem;
    margin-bottom: .4rem;
    border-bottom: 1px solid #dee2e6;
}
.jv-hint,
.jv-modal .jv-hint,
.jv-board .jv-hint {
    font-size: .8rem !important;
    color: #495057 !important;
    background: #f8f9fa !important;
    border-radius: 4px;
    padding: .35rem .6rem;
    margin: .4rem 0 0;
    line-height: 1.45;
}
.jv-item-desc {
    font-size: .875rem;
    color: #6c757d;
    margin-bottom: .25rem;
}

/* Fade-to-white wrapper — created by JS when text overflows */
.jv-desc-wrap {
    position: relative;
    max-height: 3em;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: .4rem;
}
.jv-desc-wrap .jv-item-desc { margin-bottom: 0; }
.jv-desc-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.8em;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
    transition: opacity .2s;
}
.jv-desc-wrap.expanded {
    max-height: none;
    cursor: default;
}
.jv-desc-wrap.expanded::after { opacity: 0; }

/* Badges */
.jv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .4rem;
}
.jv-badge {
    display: inline-block;
    padding: .15rem .6rem;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 600;
}
.jv-badge-feature    { background: #dbeafe; color: #1d4ed8; }
.jv-badge-bug        { background: #fee2e2; color: #b91c1c; }
.jv-badge-improvement { background: #d1fae5; color: #065f46; }
.jv-status-open      { background: #f1f5f9; color: #475569; }
.jv-status-planned   { background: #ede9fe; color: #6d28d9; }
.jv-status-inprogress { background: #fef3c7; color: #92400e; }
.jv-status-done      { background: #d1fae5; color: #065f46; }
.jv-status-rejected  { background: #f1f5f9; color: #94a3b8; }

/* Load More / Show All */
.jv-load-more-wrap {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 1rem;
}
.jv-btn-load-more,
.jv-btn-show-all {
    background: #fff;
    color: #374151;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: .5rem 1.75rem;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.jv-btn-load-more:hover,
.jv-btn-show-all:hover {
    background: #f3f4f6;
    border-color: #adb5bd;
}

/* Empty state */
.jv-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

/* Modal overlay */
.jv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.jv-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.jv-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem .75rem;
    border-bottom: 1px solid #dee2e6;
}
.jv-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}
.jv-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    padding: 0 .25rem;
}
.jv-modal-close:hover { color: #212529; }
.jv-modal-body { padding: 1.25rem; }
.jv-modal-subtitle { color: #6c757d; font-size: .9rem; margin-bottom: 1rem; }
.jv-modal-footer {
    padding: .75rem 1.25rem 1.1rem;
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
}

/* Form elements */
.jv-form-group { margin-bottom: .9rem; }
.jv-form-group label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
.jv-form-row { display: flex; gap: .75rem; }
.jv-form-row .jv-form-group { flex: 1; }
.jv-input {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: .9rem;
    box-sizing: border-box;
    transition: border-color .15s;
}
.jv-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}
.jv-form-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .9rem;
}
.jv-form-check input { flex-shrink: 0; }
.jv-form-check label { font-size: .875rem; font-weight: 400; color: #495057; }
.jv-required { color: #dc3545; }

/* Buttons */
.jv-btn-primary {
    background: #102f43;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .5rem 1.1rem;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.jv-btn-primary:hover { background: #1a4a63; }
.jv-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: .5rem 1.1rem;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s;
}
.jv-btn-secondary:hover { background: #e9ecef; }

/* Submit confirmation screen */
.jv-submit-confirm {
    text-align: center;
    padding: 1.5rem 0 .5rem;
}
.jv-submit-confirm-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #d1fae5;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #059669;
    line-height: 1;
}
.jv-submit-confirm-icon::after {
    content: '✔︎';
}
.jv-submit-confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 .75rem;
}
.jv-submit-confirm-text {
    font-size: .9rem;
    color: #495057;
    line-height: 1.65;
    margin: 0;
}

/* Messages */
.jv-msg {
    padding: .6rem .9rem;
    border-radius: 6px;
    font-size: .9rem;
    margin-top: .75rem;
}
.jv-msg-success { background: #d1fae5; color: #065f46; }
.jv-msg-error   { background: #fee2e2; color: #b91c1c; }

/* Comments */
.jv-comments-wrap {
    margin-top: .6rem;
    border-top: 1px solid #f0f0f0;
    padding-top: .4rem;
}
.jv-comments-toggle {
    background: none;
    border: none;
    padding: .15rem 0;
    font-size: .82rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .3rem;
    transition: color .15s;
}
.jv-comments-toggle::before {
    content: '▸';
    font-size: .75rem;
    transition: transform .15s;
}
.jv-comments-toggle.active::before { transform: rotate(90deg); }
.jv-comments-toggle:hover { color: #19b0f2; }

.jv-comments-section {
    margin-top: .65rem;
}
.jv-comment {
    padding: .55rem .7rem;
    margin-bottom: .45rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #dee2e6;
}
.jv-comment-admin {
    background: #f0f8ff;
    border-left-color: #19b0f2;
}
.jv-comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .3rem;
}
.jv-comment-author {
    font-size: .82rem;
    font-weight: 600;
    color: #212529;
}
.jv-comment-admin-badge {
    font-size: .72rem;
    font-weight: 700;
    background: #19b0f2;
    color: #fff;
    border-radius: 3px;
    padding: .05rem .35rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.jv-comment-date {
    font-size: .75rem;
    color: #9ca3af;
    margin-left: auto;
}
.jv-comment-body {
    font-size: .875rem;
    color: #374151;
    line-height: 1.55;
}
.jv-comment-form {
    margin-top: .65rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: .75rem;
}
.jv-comment-form-title {
    font-size: .85rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: .6rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.jv-comment-form .jv-form-group { margin-bottom: .5rem; }
.jv-comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}
.jv-comment-msg {
    flex: 1;
    font-size: .82rem;
    padding: .3rem .6rem;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .jv-form-row { flex-direction: column; }
    .jv-comment-date { margin-left: 0; }
}
