/* =====================================================
   REQUESTS MODULE - SPOTIFY-INSPIRED DESIGN
   ===================================================== */

/* Section Override - Maximum specificity to override style.css */
#requests#requests.active {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #0a0a0a !important;
}

#requests#requests {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Module Container - Highest specificity */
#requests#requests .module-container,
#requests#requests #requestsModule,
#requests .module-container,
#requests #requestsModule,
.module-container {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background: #0a0a0a !important;
    color: #e8e8e8 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Override any inherited styles */
#requests#requests * {
    box-sizing: border-box !important;
}

/* Header - Maximum specificity */
#requests#requests .requests-header,
#requests .requests-header,
.requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #333333;
    background: #141414;
    position: sticky;
    top: 0;
    z-index: 100;
}

#requests#requests .search-container,
#requests .search-container,
.search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-container .fas.fa-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    font-size: 14px;
}

#requests#requests .search-input,
#requests .search-input,
.search-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: none;
    border-radius: 20px;
    background: #0a0a0a;
    color: #e8e8e8;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    background: #1f1f1f;
    box-shadow: 0 0 0 2px var(--gold-color);
}

.search-input::placeholder {
    color: #a0a0a0;
}

#requests#requests .header-actions,
#requests .header-actions,
.header-actions {
    display: flex;
    gap: 12px;
    margin-left: 20px;
}

#requests .btn-import,
.btn-import {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-import:hover {
    background: #20b35a;
    transform: translateY(-1px);
}

#requests .btn-add-request,
.btn-add-request {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gold-color);
    color: #0a0a0a;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-request:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
}

/* Filters - Maximum specificity */
#requests#requests .requests-filters,
#requests .requests-filters,
.requests-filters {
    padding: 16px 24px;
    border-bottom: 1px solid #333333;
    background: #141414;
}

#requests#requests .filter-group,
#requests .filter-group,
.filter-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

#requests#requests .filter-btn,
#requests .filter-btn,
.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    color: #a0a0a0;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #1f1f1f;
    color: #e8e8e8;
}

