/* Main App Styles for LocalCannabisStop.com */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.location-search {
    display: flex;
    gap: 10px;
    max-width: 600px;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1em;
    border: 2px solid #2d5a3f;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

.btn-locate {
    padding: 12px 24px;
    font-size: 1em;
    border: 2px solid #2d5a3f;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    background: linear-gradient(135deg, #2d5a3f 0%, #1a472a 100%);
    color: white;
}

.btn-locate:hover {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.radius-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.radius-label {
    color: white;
    font-weight: 600;
    font-size: 1.1em;
    opacity: 0.9;
}

.radius-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-radius {
    padding: 8px 16px;
    font-size: 0.95em;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    opacity: 0.8;
}

.btn-radius:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: translateY(-1px);
}

.btn-radius.active {
    background: #1a472a;
    border-color: #1a472a;
    opacity: 1;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: white;
    color: #1a472a;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

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

.status-message {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

.status-message.visible {
    display: block;
}

.status-message.error {
    background: #fee;
    color: #c33;
}

.status-message.success {
    background: #efe;
    color: #33c;
}

.status-message.loading {
    background: #fff3cd;
    color: #856404;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    min-height: 600px;
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

.map-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    flex: 1;
    min-height: 400px;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 12px;
}

.sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    color: white;
    padding: 20px;
}

.sidebar-header h2 {
    font-size: 1.5em;
}

.results-list {
    flex: 1;
    overflow-y: auto;
    max-height: 700px;
    padding: 0;
}

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

.business-card {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.business-card:hover {
    background: #f5f9f7;
}

.business-card:last-child {
    border-bottom: none;
}

.business-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #1a472a;
    margin-bottom: 8px;
}

.business-address {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 8px;
    line-height: 1.5;
}

.business-hours {
    font-size: 0.9em;
    color: #2d5a3f;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.business-phone {
    font-size: 0.9em;
    color: #2d5a3f;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.business-phone a {
    color: #2d5a3f;
    text-decoration: underline;
}

.business-phone a:hover {
    color: #1a472a;
}

.business-distance {
    font-size: 0.9em;
    color: #2d5a3f;
    font-weight: 500;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.business-type {
    display: inline-block;
    background: #e8f5e8;
    color: #1a472a;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    margin-top: 8px;
}

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

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #666;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 12px;
}

.popover-popup {
    font-size: 0.9em !important;
}

.popup-name {
    font-size: 1.1em !important;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a472a;
}

.popup-hours {
    font-size: 0.9em;
    color: #2d5a3f;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.popup-phone {
    font-size: 0.9em;
    color: #2d5a3f;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.popup-phone a {
    color: #2d5a3f;
    text-decoration: underline;
}

.popup-distance {
    color: #2d5a3f;
    font-weight: 500;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        max-height: none;
    }
    
    .location-search {
        flex-direction: column;
    }
    
    .search-input {
        max-width: none;
        width: 100%;
    }
    
    .radius-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .radius-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .btn-radius {
        flex: 1;
        max-width: 150px;
        text-align: center;
    }
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
        max-height: 400px;
        overflow-y: auto;
    }
}

@media (min-width: 969px) {
    .controls {
        margin-bottom: 10px;
    }
    
    .search-controls {
        margin-bottom: 10px;
    }
    
    .radius-controls {
        margin-bottom: 20px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .business-card {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid white;
    }
    
    .business-card {
        border: 2px solid #1a472a;
    }
}
