/* ============================================================
   Votable Posts Plugin — Stylesheet
   ============================================================ */

/* ---- Grid -------------------------------------------------- */
.vp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding: 16px 0;
    list-style: none;
    margin: 0;
}

/* ---- Card -------------------------------------------------- */
.vp-card {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 260px;
    max-width: 32%;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.vp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* ---- Image ------------------------------------------------- */
.vp-card__image-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #ffffff;
    text-decoration: none;
}

.vp-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.vp-card:hover .vp-card__image {
    transform: scale(1.05);
}

.vp-card__image-wrap--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
}

.vp-card__image-placeholder {
    font-size: 13px;
    color: #999;
    letter-spacing: 0.04em;
    font-family: sans-serif;
}

/* ---- Body -------------------------------------------------- */
.vp-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

/* ---- Title ------------------------------------------------- */
.vp-card__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a1a1a;
}

.vp-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s;
}

.vp-card__title a:hover {
    color: #e05c2a;
}

/* ---- Vote Row ---------------------------------------------- */
.vp-card__vote-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

/* ---- Vote Count -------------------------------------------- */
.vp-card__vote-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
    font-size: 14px;
    font-family: sans-serif;
}

.vp-icon {
    color: #e05c2a;
    font-size: 13px;
    line-height: 1;
}

.vp-count {
    font-weight: 700;
    font-size: 18px;
    color: #1a1a1a;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), color 0.3s;
}

.vp-count.vp-bump {
    transform: scale(1.35);
    color: #e05c2a;
}

.vp-label {
    font-size: 13px;
    color: #888;
}

/* ---- Vote Button ------------------------------------------- */
.vp-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: none;
    border-radius: 999px;
    background: #e05c2a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: sans-serif;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.vp-vote-btn:hover:not(:disabled) {
    background: #c44d21;
    transform: scale(1.04);
}

.vp-vote-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.vp-vote-btn--voted,
.vp-vote-btn:disabled {
    background: #d4edda;
    color: #2d7a45;
    cursor: not-allowed;
}

/* Loading spinner state */
.vp-vote-btn--loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ---- No posts ---------------------------------------------- */
.vp-no-posts {
    font-family: sans-serif;
    color: #888;
    text-align: center;
    padding: 40px 0;
}

/* ---- Tag Filter Bar --------------------------------------- */
.vp-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ebebeb;
}

.vp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: #f2f2f2;
    color: #444;
    font-size: 13px;
    font-weight: 600;
    font-family: sans-serif;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, transform 0.15s;
    border: 1px solid transparent;
}

.vp-filter-btn:hover {
    background: #ffe0d4;
    color: #c44d21;
    transform: translateY(-1px);
}

.vp-filter-btn--active {
    background: #e05c2a;
    color: #ffffff;
    border-color: #e05c2a;
}

.vp-filter-btn--active:hover {
    background: #c44d21;
    color: #ffffff;
}

.vp-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.12);
    color: inherit;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
}


/* ---- Responsive -------------------------------------------- */
@media (max-width: 900px) {
    .vp-card {
        flex: 1 1 calc(50% - 14px);
		max-width: 100%;
    }
}

@media (max-width: 560px) {
    .vp-card {
        flex: 1 1 100%;
    }

    .vp-grid {
        gap: 20px;
    }
}
