/* Articles Like/Dislike Styling */

/* Like/Dislike Buttons */
.vote-card .btn {
    transition: all 0.3s ease;
    border-width: 2px;
    font-weight: 500;
}

.vote-card .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.vote-card .btn:active {
    transform: translateY(0);
}

/* Like button states */
.btn-outline-success:hover,
.btn-success {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.btn-outline-success {
    color: #198754;
    border-color: #198754;
}

/* Dislike button states */
.btn-outline-danger:hover,
.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

/* Report button states */
.btn-outline-warning:hover,
.btn-warning {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: white;
}

.btn-outline-warning {
    color: #fd7e14;
    border-color: #fd7e14;
}

/* Mobile Containers */
.vote-actions-mobile, .other-actions-mobile {
    display: flex;
    gap: 0.55rem;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* Unified mobile action buttons (with counters) */
.btn-mobile-action {
    border-radius: 12px !important;
    padding: 0.40rem 0.55rem; /* reduced horizontal padding */
    font-size: 0.8rem;
    line-height: 1.1;
    width: 82px; /* fixed uniform width */
    flex: 0 0 82px; /* prevent grow/shrink */
    height: 40px; /* unified height */
    justify-content: center;
}

.btn-mobile-action i {
    font-size: 1rem;
}

/* Icon-only mobile buttons (report/share) */
.btn-mobile-icon {
    border-radius: 12px !important;
    width: 82px; /* match action buttons */
    flex: 0 0 82px;
    height: 40px;
    padding: 0; /* keep icon centered */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-mobile-icon i { font-size: 1.05rem; }

.btn-mobile-icon:hover { box-shadow: 0 0 0 4px rgba(0,0,0,0.05); }
.btn-mobile-icon:active { transform: scale(0.94); }

/* Active state indicators */
.btn.active { box-shadow: 0 0 0 3px rgba(var(--bs-btn-bg-rgb), 0.25); }

/* Loading state */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Counter styling */
[data-count] {
    font-variant-numeric: tabular-nums;
    min-width: 1.3rem;
    text-align: center;
}

.vote-card-body { padding: 0.9rem 1.25rem; }
@media (max-width: 576px) { .vote-card-body { padding: 0.25rem 0.5rem !important; } }

@media (max-width: 768px) {
    .vote-card .btn { font-size: 0.8rem; }
    /* removed flex:1 to allow fixed widths */
}

@media (max-width: 576px) {
    .mobile-compact-vote-card .card-body { padding: 0.25rem 0.5rem; } /* ~4px vertical */
    .mobile-compact-vote-card { margin-top: 0.5rem !important; margin-bottom: 0.15rem !important; }
    .mobile-compact-vote-card .vote-actions-mobile { gap: 0.35rem; }
    .mobile-compact-vote-card .btn-mobile-action,
    .mobile-compact-vote-card .btn-mobile-icon { height: 30px; width: 70px; flex: 0 0 70px; }
    .mobile-compact-vote-card .btn-mobile-action { font-size: 0.7rem; padding: 0.25rem 0.35rem; }
    .article-comments-wrapper { margin-top: 0.35rem !important; }
}

/* Animation for count changes */
@keyframes countUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

[data-count].updating { animation: countUpdate 0.3s ease; }
