/* =====================================================================
   ESAForum — Vote & Quest Styles
   Created by ESAGAMES HOSTING SHIELD SRL
   ===================================================================== */

/* -----------------------------------------------------------------------
   Shared: points badge (reused from shop but scoped here too)
   --------------------------------------------------------------------- */
.points-badge {
    background: linear-gradient(135deg, rgba(245,179,1,.16), rgba(245,179,1,.06));
    border: 1px solid rgba(245,179,1,.3);
    color: var(--amber);
    padding: 9px 18px;
    border-radius: 12px;
    font-size: 15px;
    white-space: nowrap;
}
.points-badge b { color: #fff; }

/* -----------------------------------------------------------------------
   Vote grid & cards
   --------------------------------------------------------------------- */
.vote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
    margin-bottom: 8px;
}

.vote-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: border-color .18s, transform .18s, box-shadow .18s;
    position: relative;
    overflow: hidden;
}

.vote-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-primary);
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.vote-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.vote-card:hover::before { opacity: .04; }

.vote-card.on-cooldown {
    border-color: var(--surface-3);
    opacity: .72;
}
.vote-card.on-cooldown:hover {
    transform: none;
    box-shadow: none;
}

.vote-card-icon {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}

.vote-card-body {
    flex: 1;
    min-width: 0;
}

.vote-card-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 6px;
}

.vote-card-reward {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.reward-pts {
    background: linear-gradient(135deg, rgba(46,230,166,.18), rgba(46,230,166,.06));
    border: 1px solid rgba(46,230,166,.28);
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.cooldown-label {
    color: var(--text-mute);
    font-size: 12px;
}

/* Cooldown timer */
.cooldown-timer {
    font-size: 13px;
    color: var(--amber);
    font-weight: 600;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

/* Ready state */
.vote-ready {
    font-size: 13px;
    color: var(--green);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Actions row */
.vote-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.vote-guest-hint {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.vote-guest-hint a { color: var(--primary-2); }

/* Feedback messages */
.vote-success-msg {
    color: var(--green);
    font-weight: 700;
    font-size: 14px;
}
.vote-error-msg {
    color: var(--red);
    font-size: 13px;
    margin-top: 8px;
}

/* -----------------------------------------------------------------------
   Quest list & cards
   --------------------------------------------------------------------- */
.quest-list,
.quest-guest-preview {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quest-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: border-color .18s, transform .18s, box-shadow .18s;
    position: relative;
    overflow: hidden;
}

.quest-card::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--grad-primary);
    opacity: 0;
    transition: opacity .2s;
}

.quest-card:hover {
    border-color: var(--surface-3);
    transform: translateX(3px);
}
.quest-card:hover::after { opacity: 1; }

.quest-card.quest-done {
    border-color: rgba(46,230,166,.35);
}
.quest-card.quest-done::after {
    background: var(--green);
    opacity: 1;
}

.quest-card.quest-claimed {
    opacity: .7;
    border-color: var(--border);
}
.quest-card.quest-claimed::after {
    background: var(--green);
    opacity: .5;
}

.quest-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    width: 44px;
    text-align: center;
}

.quest-body {
    flex: 1;
    min-width: 0;
}

.quest-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 10px;
}

/* Progress bar */
.quest-progress-bar {
    height: 8px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quest-progress-fill {
    height: 100%;
    background: var(--grad-primary);
    border-radius: 99px;
    transition: width .6s cubic-bezier(.4,0,.2,1);
    min-width: 3px;
}

.quest-card.quest-done .quest-progress-fill {
    background: linear-gradient(90deg, var(--green), #18c8ff);
}

/* Meta row */
.quest-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quest-reward {
    color: var(--amber);
    font-weight: 700;
    font-size: 13px;
}

.quest-progress-text {
    color: var(--text-mute);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* Action column */
.quest-action {
    flex-shrink: 0;
    min-width: 100px;
    text-align: center;
}

.quest-claimed-badge {
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.quest-locked {
    color: var(--text-mute);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.quest-error {
    color: var(--red);
    font-size: 12px;
    margin-top: 6px;
}

/* -----------------------------------------------------------------------
   Floating points notification
   --------------------------------------------------------------------- */
.floating-pts {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: linear-gradient(135deg, #2ee6a6, #18c8ff);
    color: #071014;
    font-weight: 800;
    font-size: 18px;
    padding: 12px 22px;
    border-radius: 40px;
    box-shadow: 0 8px 30px rgba(46,230,166,.45);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .35s, transform .35s;
    pointer-events: none;
}
.floating-pts.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
    .vote-grid {
        grid-template-columns: 1fr;
    }

    .quest-card {
        flex-wrap: wrap;
    }

    .quest-action {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .vote-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .vote-card { padding: 18px 16px 16px; gap: 12px; }
    .points-badge { font-size: 13px; padding: 7px 14px; }
    .vote-actions { gap: 6px; }
    .vote-actions .btn,
    .vote-actions form { width: 100%; }
    .vote-actions .btn { text-align: center; }
    .floating-pts { bottom: 16px; right: 16px; font-size: 16px; padding: 10px 18px; }
}

@media (max-width: 480px) {
    .vote-grid { grid-template-columns: 1fr; }
    .vote-card { flex-direction: column; padding: 16px 14px 14px; gap: 10px; }
    .vote-card-icon { width: auto; font-size: 30px; }
    .vote-card-name { font-size: 15px; }
    .vote-card-reward { flex-wrap: wrap; }
    .vote-actions { flex-direction: column; gap: 6px; }
    .vote-actions .btn,
    .vote-actions form,
    .vote-actions form .btn { width: 100%; text-align: center; justify-content: center; }
    .quest-card { padding: 14px 14px; gap: 12px; }
    .quest-icon { font-size: 26px; width: 36px; }
    .quest-title { font-size: 14px; }
    .quest-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
    .floating-pts { right: 12px; bottom: 12px; font-size: 14px; padding: 8px 16px; }
}
