/* ================================
   RESULTS OVERLAY
   ================================ */

.results-overlay {
    flex-direction: column;
    overflow: hidden;
}

.results-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: var(--primary-gradient);
    min-height: 0;
}

.results-header {
   padding: var(--space-sm);
   background: var(--bg-white);
   text-align: center;
   flex-shrink: 0;
   display: flex;
   justify-content: space-between;
   align-items: center;
   border: 0.1px solid var(--border-purple);
}

.results-title {
   font-size: var(--text-sm);
   -webkit-background-clip: text;
   -webkit-text-fill-color: var(--purple);
   background-clip: text;
}

.results-map-toggle,
.add-venue-btn {
   background: var(--primary-gradient);
   color: var(--white);
   padding: var(--space-sm) var(--space-lg);
   border-radius: var(--radius-pill);
   cursor: pointer;
   transition: all var(--transition);
   flex: none;
   font-size: var(--space-md);
}

.results-map-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.results-content {
   flex: 1;
   background: var(--bg-white);
   overflow: hidden;
   display: flex;
   flex-direction: column;
   min-height: 0;
   position: relative;
   height: 100%;
}

.results-list-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.results-list-container[style*="display: block"] {
   display: block;
   padding: var(--space-sm) var(--space-lg);
}

.results-map-container {
    display: none;
    flex: 1;
    position: relative;
    height: 100%;
}

.results-map {
    width: 100%;
    height: 100%;
}

.results-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-4xl);
    text-align: center;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    margin: 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-lg);
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Result Items */
.result-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.result-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
    gap: var(--space-md);
}

.result-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
    line-height: 1.2;
}

.result-distance {
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
}

.result-location {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--divider-color);
}

.result-address {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.result-postcode {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.result-authority {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.result-actions {
    display: flex;
}

.result-actions .btn {
    padding: var(--space-md) var(--space-sm);
    font-weight: 600;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

.no-results-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: var(--space-4xl);
    text-align: center;
    height: 100%;
}

.no-results-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.no-results-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

#resultsOverlay .pagination-container {
    position: sticky;
    bottom: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: var(--space-sm);
    z-index: var(--z-overlay);
    box-shadow: var(--shadow);
}

#resultsOverlay .pagination-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    margin-bottom: var(--space-xs);
}

#resultsOverlay .pagination-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

#resultsOverlay .btn-secondary {
  padding: 0;
}

#resultsOverlay .page-numbers {
    display: flex;
    gap: var(--space-sm);
}

#resultsOverlay .page-number {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.page-number.active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--light-blue);
}

.page-number:hover:not(.active) {
    background: var(--hover-subtle);
}
