/* DJ Web Requests Styles */

#dj-request-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Event Header */
.dj-event-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.dj-event-header h2 {
    margin: 0 0 10px 0;
    font-size: 2em;
}

.dj-event-info {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Two Column Layout */
.dj-form-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.dj-search-column {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
}

.dj-requests-column {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

/* Tabs */
#dj-request-tabs {
    display: flex;
    border-bottom: 2px solid #e1e5e9;
    margin-bottom: 20px;
}

.dj-tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.dj-tab-btn:hover {
    color: #333;
    background-color: #f8f9fa;
}

.dj-tab-btn.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background-color: #fff;
}

/* Tab Content */
.dj-tab-content {
    display: none;
}

.dj-tab-content.active {
    display: block;
}

/* Search Section */
.dj-search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.dj-search-section input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.dj-search-section input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.dj-search-section button {
    padding: 12px 24px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dj-search-section button:hover {
    background: #005a87;
}

/* Results Container */
.dj-results-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 10px;
}

.dj-no-results {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Result Items */
.dj-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #fff;
    transition: all 0.3s ease;
}

.dj-result-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #007cba;
}

.dj-result-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
}

.dj-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.dj-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #999;
    border-radius: 4px;
}

.dj-result-info {
    flex: 1;
    min-width: 0;
}

.dj-result-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.dj-song-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.dj-result-info p {
    margin: 2px 0;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dj-explicit,
.dj-explicit-badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.dj-result-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dj-preview-btn,
.dj-add-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dj-preview-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.dj-preview-btn:hover {
    background: #e9ecef;
}

.dj-add-btn {
    background: #28a745;
    color: white;
}

.dj-add-btn:hover {
    background: #218838;
}

.dj-add-btn.added {
    background: #28a745;
    color: white;
    cursor: default;
}

.dj-add-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Genre Grid */
.dj-genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 10px;
}

.dj-genre-item {
    text-align: center;
}

.dj-genre-btn {
    width: 100%;
    padding: 15px 10px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dj-genre-btn:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.dj-genre-btn:disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
}

/* Request Form */
#dj-request-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e1e5e9;
}

#dj-request-form h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.dj-form-group {
    margin-bottom: 15px;
}

.dj-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.dj-form-group input,
.dj-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.dj-form-group input:focus,
.dj-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.dj-selected-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.dj-selected-tag {
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

#dj-submit-btn,
#dj-clear-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

#dj-submit-btn {
    background: #007cba;
    color: white;
}

#dj-submit-btn:hover {
    background: #005a87;
}

#dj-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

#dj-clear-btn {
    background: #6c757d;
    color: white;
}

#dj-clear-btn:hover {
    background: #545b62;
}

/* My Requests */
#dj-my-requests {
    margin: 20px 0;
}

#dj-my-requests h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.dj-empty-requests {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.dj-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    margin-bottom: 8px;
}

.dj-request-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.dj-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.dj-remove-btn:hover {
    background: #c82333;
}

/* Loading */
#dj-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 1000;
}

.dj-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Messages */
#dj-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
}

.dj-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

.dj-message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Leaderboard Styles */
#dj-current-leaderboard {
    margin-top: 30px;
}

#dj-current-leaderboard h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

.dj-leaderboard-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
}

.dj-rank {
    background: #007cba;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}

.dj-song-info {
    flex: 1;
    min-width: 0;
}

.dj-song-line {
    display: flex;
    align-items: center;
}

.dj-song {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.dj-requester {
    color: #666;
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

.dj-votes {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
    flex-shrink: 0;
}

.dj-delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.dj-delete-btn:hover {
    background: #c82333;
}

/* Preview Button Styles */
.dj-preview-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.dj-preview-btn:hover {
    background: #138496;
}

.dj-preview-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.dj-preview-btn.playing {
    background: #dc3545;
}

.dj-preview-btn.playing:hover {
    background: #c82333;
}

.dj-preview-timer {
    display: inline-block;
    margin-left: 8px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    min-width: 40px;
}

.dj-no-preview {
    color: #999;
    font-size: 12px;
    font-style: italic;
    margin-right: 8px;
}

.dj-error {
    color: #dc3545;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Preview Button States */
.dj-preview-btn.loading {
    opacity: 0.7;
}

.dj-preview-btn.playing {
    background: #dc3545;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .dj-form-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dj-requests-column {
        position: static;
    }

    #dj-request-form-container {
        padding: 15px;
    }

    .dj-search-section {
        flex-direction: column;
    }

    .dj-result-item {
        flex-direction: column;
        text-align: center;
    }

    .dj-result-image {
        margin: 0 0 10px 0;
    }

    .dj-result-actions {
        margin-top: 10px;
    }

    #dj-messages {
        position: static;
        margin: 20px 0;
    }
}

/* Button text wrapper - prevent click events on text to ensure clicks always target button */
.dj-btn-text {
    pointer-events: none;
}