/* Danh sách sự kiện */
.svp-event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.svp-event-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}
.svp-event-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.svp-event-item h3 a {
    text-decoration: none;
    color: #333;
}
.svp-status {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    color: #fff;
}
.svp-status.active { background-color: #28a745; }
.svp-status.upcoming { background-color: #ffc107; color: #333; }
.svp-status.ended { background-color: #6c757d; }
.svp-qr-code { margin-top: 15px; }
.svp-qr-code img { max-width: 100px; height: auto; }

/* Trang chi tiết sự kiện */
.meta-info {
    background-color: #f9f9f9;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Bảng biểu quyết theo danh sách */
.voting-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 14px;
}
.voting-table th, .voting-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}
.voting-table th {
    background-color: #f2f2f2;
}
.voting-table td.achievements-col {
    white-space: pre-wrap;
    line-height: 1.5;
}
.voting-table td.actions-col {
    text-align: center;
}

/* Nút bấm chung */
.svp-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.svp-vote-btn .dashicons {
    font-size: 20px;
    height: 20px;
    width: 20px;
}
.svp-vote-btn.agree {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}
.svp-vote-btn.agree:hover {
    background-color: #218838;
}
.svp-vote-btn.disagree {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}
.svp-vote-btn.disagree:hover {
    background-color: #c82333;
}
.svp-vote-result {
    margin-top: 10px;
    font-weight: bold;
    background-color: #e4ffcb;
    padding: 5px;
}
.svp-vote-result .success {
    background-color: #e7ffcf;
}

/* [NÂNG CẤP] Hộp biểu quyết Đồng ý / Không đồng ý */
.svp-simple-vote-box {
    text-align: center;
    padding: 40px 20px; /* Tăng padding */
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-top: 20px;
}
.svp-simple-vote-box .svp-vote-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* Tăng khoảng cách */
}
/* Nút bấm to hơn, đẹp hơn */
.svp-simple-vote-box .svp-vote-btn {
    font-size: 1.5em; /* To hơn */
    padding: 15px 40px; /* To hơn */
    min-width: 200px;
    border-radius: 8px; /* Bo tròn hơn */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* === Frontend Stats Shortcode CSS === */
.svp-frontend-stats {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.svp-frontend-stats .svp-stats-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3338;
}

.svp-frontend-stats .svp-details-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
    border: 1px solid #dcdcde;
}

.svp-frontend-stats .svp-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3338;
}

.svp-frontend-stats .svp-description {
    margin-bottom: 15px;
    color: #50575e;
    font-size: 14px;
}

.svp-frontend-stats .svp-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.svp-frontend-stats .svp-event-selector {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    min-width: 300px;
}

.svp-frontend-stats .svp-export-btn {
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.svp-frontend-stats .svp-export-btn:hover {
    background: #005a87;
    color: #fff;
}

.svp-frontend-stats .svp-results-container {
    margin-top: 20px;
}

.svp-frontend-stats .svp-loading {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
}

.svp-frontend-stats .svp-loading .dashicons {
    font-size: 32px;
    height: 32px;
    width: 32px;
    color: #0073aa;
}

.svp-frontend-stats .svp-error {
    text-align: center;
    padding: 30px 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
}

.svp-frontend-stats .svp-error .dashicons {
    font-size: 24px;
    height: 24px;
    width: 24px;
}

/* Spin animation cho loading */
@keyframes svp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.svp-spin {
    animation: svp-spin 1s linear infinite;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .svp-frontend-stats .svp-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .svp-frontend-stats .svp-event-selector {
        min-width: 100%;
    }
    
    .svp-frontend-stats .svp-export-btn {
        width: 100%;
        text-align: center;
    }
}
