/* Google Maps-like styling for FindMyMap application */

/* Base styles and typography */
:root {
    --primary-color: #4285F4;     /* Google Blue */
    --secondary-color: #DB4437;   /* Google Red */
    --accent-color: #0F9D58;      /* Google Green */
    --yellow-color: #F4B400;      /* Google Yellow */
    --text-primary: #202124;      /* Google dark gray for primary text */
    --text-secondary: #5f6368;    /* Google medium gray for secondary text */
    --background-light: #f8f9fa;  /* Light background */
    --border-color: #dadce0;      /* Border color */
    --shadow-color: rgba(0,0,0,0.2);
    --font-family: 'Roboto', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Map container */
#map {
    height: 100vh;
    width: 100%;
    z-index: 1;
}

/* Search box styling (Google Maps-like) */
.search-container {
    position: absolute;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    max-width: 400px;
    z-index: 1000;
    border-radius: 8px;
    box-shadow: 0 2px 6px var(--shadow-color);
    background: white;
}

.search-box {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border-color);
}

.search-box:focus-within {
    box-shadow: 0 1px 12px var(--shadow-color);
}

.search-icon {
    color: var(--text-secondary);
    margin-right: 8px;
    font-size: 18px;
}

.search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 8px 0;
    width: 100%;
}

.search-clear {
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
}

/* Controls panel styling */
.controls-panel {
    position: absolute;
    top: 70px;
    left: 10px;
    width: calc(100% - 20px);
    max-width: 400px;
    z-index: 1000;
    border-radius: 8px;
    box-shadow: 0 2px 6px var(--shadow-color);
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
}

.controls-header {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-body {
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Button styling */
.map-button {
    background-color: white;
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    margin: 4px 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px var(--shadow-color);
    transition: all 0.2s ease;
}

.map-button:hover {
    background-color: #f1f3f4;
    box-shadow: 0 1px 5px var(--shadow-color);
}

.map-button.primary {
    background-color: var(--primary-color);
    color: white;
}

.map-button.primary:hover {
    background-color: #1a73e8;
}

.map-button.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.map-button.accent {
    background-color: var(--accent-color);
    color: white;
}

.map-button-icon {
    margin-right: 8px;
    font-size: 18px;
}

/* Form controls */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-select, .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.form-select:focus, .form-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Directions panel styling */
.directions-panel {
    position: absolute;
    bottom: 24px;
    left: 10px;
    width: calc(100% - 20px);
    max-width: 400px;
    max-height: 50vh;
    z-index: 1000;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    background: white;
    overflow-y: auto;
    font-family: var(--font-family);
}

.directions-header {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 16px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.directions-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.directions-summary {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.directions-body {
    padding: 16px;
}

.direction-step {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 4px;
}

.direction-step.current {
    background-color: #e8f0fe;
}

.direction-icon {
    font-size: 24px;
    margin-right: 12px;
    color: var(--primary-color);
}

.direction-content {
    flex-grow: 1;
}

.direction-instruction {
    font-weight: 500;
    margin-bottom: 4px;
}

.direction-distance {
    color: var(--text-secondary);
    font-size: 14px;
}

.direction-divider {
    font-weight: 500;
    margin: 8px 0;
    color: var(--text-secondary);
}

/* View mode controls */
.view-mode-controls {
    position: absolute;
    bottom: 24px;
    right: 10px;
    z-index: 1000;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px var(--shadow-color);
    padding: 8px;
    display: flex;
    flex-direction: column;
}

.view-mode-button {
    margin: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    background-color: white;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-mode-button:hover {
    background-color: #f1f3f4;
}

.view-mode-button.active {
    background-color: var(--primary-color);
    color: white;
}

.view-mode-icon {
    margin-right: 8px;
}

/* Map layers control */
.map-layers-control {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px var(--shadow-color);
    padding: 8px;
}

.map-layer-btn {
    display: block;
    margin: 5px 0;
    padding: 8px 12px;
    background: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.map-layer-btn:hover {
    background: #f1f3f4;
}

.map-layer-btn.active {
    background: var(--primary-color);
    color: rgb(255, 255, 255);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0;
    }
    
    .col-md-3 {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1500;
        background: white;
        overflow-y: auto;
        box-shadow: 2px 0 10px var(--shadow-color);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .col-md-3.active {
        transform: translateX(0);
    }
    
    .mobile-toggle {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 1001;
        background: white;
        border-radius: 8px;
        padding: 8px 12px;
        box-shadow: 0 2px 6px var(--shadow-color);
        cursor: pointer;
        display: flex;
        align-items: center;
        font-weight: 500;
    }
    
    .search-container {
        top: 60px;
    }
    
    .controls-panel {
        top: 120px;
    }
    
    .directions-panel {
        max-width: calc(100% - 20px);
        max-height: 40vh;
    }
    
    .map-layers-control {
        top: 60px;
    }
}

/* Animation effects */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* Pulse animation for GPS marker */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}