/* DJ Music Request System - Revamped Modern Styles */

/* Admin menu visibility */
body:not(.is-admin) .admin-only-menu-item {
    display: none !important;
}

:root {
    --primary-color: #00acc1;
    --primary-hover: #00b8ff;
    --secondary-color: #3a3a3a;
    --accent-color: #00e5ff;
    --light-bg: #f5f7fd;
    --dark-text: #202020;
    --light-text: #ffffff;
    --gray-bg: #f0f2f5;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--light-bg);
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
}



/* Navbar separator styles */
.nav-separator {
    color: #ffffff !important;
}

@media (max-width: 991px) {
    .nav-separator {
        width: 100%;
        height: 1px;
        background-color: rgba(255, 255, 255, 0.2);
        margin: 8px 0;
    }
    .nav-separator span {
        display: none;
    }
}

/* Card Styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
}

/* Message Styling */
.message-content {
    font-size: 0.85rem !important;
    max-height: 80px !important;
    overflow-y: auto !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    margin: 0 !important;
}

.dj-message {
    width: 100% !important;
}

.alert {
    width: 100% !important;
    max-width: 100% !important;
}

.card-body {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card-body > div {
    width: 100%;
    max-width: 100%;
}

.d-flex {
    flex-wrap: wrap;
}

.customer-message::-webkit-scrollbar {
    width: 6px;
}

.customer-message::-webkit-scrollbar-track {
    background: var(--light-bg);
}

.customer-message::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.customer-message::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 1.25rem 1.5rem;
}

.card-header.bg-primary {
    background: linear-gradient(to right, var(--primary-color), #8c65ed) !important;
}

.card-header.bg-secondary {
    background: var(--secondary-color) !important;
}

.card-body {
    padding: 1.5rem;
}

/* Button Styling */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Sorting Buttons */
.sorting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 1rem 0;
}

