/**
 * Artemis Geofencing - Quick Search Enterprise Styles
 * Version: 1.0.0
 * Description: World-class design for instant business search results
 */

/* ============================================================================
   RESULTS CONTAINER
   ============================================================================ */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.results-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.results-title i {
    font-size: 24px;
}

.results-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.results-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-icon:active {
    transform: translateY(0);
}

/* ============================================================================
   LEGEND (Conversion Zone vs Competitors)
   ============================================================================ */

.results-legend {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: rgba(59, 130, 246, 0.05);
    border-bottom: 2px solid rgba(59, 130, 246, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

.legend-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-marker.conversion-zone {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.legend-marker.competitor {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.legend-label {
    color: #475569;
}

/* Dark mode legend */
body.dark-mode .legend-label {
    color: #cbd5e1;
}

body.dark-mode .results-legend {
    background: rgba(59, 130, 246, 0.1);
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

/* ============================================================================
   SEARCH RESULTS LIST
   ============================================================================ */

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    max-height: 600px;
    overflow-y: auto;
}

/* Custom scrollbar */
.search-results-list::-webkit-scrollbar {
    width: 8px;
}

.search-results-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body.dark-mode .search-results-list::-webkit-scrollbar-track {
    background: #1e293b;
}

body.dark-mode .search-results-list::-webkit-scrollbar-thumb {
    background: #475569;
}

/* ============================================================================
   RESULT CARDS
   ============================================================================ */

.result-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.result-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* Conversion Zone Card (Blue Theme) */
.conversion-zone-card {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    border-width: 3px;
}

.conversion-zone-card .card-marker {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
}

/* Business Card (Red/Orange Theme for Competitors) */
.business-card {
    background: #ffffff;
}

.business-card .card-marker.competitor-marker {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}

/* Dark mode cards */
body.dark-mode .result-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .conversion-zone-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: #3b82f6;
}

body.dark-mode .business-card {
    background: #1e293b;
}

/* ============================================================================
   CARD COMPONENTS
   ============================================================================ */

.card-marker {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

body.dark-mode .card-title {
    color: #f1f5f9;
}

.card-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.card-badge.conversion {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
}

.card-badge.competitor {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}

.card-address {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

body.dark-mode .card-address {
    color: #94a3b8;
}

.card-footer {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.card-meta i {
    color: #3b82f6;
}

body.dark-mode .card-meta {
    color: #94a3b8;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #f59e0b;
}

.card-rating i {
    color: #f59e0b;
}

/* ============================================================================
   CARD ACTIONS
   ============================================================================ */

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

body.dark-mode .card-actions {
    border-top-color: #334155;
}

.btn-card-action {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-card-action:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-card-action:active {
    transform: translateY(0);
}

body.dark-mode .btn-card-action {
    background: #334155;
    border-color: #475569;
    color: #3b82f6;
}

body.dark-mode .btn-card-action:hover {
    background: #3b82f6;
    color: #ffffff;
}

/* ============================================================================
   QUICK SEARCH INFO MESSAGE
   ============================================================================ */

.quick-search-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #1e40af;
}

.quick-search-info i {
    font-size: 20px;
    color: #3b82f6;
}

body.dark-mode .quick-search-info {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: #3b82f6;
    color: #bfdbfe;
}

body.dark-mode .quick-search-info i {
    color: #60a5fa;
}

/* ============================================================================
   NO ZONES MODAL
   ============================================================================ */

.quick-search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.quick-search-modal {
    width: 90%;
    max-width: 500px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body.dark-mode .quick-search-modal {
    background: #1e293b;
}

.quick-search-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #e2e8f0;
}

body.dark-mode .quick-search-modal .modal-header {
    border-bottom-color: #334155;
}

.quick-search-modal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.dark-mode .quick-search-modal .modal-header h3 {
    color: #f1f5f9;
}

.quick-search-modal .modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quick-search-modal .modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

body.dark-mode .quick-search-modal .modal-close {
    background: #334155;
    color: #94a3b8;
}

body.dark-mode .quick-search-modal .modal-close:hover {
    background: #475569;
    color: #f1f5f9;
}

.quick-search-modal .modal-body {
    padding: 24px;
}

.quick-search-modal .modal-body p {
    margin: 0 0 20px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
}

body.dark-mode .quick-search-modal .modal-body p {
    color: #cbd5e1;
}

.quick-search-modal .modal-actions {
    display: flex;
    gap: 12px;
}

.quick-search-modal .btn-primary,
.quick-search-modal .btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.quick-search-modal .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
}

.quick-search-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.quick-search-modal .btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.quick-search-modal .btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

body.dark-mode .quick-search-modal .btn-secondary {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode .quick-search-modal .btn-secondary:hover {
    background: #475569;
}

/* ============================================================================
   MAP INFO WINDOW
   ============================================================================ */

.map-info-window {
    padding: 12px;
    min-width: 250px;
}

.map-info-window h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.map-info-window p {
    margin: 4px 0;
    font-size: 14px;
    color: #475569;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        gap: 12px;
    }

    .results-actions {
        width: 100%;
        justify-content: space-between;
    }

    .results-legend {
        flex-direction: column;
        gap: 12px;
    }

    .card-actions {
        flex-direction: column;
    }

    .btn-card-action {
        width: 100%;
    }

    .quick-search-modal {
        width: 95%;
        margin: 0 auto;
    }

    .quick-search-modal .modal-actions {
        flex-direction: column;
    }
}

/* ============================================================================
   BUSINESS TYPE BUTTON ENHANCEMENTS
   ============================================================================ */

.business-type-btn {
    position: relative;
}

.business-type-btn::after {
    content: '👆';
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.business-type-btn:hover::after {
    opacity: 1;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes slideInFromBottom {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.result-card {
    animation: slideInFromBottom 0.3s ease forwards;
}

.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.15s; }
.result-card:nth-child(4) { animation-delay: 0.2s; }
.result-card:nth-child(5) { animation-delay: 0.25s; }
