/**
 * Post Voting System - Frontend Styles
 */

.pvs-voting-container {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pvs-voting-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    justify-content: center;
}

.pvs-vote-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.pvs-vote-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.pvs-vote-btn:hover:before {
    width: 100%;
    height: 100%;
}

.pvs-vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.pvs-good-btn {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    border-color: #4CAF50;
}

.pvs-good-btn:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

.pvs-bad-btn {
    background: linear-gradient(145deg, #f44336, #da190b);
    color: white;
    border-color: #f44336;
}

.pvs-bad-btn:hover {
    background: linear-gradient(145deg, #da190b, #c62828);
    box-shadow: 0 6px 12px rgba(244, 67, 54, 0.3);
}

.pvs-vote-btn.voted {
    border-color: #ffeb3b;
    box-shadow: 0 0 0 2px #ffeb3b, 0 4px 8px rgba(0,0,0,0.1);
}

.pvs-vote-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.pvs-vote-btn.loading .pvs-vote-text {
    animation: pulse 1s linear infinite;
}

.pvs-vote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pvs-vote-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}

.pvs-vote-icon {
    font-size: 18px;
    line-height: 1;
}

.pvs-vote-text {
    font-weight: 600;
    white-space: nowrap;
}

.pvs-vote-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.pvs-voting-message {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
    margin-top: 10px;
}

.pvs-voting-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pvs-voting-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pvs-voting-container {
        margin: 15px 0;
        padding: 15px;
    }
    
    .pvs-voting-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .pvs-vote-btn {
        justify-content: center;
        padding: 15px 20px;
        font-size: 18px;
    }
}

/* Animation keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pvs-vote-btn.active {
    animation: pulse 0.3s ease;
}

/* Admin Styles */
.pvs-meta-box {
    padding: 10px 0;
}

.pvs-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.pvs-stats-table td {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.pvs-stats-table td:first-child {
    width: 60%;
}

.pvs-category-info {
    margin: 15px 0;
    padding: 10px;
    background: #f0f0f1;
    border-radius: 4px;
}

.pvs-category-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.pvs-category-badge.good {
    background: #4CAF50;
    color: white;
}

.pvs-category-badge.bad {
    background: #f44336;
    color: white;
}

.pvs-actions {
    margin-top: 15px;
    text-align: center;
}

.pvs-reset-votes {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.pvs-reset-votes:hover {
    background: #c82333;
    border-color: #bd2130;
    color: white;
}

.pvs-admin-votes {
    font-size: 14px;
    white-space: nowrap;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pvs-voting-container {
        background: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .pvs-vote-btn {
        background: linear-gradient(145deg, #3a3a3a, #2d2d2d);
        color: #e0e0e0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }
    
    .pvs-vote-btn:hover {
        box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    }
    
    .pvs-voting-message.success {
        background: #1e4620;
        color: #a3d9a5;
        border-color: #2d5a2f;
    }
    
    .pvs-voting-message.error {
        background: #4a1e1e;
        color: #f5b2b2;
        border-color: #5f2d2d;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .pvs-vote-btn {
        border-width: 3px;
        border-style: solid;
    }
    
    .pvs-good-btn {
        border-color: #000;
    }
    
    .pvs-bad-btn {
        border-color: #000;
    }
}

/* Print styles */
@media print {
    .pvs-voting-container {
        display: none;
    }
}
