/* Like & Dislike Tracker Styles */

/* Prevent direct access */
.post-like-dislike-container {
    margin: 5px 0;
}

/* Buttons Container */
.post-like-dislike-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Button Styles */
.post-like-dislike-btn {
    display: inline-flex;
    align-items: center;
    gap: 0px;
    padding: 2px;
    color: #333;
    background: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    justify-content: center;
    box-shadow: none;
}

.post-like-dislike-btn:hover {
    color: #000;
    border-color: #20c997;
    background: #f0fff400;
    box-shadow: none!important;
}

.post-like-btn.active .like-count {
    background: #0aa699;
    color: #fff;
    border: none!important;
}

.post-like-dislike-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.post-like-dislike-btn.processing {
    opacity: 0.6;
    cursor: wait;
}

/* Like Button */
.post-like-btn {
    color: #28a745;
    border-color: #28a745;
}

/* .post-like-btn:hover {
    color: #20c997;
    border-color: #20c997;
    background: #f0fff4;
} */

/* .post-like-btn.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
} */

/* .post-like-btn.active:hover {
    background: #20c997;
    border-color: #20c997;
} */

/* Dislike Button */
.post-dislike-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.post-dislike-btn:hover {
    color: #e74c5c;
    border-color: #e74c5c;
    background: #fff5f5;
}

.post-dislike-btn.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.post-dislike-btn.active:hover {
    background: #e74c5c;
    border-color: #e74c5c;
}

/* Icons and Counts */
.like-icon,
.dislike-icon {
    font-size: 18px;
}

.like-count,
.dislike-count {
   font-weight: 600;
    min-width: 30px;
    border: 1px solid lightgrey;
    padding: 2px;
}

/* Notification Messages */
.post-like-dislike-notice,
.post-like-dislike-error {
    padding: 12px 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-size: 14px;
}

.post-like-dislike-notice {
    background: #e7f3ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
}

.post-like-dislike-error {
    background: #ffe7e7;
    color: #cc0000;
    border: 1px solid #ffb3b3;
}

/* Notification Popup */
.post-like-dislike-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    animation: slideIn 0.3s ease;
    display: none;
}

.post-like-dislike-notification.success {
    background: #28a745;
    color: white;
    border: 1px solid #20c997;
}

.post-like-dislike-notification.error {
    background: #dc3545;
    color: white;
    border: 1px solid #e74c5c;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dashboard Styles */
.post-like-dislike-dashboard {
    background: white;
    padding: 20px;
    border-radius: 5px;
}

.post-like-dislike-dashboard h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Dashboard Controls */
.dashboard-controls {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-controls form {
    display: inline;
}

.dashboard-controls button {
    padding: 8px 16px;
    font-size: 14px;
}

/* Dashboard Filters */
.dashboard-filters {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.filters-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 500;
}

.filters-form input,
.filters-form select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    min-width: 150px;
}

.filters-form button {
    padding: 8px 16px;
}

/* Dashboard Table */
.post-like-dislike-dashboard table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.post-like-dislike-dashboard table thead {
    background: #f9f9f9;
}

.post-like-dislike-dashboard table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.post-like-dislike-dashboard table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.post-like-dislike-dashboard table tbody tr:hover {
    background: #f9f9f9;
}

.post-like-dislike-dashboard table em {
    color: #666;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    background: #e7f3ff;
    color: #0066cc;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

/* Pagination */
.tablenav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #ddd;
}

.tablenav-pages {
    margin: 0;
}

.tablenav-pages a {
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #0073aa;
    transition: all 0.2s;
}

.tablenav-pages a:hover {
    color: white;
    background: #0073aa;
    border-color: #0073aa;
}

.tablenav-pages .current {
    padding: 5px 10px;
    background: #0073aa;
    color: white;
    border: 1px solid #0073aa;
    border-radius: 3px;
}

/* Stats Section */
.dashboard-stats {
    padding: 15px;
    background: #f0f7ff;
    border-left: 4px solid #0073aa;
    border-radius: 3px;
    margin-top: 20px;
    font-size: 14px;
}

/* Admin Page Styles */
.post-like-dislike-admin {
    max-width: 800px;
}

.settings-section,
.data-management-section,
.shortcodes-section,
.stats-section {
    margin-bottom: 30px;
}

.settings-section h2,
.data-management-section h2,
.shortcodes-section h2,
.stats-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.form-table {
    width: 100%;
}

.form-table th {
    text-align: left;
    padding: 10px;
    width: 200px;
    font-weight: 600;
}

.form-table td {
    padding: 10px;
}

.form-table input[type="checkbox"] {
    margin-right: 10px;
}

/* Danger Zone */
.danger-zone {
    border-left: 4px solid #dc3545;
}

.danger-zone h3 {
    margin-top: 0;
}

.button-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.button-danger:hover {
    background: #e74c5c;
    border-color: #e74c5c;
}

.button-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Shortcode Info */
.shortcode-info {
    border-radius: 5px;
}

.shortcode-info h3 {
    margin-top: 0;
}

.shortcode-info code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #0073aa;
}

/* Stats Grid */
.stats-grid {
    gap: 20px;
}

.stat-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-like-dislike-buttons {
        flex-direction: column;
    }

    .post-like-dislike-btn {
        width: 100%;
    }

    .filters-form {
        flex-direction: column;
    }

    .filters-form input,
    .filters-form select {
        width: 100%;
        min-width: auto;
    }

    .post-like-dislike-dashboard table {
        font-size: 12px;
    }

    .post-like-dislike-dashboard table th,
    .post-like-dislike-dashboard table td {
        padding: 8px;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .post-like-dislike-notification {
        left: 10px;
        right: 10px;
    }
}

/* Accessibility */
.post-like-dislike-btn:focus,
.filters-form input:focus,
.filters-form select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Loading State */
.post-like-dislike-btn.processing::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 5px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Print Styles */
@media print {
    .post-like-dislike-buttons,
    .dashboard-controls,
    .dashboard-filters {
        display: none;
    }
}