/* Map Modal Styles */
.map-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.map-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 98vw;
    max-width: 540px;
    height: 92vh;
    max-height: 700px;
    min-width: 320px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.map-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: between;
    align-items: center;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
}

.map-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.map-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

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

.map-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding-bottom: 0;
}

#mapDiv {
    flex: 1 1 auto;
    min-height: 320px;
    height: 400px;
    max-height: 100%;
    border-radius: 0 0 12px 12px;
    z-index: 0;
    width: 100%;
}

.map-controls {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
}

.map-controls .map-button {
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    font-size: 1rem;
    padding: 0.5rem 0.25rem;
    border-radius: 0.75rem;
    white-space: nowrap;
    margin: 0 !important;
    width: auto !important;
}

.map-button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    font-family: inherit;
}

.map-button-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34,197,94,0.18);
    border: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 12px 28px;
    border-radius: 10px;
    transition: background 0.2s, box-shadow 0.2s;
}

.map-button-primary:hover {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    box-shadow: 0 6px 18px rgba(34,197,94,0.22);
}

.map-button-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1.5px solid #d1d5db;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 12px 24px;
    border-radius: 10px;
    transition: background 0.2s, box-shadow 0.2s;
}

.map-button-secondary:hover {
    background: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.gps-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-top: 12px;
}

.gps-button:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.gps-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.coordinates-display {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: #475569;
}

.coordinates-display.has-coordinates {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

/* Responsive Design */
@media (max-width: 768px) {
    .map-modal-content {
        width: 99vw;
        max-width: 99vw;
        height: 97vh;
        max-height: 99vh;
        min-width: 0;
        min-height: 0;
        margin: 0;
        border-radius: 0.75rem;
    }
    .map-container {
        min-height: 220px;
    }
    #mapDiv {
        min-height: 180px;
        height: 220px;
        max-height: 50vh;
    }
    .map-controls {
        flex-direction: row !important;
        width: 100% !important;
        margin: 10px 0 0 0 !important;
        padding: 8px 0 !important;
    }
    .map-controls .map-button {
        width: auto !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 600px) {
    .map-modal-content {
        min-width: 0;
        min-height: 0;
    }
    .map-container {
        min-height: 0;
        height: 100%;
    }
    #mapDiv {
        min-height: 180px;
        height: auto;
        max-height: 100%;
    }
    .map-controls {
        margin-top: auto !important;
        margin-bottom: 0 !important;
        border-radius: 0 0 12px 12px;
    }
}
