/* ==============================================
   Requests Map Page Styles
   ============================================== */

/* Page Layout */
.requests-map-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

/* Desktop Header */
.requests-map-header {
    flex-shrink: 0;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.view-toggle-btn:hover {
    color: var(--text-primary);
}

.view-toggle-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Mobile toggle button */
.btn-toggle-view {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.btn-toggle-view svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    stroke-width: 2;
    fill: none;
}

/* ================================
   CARDS VIEW
   ================================ */

.requests-cards-view {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    background: var(--bg-primary);
}

.cards-view-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Country Sections */
.country-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.country-section {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .country-section {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.country-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.country-section-header:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

[data-theme="dark"] .country-section-header {
    background: linear-gradient(135deg, #1e3a5f, #172554);
}

[data-theme="dark"] .country-section-header:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
}

.country-section-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.country-section-flag {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.country-section-name {
    font-size: 17px;
    font-weight: 700;
    color: white !important;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.country-section-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85) !important;
    margin-top: 2px;
}

.country-section-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-section-toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.country-section-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.country-section-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: white;
    stroke-width: 2.5;
    transition: transform 0.3s;
}

.country-section.collapsed .country-section-toggle svg {
    transform: rotate(-90deg);
}

.country-section-body {
    padding: 16px;
    display: block;
    background: var(--bg-card);
}

.country-section.collapsed .country-section-body {
    display: none;
}

.clubs-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* Club Card Item */
.club-card-item {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e7eb;
    position: relative;
}

[data-theme="dark"] .club-card-item {
    background: #1e293b;
    border-color: #334155;
}

.club-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .club-card-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.club-card-priority-bar {
    height: 4px;
    width: 100%;
}

.club-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.club-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.club-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.club-card-info {
    flex: 1;
    min-width: 0;
}

.club-card-name {
    font-size: 17px;
    font-weight: 700;
    color: #111827 !important;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

[data-theme="dark"] .club-card-name {
    color: #f9fafb !important;
}

.club-card-location {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.club-card-city {
    color: #1f2937 !important;
    font-weight: 600;
}

.club-card-country {
    color: #4b5563 !important;
    font-size: 12px;
}

/* Dark mode overrides */
[data-theme="dark"] .club-card-city {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .club-card-country {
    color: #d1d5db !important;
}

/* Country section meta in light mode */
.country-section-meta {
    color: #4b5563 !important;
}

[data-theme="dark"] .country-section-meta {
    color: #9ca3af !important;
}

.club-card-location svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.club-card-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 10px;
    flex-shrink: 0;
}

[data-theme="dark"] .club-card-badge {
    background: #334155;
}

.club-card-badge .badge-count {
    font-size: 22px;
    font-weight: 800;
    color: #1f2937 !important;
    line-height: 1;
}

[data-theme="dark"] .club-card-badge .badge-count {
    color: #f1f5f9 !important;
}

.club-card-badge .badge-label {
    font-size: 10px;
    color: #6b7280 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .club-card-badge .badge-label {
    color: #94a3b8 !important;
}

.club-card-positions {
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

[data-theme="dark"] .club-card-positions {
    background: #334155;
}

.club-card-positions .positions-label {
    font-size: 11px;
    color: #6b7280 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .club-card-positions .positions-label {
    color: #94a3b8 !important;
}

.club-card-positions .positions-list {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937 !important;
}

[data-theme="dark"] .club-card-positions .positions-list {
    color: #f1f5f9 !important;
}

.club-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
}

.club-card-footer .priority-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.club-card-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
}

.club-card-action svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s;
}

.club-card-item:hover .club-card-action svg {
    transform: translateX(4px);
}

/* Mobile Cards View */
@media (max-width: 768px) {
    .requests-cards-view {
        padding: var(--spacing-md);
        padding-top: calc(60px + env(safe-area-inset-top, 10px));
    }

    .clubs-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .club-card-content {
        padding: 16px;
        gap: 12px;
    }

    .club-card-avatar {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .club-card-name {
        font-size: 15px;
    }
}

/* Mobile Header - Compact floating bar */
.requests-map-mobile-header {
    display: none;
}

/* Map Container */
.requests-map-container {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.requests-map-container .map-view {
    flex: 1;
    min-width: 0;
    height: 100%;
}

/* Desktop Sidebar */
.requests-map-sidebar {
    width: 340px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.requests-map-sidebar .map-sidebar-header {
    flex-shrink: 0;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

.requests-map-sidebar .map-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    max-height: none !important;
    padding: var(--spacing-sm);
}

/* Club marker badge in sidebar */
.club-marker-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
    flex-shrink: 0;
}

.club-marker-badge.priority-urgent { background: var(--color-error); }
.club-marker-badge.priority-high { background: var(--color-warning); }
.club-marker-badge.priority-medium { background: var(--color-info); }
.club-marker-badge.priority-low { background: var(--color-success); }

/* Map list */
.map-list-arrow {
    flex-shrink: 0;
    opacity: 0.4;
}

.map-list-arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.club-map-item:hover .map-list-arrow {
    opacity: 1;
}

/* Club Map Marker */
.club-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.club-map-marker {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-marker-icon {
    width: 28px;
    height: 28px;
}

/* ================================
   BOTTOM SHEET - Design Pro
   ================================ */

.requests-bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.requests-bottom-sheet-overlay.open {
    opacity: 1;
    visibility: visible;
}

.requests-bottom-sheet {
    position: fixed;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Desktop: centered modal */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    visibility: hidden;
    width: 420px;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

[data-theme="dark"] .requests-bottom-sheet {
    background: #1e293b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.requests-bottom-sheet.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.requests-bottom-sheet-handle {
    display: none; /* Hidden on desktop */
    justify-content: center;
    padding: 12px 0 8px;
}

.requests-bottom-sheet-handle::before {
    content: '';
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .requests-bottom-sheet-handle {
        display: flex;
    }
}

.requests-bottom-sheet-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-md);
}

.bottom-sheet-club-badge .club-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.club-badge.priority-urgent { background: linear-gradient(135deg, #ef4444, #dc2626); }
.club-badge.priority-high { background: linear-gradient(135deg, #f59e0b, #d97706); }
.club-badge.priority-medium { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.club-badge.priority-low { background: linear-gradient(135deg, #10b981, #059669); }

.bottom-sheet-club-info {
    flex: 1;
    min-width: 0;
}

.bottom-sheet-club-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.bottom-sheet-club-name {
    color: #111827 !important;
}

[data-theme="dark"] .bottom-sheet-club-name {
    color: #f1f5f9 !important;
}

.bottom-sheet-club-meta {
    font-size: 14px;
    color: #6b7280 !important;
}

[data-theme="dark"] .bottom-sheet-club-meta {
    color: #94a3b8 !important;
}

.bottom-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

[data-theme="dark"] .bottom-sheet-close {
    background: #334155;
}

.bottom-sheet-close svg {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    stroke-width: 2.5;
    fill: none;
}

[data-theme="dark"] .bottom-sheet-close svg {
    stroke: #94a3b8;
}

.bottom-sheet-close:active {
    background: #e5e7eb;
}

[data-theme="dark"] .bottom-sheet-close:active {
    background: #475569;
}

.requests-bottom-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md) var(--spacing-lg);
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
}

[data-theme="dark"] .requests-bottom-sheet-body {
    background: #1e293b;
}

.bottom-sheet-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

[data-theme="dark"] .bottom-sheet-section-title {
    color: #94a3b8 !important;
}

.bottom-sheet-requests-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.bottom-sheet-request-item {
    background: var(--bg-secondary);
    border-radius: 14px;
    padding: var(--spacing-md);
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
    border: 1px solid transparent;
}

.bottom-sheet-request-item:active {
    transform: scale(0.98);
    background: var(--bg-tertiary);
}

.request-item-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.request-item-header .position-tag {
    font-weight: 600;
}

.request-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--spacing-sm);
}

.request-item-details .detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 5px 10px;
    border-radius: 8px;
}

.request-item-details .detail-item svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

.request-item-details .detail-item.budget {
    color: var(--color-success);
    font-weight: 600;
}

.request-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-xs);
}

.request-item-footer .btn-find-match {
    font-size: 12px;
    padding: 6px 12px;
}

.request-item-footer .btn-find-match svg {
    width: 14px;
    height: 14px;
}

/* Bottom sheet footer avec bouton */
.requests-bottom-sheet-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom, 16px));
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

[data-theme="dark"] .requests-bottom-sheet-footer {
    border-top-color: #334155;
    background: #1e293b;
}

.requests-bottom-sheet-footer .btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
}

/* ================================
   DESKTOP POPUP - Design Pro
   ================================ */

.leaflet-popup-content-wrapper {
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
}

.club-popup {
    min-width: 320px;
    max-width: 380px;
    padding: var(--spacing-md);
}

.popup-club-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.popup-club-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popup-club-badge.priority-urgent { background: linear-gradient(135deg, #ef4444, #dc2626); }
.popup-club-badge.priority-high { background: linear-gradient(135deg, #f59e0b, #d97706); }
.popup-club-badge.priority-medium { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.popup-club-badge.priority-low { background: linear-gradient(135deg, #10b981, #059669); }

.popup-club-info {
    flex: 1;
    min-width: 0;
}

.popup-club-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.3;
}

.popup-club-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.popup-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.popup-requests-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.popup-request-item {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.popup-request-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(2px);
}

.popup-request-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: 4px;
}

.popup-request-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.popup-request-details span {
    background: var(--bg-card);
    padding: 3px 8px;
    border-radius: 6px;
}

.popup-request-details .budget {
    color: var(--color-success);
    font-weight: 600;
}

.popup-request-status {
    margin-top: 6px;
}

.popup-more-requests {
    text-align: center;
    padding: var(--spacing-xs);
    color: var(--text-tertiary);
    font-size: 12px;
}

.popup-footer {
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
}

.popup-footer .btn {
    width: 100%;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
}

/* ================================
   MOBILE STYLES
   ================================ */

@media (max-width: 768px) {
    .requests-map-page {
        height: 100vh;
        height: 100dvh;
        position: relative;
    }

    /* Mobile header - bien visible */
    .requests-map-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: absolute;
        top: env(safe-area-inset-top, 10px);
        left: 0;
        right: 0;
        z-index: 1000;
        padding: var(--spacing-md);
    }

    .requests-map-mobile-header .btn-back,
    .requests-map-mobile-header .btn-list {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--bg-card);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .requests-map-mobile-header .btn-back svg,
    .requests-map-mobile-header .btn-list svg {
        width: 20px;
        height: 20px;
        stroke: var(--text-primary);
        stroke-width: 2;
        fill: none;
    }

    .mobile-header-info {
        background: var(--bg-card);
        padding: var(--spacing-xs) var(--spacing-md);
        border-radius: 20px;
        font-size: 13px;
        color: var(--text-secondary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .mobile-header-count {
        font-weight: 700;
        color: var(--text-primary);
    }

    .mobile-header-sep {
        margin: 0 var(--spacing-xs);
        opacity: 0.5;
    }

    /* Hide desktop elements */
    .hide-mobile {
        display: none !important;
    }

    /* Fullscreen map */
    .requests-map-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .requests-map-container .map-view {
        width: 100%;
        height: 100%;
    }

    /* Bottom sheet - mobile style */
    .requests-bottom-sheet {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        opacity: 1;
        visibility: hidden;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    }

    .requests-bottom-sheet.open {
        transform: translateY(0);
        visibility: visible;
    }
}

/* Small phones */
@media (max-width: 375px) {
    .bottom-sheet-club-name {
        font-size: 16px;
    }

    .bottom-sheet-request-item {
        padding: var(--spacing-sm);
    }

    .request-item-details .detail-item {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .requests-map-sidebar {
        width: 300px;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .requests-map-sidebar {
        width: 380px;
    }
}

/* ================================
   COMPACT REQUEST CARDS
   ================================ */

.request-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.request-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: transform 0.1s, background 0.15s;
    border-left: 3px solid transparent;
}

.request-card.priority-urgent { border-left-color: var(--color-error); background: rgba(239, 68, 68, 0.05); }
.request-card.priority-high { border-left-color: var(--color-warning); background: rgba(245, 158, 11, 0.05); }
.request-card.priority-medium { border-left-color: var(--color-info); background: rgba(59, 130, 246, 0.05); }
.request-card.priority-low { border-left-color: var(--color-success); background: rgba(16, 185, 129, 0.05); }

.request-card:hover {
    background: var(--bg-tertiary);
}

.request-card:active {
    transform: scale(0.98);
}

/* Row: Position + Badges */
.request-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.request-card-position {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.request-card-badges {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mini badges */
.badge-mini {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-mini.priority-urgent { background: var(--color-error); color: white; }
.badge-mini.priority-high { background: var(--color-warning); color: white; }
.badge-mini.priority-medium { background: var(--color-info); color: white; }
.badge-mini.priority-low { background: var(--color-success); color: white; }

.badge-mini.status-open { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.badge-mini.status-in_progress { background: rgba(59, 130, 246, 0.15); color: var(--color-info); }
.badge-mini.status-fulfilled { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge-mini.status-cancelled { background: var(--bg-tertiary); color: var(--text-tertiary); }

/* Infos line */
.request-card-infos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.request-card-infos span {
    display: inline-flex;
    align-items: center;
}

.request-card-infos span:not(:last-child)::after {
    content: '•';
    margin-left: 6px;
    opacity: 0.4;
}

.request-card-infos .budget {
    color: var(--color-success);
    font-weight: 600;
}

.request-card-infos .comment {
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 11px;
}

/* Popup adjustments */
.popup-requests-list .request-card {
    padding: 8px 10px;
}

.popup-requests-list .request-card-position {
    font-size: 13px;
}

.popup-requests-list .request-card-infos {
    font-size: 11px;
}

/* ================================
   CLUB PANEL - Slide from right (Desktop)
   Bottom Sheet (Mobile)
   ================================ */

.club-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.club-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

.club-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100%;
    background: var(--bg-card);
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2);
}

.club-panel.open {
    transform: translateX(0);
}

.club-panel-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.club-panel-back,
.club-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.club-panel-back:hover,
.club-panel-close:hover {
    background: var(--bg-tertiary);
}

.club-panel-back svg,
.club-panel-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    fill: none;
}

.club-panel-title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

.club-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    -webkit-overflow-scrolling: touch;
}

/* ================================
   CLUB PANEL CARD - Beautiful Design
   ================================ */

.club-panel-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header with gradient background */
.club-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 70%, black));
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.club-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.club-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.club-card-identity {
    flex: 1;
    min-width: 0;
}

.club-card-name {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin: 0 0 8px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.club-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.club-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.club-tag.type {
    background: rgba(255, 255, 255, 0.95);
    color: var(--tag-color);
}

.club-tag svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Quick Action Buttons */
.club-card-actions {
    display: flex;
    gap: 10px;
}

.club-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.club-action-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.club-action-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.club-action-btn span {
    font-size: 12px;
    font-weight: 600;
}

/* Info Cards Grid */
.club-info-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.club-info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.club-info-card:hover {
    border-color: var(--color-primary);
}

.info-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 80%, purple));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-card-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: white;
    stroke-width: 2;
}

.info-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-card-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

.info-card-value a {
    color: var(--color-primary);
    text-decoration: none;
}

.info-card-value a:hover {
    text-decoration: underline;
}

/* Notes Section */
.club-notes-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.club-notes-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.club-notes-header svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.club-notes-content {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ================================
   REQUEST PANEL - Beautiful Design
   ================================ */

.request-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.request-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

.request-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100%;
    background: var(--bg-card);
    z-index: 10003;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2);
}

.request-panel.open {
    transform: translateX(0);
}

.request-panel-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.request-panel-back,
.request-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.request-panel-back:hover,
.request-panel-close:hover {
    background: var(--bg-tertiary);
}

.request-panel-back svg,
.request-panel-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    fill: none;
}

.request-panel-title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

.request-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    -webkit-overflow-scrolling: touch;
}

/* Request Panel Card Content */
.request-panel-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Hero header */
.request-card-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 70%, black));
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.request-card-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.request-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.request-hero-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: white;
    stroke-width: 2;
}

