/* Styles pour le widget géolocalisation */

.geolocation-widget {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    background: #f9fafb;
    margin-bottom: 1rem;
}

/* Zone de recherche */
.search-zone {
    margin-bottom: 1rem;
    position: relative; /* Pour le positionnement des suggestions */
}

.search-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.address-search {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #3b82f6; /* Bleu du dashboard */
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.search-btn:hover {
    background: #2563eb; /* Bleu plus foncé au hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Ombres subtiles */
}

.search-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.25rem; /* Espacement par rapport au champ de recherche */
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    transition: background-color 0.15s ease;
}

.suggestion-item:hover {
    background: #f3f4f6;
}

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

.suggestion-item.selected {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Zone de confirmation */
.confirmation-zone {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.address-summary h4 {
    margin: 0 0 1rem 0;
    color: #374151;
    font-size: 1.125rem;
    font-weight: 600;
}

.address-details p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

.address-details strong {
    color: #374151;
    font-weight: 600;
}

/* Carte */
.map-section {
    margin: 1.5rem 0;
}

.map-instructions {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.map-container {
    height: 300px;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: #f8f9fa; /* Couleur de fond pour voir le conteneur */
    min-height: 300px; /* Forcer une hauteur minimale */
}

/* S'assurer que la carte est visible même si le parent est masqué */
.confirmation-zone .map-container {
    display: block !important;
    height: 300px !important;
    min-height: 300px !important;
}

/* S'assurer que la carte Google Maps prend toute la place */
.map-container .gm-style {
    width: 100% !important;
    height: 100% !important;
}

/* Styles pour Google Maps */
.map-container {
    position: relative;
}

.map-container .gm-style-moc {
    border-radius: 0.375rem;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-primary {
    background: #059669;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.btn-primary:hover {
    background: #047857;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* État de géolocalisation */
.geolocation-status {
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.geolocation-status.loading {
    background-color: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.geolocation-status.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.geolocation-status.error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .search-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .map-container {
        height: 250px;
    }
} 