.sorting-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sorting-options .btn {
    font-weight: 600;
    opacity: 0.95;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Bootstrap Icons Font */
@font-face {
  font-family: "bootstrap-icons";
  src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/fonts/bootstrap-icons.woff2") format("woff2"),
       url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/fonts/bootstrap-icons.woff") format("woff");
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    color: #212529;
}

/* Grid System */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1140px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

/* Outline Buttons */
.btn-outline-primary {
    color: #0d6efd;
    border: 1px solid #0d6efd;
}

.btn-outline-secondary {
    color: #6c757d;
    border: 1px solid #6c757d;
}

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

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

/* Button States */
.btn-outline-success.active,
.btn-outline-success:active {
    color: #fff !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.btn-outline-secondary.active,
.btn-outline-secondary:active {
    color: #fff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.btn-outline-danger.active,
.btn-outline-danger:active {
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* Hover States */
.btn-outline-success:hover {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-white { color: #fff; }
.bg-primary { background-color: #0d6efd; }
.bg-secondary { background-color: #6c757d; }
.bg-success { background-color: #198754; }
.bg-danger { background-color: #dc3545; }

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.me-2 { margin-right: 0.5rem; }
.ms-2 { margin-left: 0.5rem; }

/* Card Styles */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
}

.card-header {
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    background-color: rgba(0,0,0,.03);
    border-bottom: 1px solid rgba(0,0,0,.125);
}

.card-body {
    flex: 1 1 auto;
    padding: 1rem;
}

.card-footer {
    padding: 0.5rem 1rem;
    background-color: rgba(0,0,0,.03);
    border-top: 1px solid rgba(0,0,0,.125);
}

/* Form Controls */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Icons */
.bi {
    display: inline-block;
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -0.125em;
}

/* Sorting Options */
.sorting-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sorting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

@media (max-width: 768px) {
    .sorting-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .sorting-options {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .sorting-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .sorting-options {
        width: 100%;
        justify-content: flex-start;
    }
}

.sort-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.sort-btn i {
    font-size: 0.8rem;
    margin-right: 2px;
}

.sort-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Button status colors */
.sort-btn.btn-outline-success.active {
    background-color: #198754 !important;
    color: white !important;
    border-color: #198754 !important;
}

.sort-btn.btn-outline-secondary.active {
    background-color: #6c757d !important;
    color: white !important;
    border-color: #6c757d !important;
}

.sort-btn.btn-outline-danger.active {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

/* Sorting button groups */
.sorting-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sorting-divider {
    width: 1px;
    height: 24px;
    background-color: #dee2e6;
    margin: 0 8px;
}

@media (max-width: 768px) {
    .sorting-options {
        justify-content: flex-start;
    }
    
    .sort-btn {
        min-width: auto;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .sorting-divider {
        display: none;
    }
    
    .sorting-group {
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 8px;
    }
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% { transform: scale(0, 0); }
    100% { transform: scale(80, 80); }
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* Smaller buttons for request cards */
.request-item .card-footer .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.request-item .card-footer .btn i {
    font-size: 0.75rem;
}

/* Darker styling for request cards */
.request-item {
    background-color: #2c3e50;
    color: #f8f9fa;
}

.request-item .card-title {
    color: #ffffff;
}

.request-item .card-text {
    color: #d1d8e0;
}

.request-item .card-header {
    background-color: #1e2a38 !important;
    border-bottom: 1px solid #34495e;
}

.request-item .card-footer {
    background-color: #1e2a38 !important;
    border-top: 1px solid #34495e;
}

.request-item small.text-muted,
.request-item .text-muted {
    color: #a0aec0 !important;
}

/* Custom styles for the request card buttons */
.request-item .btn-outline-success {
    color: #2ecc71;
    border-color: #2ecc71;
    background-color: transparent;
}

.request-item .btn-outline-success:hover:not(:disabled) {
    background-color: #12f270;
    color: #ffffff;
}

.request-item .btn-outline-success:disabled {
    color: #17c95e;
    border-color: #20d568;
    opacity: 0.6;
}

.request-item .btn-outline-primary {
    color: #3498db;
    border-color: #3498db;
    background-color: transparent;
}

.request-item .btn-outline-primary:hover:not(:disabled) {
    background-color: #3498db;
    color: #ffffff;
}

.request-item .btn-outline-danger {
    color: #e74c3c;
    border-color: #e74c3c;
    background-color: transparent;
}

.request-item .btn-outline-danger:hover:not(:disabled) {
    background-color: #e74c3c;
    color: #ffffff;
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 61, 232, 0.2);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Table Styling */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #6b7280;
    padding: 1rem 1.5rem;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(106, 61, 232, 0.05);
}

/* Popular requests table styling */
#popular-requests-table thead th {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 1010;
    border-bottom: 2px solid #dee2e6;
}

#popular-requests-table {
    margin-bottom: 0;
}

#popular-requests-table .vote-count-dj {
    position: relative;
    display: inline-block;
}

#popular-requests-table .vote-number-dj {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    line-height: 1;
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-size: 0.7rem;
}

/* Event Cards */
.event-card {
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.event-card .card-img-top {
    height: 140px;
    object-fit: cover;
}

/* Event Card Heart Animation */
.event-card .bi-heart {
    color: #ff3e55 !important;
    font-size: 1.2rem;
    filter: drop-shadow(0 0 2px rgba(255, 62, 85, 0.5));
    animation: heartbeat 1.5s infinite;
    margin-right: 4px;
}

.event-card .vote-number {
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
    vertical-align: middle;
    position: relative;
    top: 1px;
}

/* Glow effect for popular events */
.event-card[data-votes="3"] .bi-heart,
.event-card[data-votes="4"] .bi-heart,
.event-card[data-votes="5"] .bi-heart {
    filter: drop-shadow(0 0 4px rgba(255, 62, 85, 0.8));
    animation: heart-pulse 1s infinite;
}

/* Extra glow for very popular events (5+ votes) */
.event-card[data-votes="5"] .bi-heart,
.event-card[data-votes="6"] .bi-heart,
.event-card[data-votes="7"] .bi-heart,
.event-card[data-votes="8"] .bi-heart,
.event-card[data-votes="9"] .bi-heart,
.event-card[data-votes="10"] .bi-heart {
    filter: drop-shadow(0 0 6px rgba(255, 62, 85, 1));
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

@keyframes heart-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(220, 53, 69, 0.7));
    }
    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 6px rgba(220, 53, 69, 1));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(220, 53, 69, 0.7));
    }
}

/* Event Code Button Styles */
.event-code-btn {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2;
    min-width: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-code-btn br {
    margin: 2px 0;
}

/* Request Animation */
@keyframes pulseSuccess {
    0% { background-color: rgba(25, 135, 84, 0); }
    50% { background-color: rgba(25, 135, 84, 0.2); }
    100% { background-color: rgba(25, 135, 84, 0); }
}

.request-success {
    animation: pulseSuccess 2s ease-in-out;
}

/* Loading Animation */
.loader {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Rotate animation for refresh button */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotate-animation {
    animation: rotate 1s ease;
}

/* Footer Styling */
footer {
    background-color: #fafafa;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #eee;
}

/* Media Queries for Responsiveness */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1.25rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 50px !important;
        margin-bottom: 0.5rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 1rem;
    }
}

/* Statistics cards */
.stats-card {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.stats-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Popular Requests Table */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.vote-count-dj {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vote-number-dj {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

/* Make the heart icons glow in the table just like in the customer view */
.vote-count-dj .bi-heart-fill {
    filter: drop-shadow(0 0 3px rgba(220, 53, 69, 0.5));
    transition: transform 0.3s, filter 0.3s;
}

.table .badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

/* Live Update Indicator styling */
#auto-refresh-status {
    transition: all 0.3s ease;
}

#auto-refresh-status .spinner-border {
    transition: all 0.3s ease;
}

/* Responsive adjustments for mobile */
@media (max-width: 767.98px) {
    .stats-value {
        font-size: 1.5rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stats-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Stack filter buttons on mobile */
    .btn-group-status {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    /* Adjust table for mobile */
    .table-responsive {
        border-radius: 0.5rem;
        overflow: hidden;
    }
    
    /* Make sure all column headers show properly */
    .table th {
        white-space: nowrap;
    }
}

/* Vote styling */
.vote-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vote-count {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.vote-heart {
    animation: pulse 1.5s infinite;
}

.vote-heart i {
    filter: drop-shadow(0 0 2px rgba(220, 53, 69, 0.8));
    transition: filter 0.3s ease;
}

.vote-heart:hover i {
    filter: drop-shadow(0 0 5px rgba(220, 53, 69, 0.9));
}

.vote-number {
    font-size: 1.1rem;
    color: #444;
}

/* Pulse animation for heart icon */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Vote button transitions */
.vote-btn {
    transition: all 0.2s ease;
    min-width: 80px;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

/* For mobile devices */
@media (max-width: 767px) {
    .vote-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    
    .vote-count {
        margin-bottom: 0 !important;
    }
}

/* Customer View vote styling - matches DJ view */
.vote-count-customer {
    display: inline-flex;
    align-items: center;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 50px;
    padding: 3px 8px;
    margin-right: 6px;
    position: relative;
    overflow: hidden;
}

.vote-count-customer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0) 70%);
    animation: pulse-bg 2s infinite;
    pointer-events: none;
}

.vote-number-customer {
    margin-left: 4px;
    font-weight: 600;
    color: #dc3545;
    font-size: 0.9rem;
}

/* DJ View vote styling */
.vote-count-dj {
    position: relative;
    display: inline-block;
}

.vote-number-dj {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
    line-height: 1;
}

.vote-count-dj .bi-heart-fill {
    display: inline-block;
    filter: drop-shadow(0 0 2px rgba(220, 53, 69, 0.5));
}

.vote-count-dj .bi-heart-fill:hover {
    animation: heart-pulse 0.8s infinite;
}

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

/* Glow effect for popular song requests (3+ votes) */
.request-item[data-votes="3"] .vote-count-dj .bi-heart-fill,
.request-item[data-votes="4"] .vote-count-dj .bi-heart-fill,
.request-item[data-votes="5"] .vote-count-dj .bi-heart-fill {
    filter: drop-shadow(0 0 4px rgba(255, 62, 85, 0.8));
    animation: heart-pulse 1s infinite;
}

/* Extra glow for very popular requests (5+ votes) */
.request-item[data-votes="5"] .vote-count-dj,
.request-item[data-votes="6"] .vote-count-dj,
.request-item[data-votes="7"] .vote-count-dj,
.request-item[data-votes="8"] .vote-count-dj,
.request-item[data-votes="9"] .vote-count-dj,
.request-item[data-votes="10"] .vote-count-dj {
    background-color: rgba(255, 230, 230, 0.7) !important;
    border: 1px solid rgba(255, 62, 85, 0.3);
}

/* Sort the DJ view cards by vote count */
.request-item[data-votes] {
    order: calc(1000 - attr(data-votes number));
}

/* Responsive adaptations for cards */
@media (max-width: 767px) {
    /* Move request stats to bottom on mobile */
    .request-item {
        display: flex;
        flex-direction: column;
    }
    
    .request-item .card-header {
        order: 2;
        margin-top: auto;
        border-top: 1px solid rgba(0,0,0,0.05) !important;
        border-bottom: none !important;
    }
    
    .request-item .card-body {
        order: 1;
        padding-bottom: 0.5rem;
    }
    
    /* Ensure vote button is properly positioned */
    .vote-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    
    .vote-count {
        margin-bottom: 0 !important;
    }
}

/* Custom CSS overrides */
.text-white {
    --bs-text-opacity: 1;
    color: rgba(255, 255, 255, var(--bs-text-opacity)) !important;
}

/* Force song titles to be visible */
.request-item .card-body p,
.request-item p,
p.text-muted,
.text-muted {
    color: #00eaff !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7) !important;
}

/* Song title styling for all sources */
.song-result .fw-bold {
    font-size: 0.85rem;
    line-height: 1.3;
    max-height: 2.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
}

/* Additional YouTube song title styling */
.song-result[data-source="youtube"] .fw-bold {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Sorting buttons styles */
.sorting-buttons {
    display: inline-flex;
    margin-bottom: 1rem;
}

.sorting-buttons .sort-btn {
    padding: 4px 12px;
    border: 1px solid #0d6efd;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #0d6efd;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    position: relative;
}

.sorting-buttons .sort-btn#time-sort-btn {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.sorting-buttons .sort-btn[data-sort="rejected"] {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.sorting-buttons .sort-btn:not(:first-child) {
    margin-left: -1px;
}

.sorting-buttons .sort-btn:hover {
    z-index: 1;
}

.sorting-buttons .sort-btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    z-index: 2;
}

.sorting-buttons .sort-btn[data-sort="approved"] {
    color: #198754;
    border-color: #198754;
}

.sorting-buttons .sort-btn[data-sort="approved"].active {
    background: #198754;
    color: #fff;
}

.sorting-buttons .sort-btn[data-sort="played"] {
    color: #6c757d;
    border-color: #6c757d;
}

.sorting-buttons .sort-btn[data-sort="played"].active {
    background: #6c757d;
    color: #fff;
}

.sorting-buttons .sort-btn[data-sort="rejected"] {
    color: #dc3545;
    border-color: #dc3545;
}

.sorting-buttons .sort-btn[data-sort="rejected"].active {
    background: #dc3545;
    color: #fff;
}

/* Center request cards in DJ event page */
#requests-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* Card sizing for desktop */
@media (min-width: 992px) {
    .request-card {
        width: 100%;
        max-width: 100%;
    }
    
    /* Limit container width on large screens */
    .container {
        max-width: 1400px !important;
    }
}

/* Consistent card sizing for both event.php and dj-event.php */
.card-request {
    width: 100%;
    margin: 0 auto;
}

/* Fix for overlapping cards and increase width */
#requests-list > div {
    padding: 12px;
    box-sizing: border-box;
}

/* Make cards wider */
.request-card {
    min-height: 100%;
}

/* Apply to both pages */
.event-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* DJ Message Notification Styling */
.dj-message-notification {
    padding: 0 1rem;
    transition: all 0.3s ease;
}

.dj-message-notification .alert {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #0d6efd;
    animation: slide-in 0.3s ease-out;
}

.dj-message-notification .message-content {
    font-size: 0.9rem;
    font-weight: 500;
}

.dj-message-notification .btn-close {
    font-size: 0.7rem;
    padding: 0.25rem;
}

@keyframes slide-in {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Heart vote styling for DJ view */
.vote-count-dj {
    display: inline-flex;
    align-items: center;
}

.bi-heart-fill.text-danger {
    color: #ff3e55 !important;
    font-size: 1.2rem;
    filter: drop-shadow(0 0 2px rgba(255, 62, 85, 0.5));
    animation: heartbeat 1.5s infinite;
    margin-right: 4px;
}

.vote-number-dj {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fefefe;
    vertical-align: middle;
    position: relative;
    top: 1px;
}

/* Glow effect for popular song requests (3+ votes) */
.request-item[data-votes="3"] .bi-heart-fill.text-danger,
.request-item[data-votes="4"] .bi-heart-fill.text-danger,
.request-item[data-votes="5"] .bi-heart-fill.text-danger {
    filter: drop-shadow(0 0 4px rgba(255, 62, 85, 0.8));
    animation: heartbeat 1s infinite;
}

/* Extra glow for very popular requests (5+ votes) */
.request-item[data-votes="5"] .bi-heart-fill.text-danger,
.request-item[data-votes="6"] .bi-heart-fill.text-danger,
.request-item[data-votes="7"] .bi-heart-fill.text-danger,
.request-item[data-votes="8"] .bi-heart-fill.text-danger,
.request-item[data-votes="9"] .bi-heart-fill.text-danger,
.request-item[data-votes="10"] .bi-heart-fill.text-danger {
    filter: drop-shadow(0 0 6px rgba(255, 62, 85, 1));
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

@keyframes pulse-bg {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 3px rgba(220, 53, 69, 0.7));
        transform: scale(1);
    }
    to {
        filter: drop-shadow(0 0 6px rgba(220, 53, 69, 1)) drop-shadow(0 0 10px rgba(220, 53, 69, 0.7));
        transform: scale(1.25);
    }
}

.vote-number-dj {
    font-weight: 600;
    color: #ffffff;
}

/* Fix for dropdown menu visibility */
.dropdown-menu {
    z-index: 9999 !important;
}

.btn-group {
    position: relative;
    z-index: 1200 !important;
}

.btn-group .dropdown-menu {
    position: absolute !important;
}

/* Make sure tables don't overlay dropdowns */
.table-responsive {
    overflow: visible;
    z-index: 1000;
}

.table-responsive table {
    position: relative;
    z-index: 1000;
}

/* Custom dropdown for refresh rate */
.refresh-rate-container {
    position: relative;
}

.refresh-rate-dropdown {
    position: relative;
}

.refresh-rate-dropdown .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    top: 100%;
    margin-top: 2px;
    display: none;
    z-index: 9999;
}

.refresh-rate-dropdown .dropdown-menu.show {
    display: block;
}