.request-hero-info {
    flex: 1;
}

.request-hero-position {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.request-hero-tags {
    display: flex;
    gap: 8px;
}

.request-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.request-tag.priority {
    color: white;
}

.request-tag.status {
    background: rgba(255, 255, 255, 0.9);
    color: var(--status-color);
}

/* Club banner */
.request-club-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.request-club-banner:hover {
    border-color: var(--color-primary);
    background: var(--bg-tertiary);
}

.request-club-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 80%, purple));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.request-club-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: white;
    stroke-width: 2;
}

.request-club-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.request-club-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.request-club-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.request-club-arrow {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--text-tertiary);
    stroke-width: 2;
    flex-shrink: 0;
}

/* Sections */
.request-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border);
}

.request-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.request-section-title svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2;
}

/* Criteria grid */
.request-criteria-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.request-criteria-item {
    background: var(--bg-card);
    padding: 10px 12px;
    border-radius: 8px;
}

.criteria-label {
    display: block;
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.criteria-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Budget display */
.request-budget-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-radius: 10px;
}

.budget-min, .budget-max {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-success);
}

.budget-sep {
    font-size: 16px;
    color: var(--text-tertiary);
}

/* Notes */
.request-notes-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 12px;
    border-radius: 8px;
    font-style: italic;
}

