/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

/* Fullscreen Map */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Search Container (Top Center) */
.search-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 90%;
    max-width: 700px;
}

.search-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    background: white;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.search-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Search Suggestions */
.search-suggestions {
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.visible {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Loading Indicator */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Error Message */
.error-message {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px 50px 16px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.error-message span:not(.error-icon) {
    color: #856404;
    flex-grow: 1;
}

.close-error {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #856404;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
}

.close-error:hover {
    opacity: 0.7;
}

/* Info Panel (Left Side) */
.info-panel {
    position: absolute;
    top: 100px;
    left: 20px;
    z-index: 20;
    width: 90%;
    max-width: 380px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    position: relative;
}

.panel-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-panel {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.close-panel:hover {
    background: rgba(255, 255, 255, 0.3);
}

.panel-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Account Info */
.account-info {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.account-info h3 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 18px;
}

.account-info p {
    margin: 8px 0;
    color: #333;
    font-size: 14px;
}

.account-info strong {
    color: #666;
    display: inline-block;
    min-width: 80px;
}

/* Schedule Info */
.schedule-info h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    margin: -8px -12px 15px -12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.schedule-header:hover {
    background-color: #f5f5f5;
}

.schedule-toggle {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: #667eea;
    font-weight: bold;
}

.schedule-toggle.collapsed {
    transform: rotate(-90deg);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.schedule-list.collapsed {
    max-height: 0;
    opacity: 0;
}

.schedule-day {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.day-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.day-hours {
    color: #666;
    font-size: 14px;
}

/* Coordinates Info */
.coordinates-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.small-text {
    font-size: 12px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-container {
        width: calc(100% - 20px);
        max-width: none;
        top: 10px;
    }

    .search-wrapper {
        gap: 8px;
    }

    .search-input {
        padding: 14px 16px;
        font-size: 15px;
    }

    .search-button {
        padding: 14px 24px;
        font-size: 15px;
    }

    .info-panel {
        top: 80px;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: none;
        max-height: calc(100vh - 100px);
    }

    .panel-header h2 {
        font-size: 20px;
        padding-right: 40px;
    }

    .error-message {
        top: 80px;
        width: calc(100% - 20px);
        max-width: none;
    }
}

@media (max-width: 480px) {
    .panel-content {
        padding: 15px;
    }

    .account-info h3,
    .schedule-info h3 {
        font-size: 16px;
    }
}

/* Map Controls Override (Google Maps defaults) */
.gm-style .gm-style-iw-c {
    padding: 15px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.gm-style .gm-style-iw-t::after {
    background: white !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}