.filter-btn.active {
    background: #1f1f1f;
    color: #e8e8e8;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green { background: #1db954; }
.status-dot.yellow { background: #f59e0b; }
.status-dot.red { background: #ef4444; }
.status-dot.grey { background: #6b7280; }

.filter-count {
    background: #a0a0a0;
    color: #0a0a0a;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

.filter-btn.active .filter-count {
    background: var(--gold-color);
    color: #0a0a0a;
}

/* Requests List - Maximum specificity */
#requests#requests .requests-list,
#requests .requests-list,
.requests-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Request Group (Country/League) */
.request-group {
    margin-bottom: 32px;
}

.group-header {
    position: sticky;
    top: 0;
    background: #0a0a0a;
    padding: 16px 24px 12px;
    border-bottom: 1px solid #333333;
    z-index: 10;
}

.group-title {
    font-size: 16px;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-subtitle {
    font-size: 13px;
    color: #a0a0a0;
    margin: 4px 0 0 0;
}

.group-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        var(--gold-color) 0%,
        var(--gold-color) 60%,
        transparent 100%
    );
    margin-top: 8px;
}

/* Request Item */
.request-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid #444444;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.request-item:hover {
    background: #1f1f1f;
}

.request-item:last-child {
    border-bottom: none;
}

.request-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.request-status.active { background: #1db954; }
.request-status.pending { background: #f59e0b; }
.request-status.urgent { background: #ef4444; }
.request-status.closed { background: #6b7280; }

.request-content {
    flex: 1;
    min-width: 0;
}

.request-club {
    font-size: 15px;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.request-positions {
    font-size: 13px;
    color: #a0a0a0;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.request-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.request-deadline {
    font-size: 11px;
    color: #a0a0a0;
    background: #141414;
    padding: 2px 6px;
    border-radius: 10px;
}

.request-deadline.urgent {
    background: #fef2f2;
    color: #dc2626;
}

.request-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.request-item:hover .request-actions {
    opacity: 1;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.action-btn:hover {
    background: #1f1f1f;
    color: #e8e8e8;
}

.action-btn.export:hover {
    color: var(--gold-color);
}

.action-btn.edit:hover {
    color: #3b82f6;
}

.action-btn.delete:hover {
    color: #ef4444;
}

/* Empty State - High specificity */
#requests .empty-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    height: 100%;
}

.empty-icon {
    font-size: 64px;
    color: #a0a0a0;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0 0 24px 0;
    max-width: 400px;
}

/* Loading State - High specificity */
#requests .loading-state,
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #333333;
    border-top: 3px solid var(--gold-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modals - High specificity */
#requests .modal,
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
}

/* Extra specificity for modal show state */
#requests .modal.show,
#requestsModule .modal.show,
div.modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
}

.modal-content {
    background: #0a0a0a;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #333333;
    background: #141414;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #1f1f1f;
    color: #e8e8e8;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

/* WhatsApp Import Styles */
#whatsappText {
    width: 100%;
    height: 300px;
    padding: 16px;
    border: 2px dashed #333333;
    border-radius: 12px;
    background: #141414;
    color: #e8e8e8;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s ease;
}

#whatsappText:focus {
    outline: none;
    border-color: var(--gold-color);
    background: #1f1f1f;
}

#whatsappText::placeholder {
    color: #a0a0a0;
    opacity: 0.7;
}

.import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.detected-info {
    background: #141414;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.detected-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0 0 8px 0;
}

.detected-info ul {
    margin: 0;
    padding-left: 20px;
    color: #a0a0a0;
    font-size: 13px;
}

.requests-preview {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #333333;
    border-radius: 8px;
}

.preview-item {
    padding: 12px 16px;
    border-bottom: 1px solid #444444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1db954;
}

.preview-content {
    flex: 1;
}

.preview-club {
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 2px;
}

.preview-positions {
    font-size: 12px;
    color: #a0a0a0;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #e8e8e8;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #333333;
    border-radius: 8px;
    background: #141414;
    color: #e8e8e8;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-color);
    background: #1f1f1f;
}

.form-group small {
    font-size: 11px;
    color: #a0a0a0;
    margin-top: 4px;
    display: block;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #333333;
}

/* Export Options */
.export-options {
    display: grid;
    gap: 12px;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #141414;
    border: 1px solid #333333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.export-option:hover {
    background: #1f1f1f;
    border-color: var(--gold-color);
}

.export-option i {
    font-size: 24px;
    color: var(--gold-color);
    width: 32px;
    text-align: center;
}

.export-option div {
    flex: 1;
}

.export-option h3 {
    font-size: 15px;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0 0 4px 0;
}

.export-option p {
    font-size: 13px;
    color: #a0a0a0;
    margin: 0;
}

/* Button Styles */
.btn-primary {
    background: var(--gold-color);
    color: #0a0a0a;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #a0a0a0;
    border: 1px solid #333333;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #1f1f1f;
    color: #e8e8e8;
    border-color: #a0a0a0;
}

.btn-success {
    background: #1db954;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-success:hover {
    background: #1aa34a;
    transform: translateY(-1px);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #141414;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 0;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    gap: 10px;
}

.toast-success {
    border-left: 4px solid #1db954;
    background: rgba(29, 185, 84, 0.1);
}

.toast-error {
    border-left: 4px solid #e22134;
    background: rgba(226, 33, 52, 0.1);
}

.toast-info {
    border-left: 4px solid var(--gold-color);
    background: rgba(212, 175, 55, 0.1);
}

.toast-close {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #1f1f1f;
    color: #e8e8e8;
}

/* Request Details Modal Specific Styles */
.request-details {
    max-width: 600px;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333333;
}

.detail-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #e8e8e8;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(29, 185, 84, 0.1);
    color: #1db954;
}

.status-badge.pending {
    background: rgba(255, 193, 7, 0.1);
    color: #FFC107;
}

.status-badge.urgent {
    background: rgba(226, 33, 52, 0.1);
    color: #e22134;
}

.status-badge.closed {
    background: rgba(158, 158, 158, 0.1);
    color: #9E9E9E;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #a0a0a0;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 16px;
    color: #e8e8e8;
}

.positions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.position-tag {
    background: var(--gold-color);
    color: #0a0a0a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.detail-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-danger {
    background: #e22134;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: #cc1e2f;
    transform: translateY(-1px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .requests-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 16px;
    }

    .search-container {
        max-width: none;
    }

    .header-actions {
        margin-left: 0;
    }

    .filter-group {
        gap: 8px;
    }

    .filter-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .modal-content {
        width: 95%;
        margin: 20px 0;
    }

    .modal-body {
        padding: 20px;
    }

    .import-actions,
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .import-actions button,
    .form-actions button {
        width: 100%;
        justify-content: center;
    }

    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions button {
        width: 100%;
        justify-content: center;
    }
}