/* Actions */
.request-panel-actions {
    padding-top: 8px;
}

.request-panel-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.request-panel-actions .btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Mobile: Request Panel becomes Bottom Sheet */
@media (max-width: 768px) {
    .request-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    }

    .request-panel.open {
        transform: translateY(0);
    }

    .request-panel-header {
        padding: var(--spacing-sm) var(--spacing-lg);
        position: relative;
    }

    .request-panel-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
    }

    .request-panel-back {
        display: none;
    }

    .request-panel-body {
        padding: var(--spacing-md) var(--spacing-lg);
        padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom, 16px));
    }

    .request-criteria-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading state */
.club-panel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    color: var(--text-tertiary);
}

/* Mobile: Club Panel becomes Bottom Sheet */
@media (max-width: 768px) {
    .club-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    }

    .club-panel.open {
        transform: translateY(0);
    }

    .club-panel-header {
        padding: var(--spacing-sm) var(--spacing-lg);
    }

    .club-panel-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
    }

    .club-panel-back {
        display: none;
    }

    .club-panel-body {
        padding: var(--spacing-md) var(--spacing-lg);
        padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom, 16px));
    }

    .club-panel-info-grid {
        grid-template-columns: 1fr;
    }

    .club-panel-info-item.full-width {
        grid-column: span 1;
    }
}
