/**
 * Améliorations pour l'interface de la carte des vétérinaires
 */

/* Réduction de la taille du header de la carte */
.map-container {
    height: 450px; /* Augmenté pour compenser la réduction du header */
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Nouveau style pour le header compact de la carte des vétérinaires */
.vet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eaeaea;
}

.vet-header-info {
    flex: 1;
    padding-right: 10px;
}

.vet-header-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #3a3a3a;
    font-weight: 600;
}

.vet-header-image {
    position: relative;
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.vet-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vet-header .emergency-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 3px 6px;
    font-size: 0.7rem;
}

/* Ajustement de la section info pour compenser le déplacement du header */
.vet-info {
    padding: 15px;
}

/* Styles pour les sections de spécialités et services */
.vet-specialty-section,
.vet-services-section {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.vet-specialty-section {
    border-left: 3px solid #4CAF50;
}

.vet-services-section {
    border-left: 3px solid #2196F3;
}

.section-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    padding-bottom: 5px;
    border-bottom: 1px solid #eaeaea;
}

/* Styles pour le bouton qui ouvre le modal */
.btn-specialties-services {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f0f7f0;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 10px 0;
}

.btn-specialties-services:hover {
    background-color: #e8f5e9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-specialties-services i {
    color: #4CAF50;
    font-size: 1rem;
}

/* Styles pour le modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
    background-color: #f9f9f9;
    border-radius: 8px 8px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.modal-close {
    font-size: 1.5rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.modal-close:hover {
    color: #555;
}

.modal-body {
    padding: 20px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

/* Animations pour le modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Grille à deux colonnes pour les spécialités et services */
.specialty-grid,
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.grid-item {
    padding: 8px 10px;
    background-color: #fff;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px;
    border: 1px solid #eaeaea;
}

.grid-item-description {
    width: 100%;
    margin-top: 5px;
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
    padding-left: 23px; /* Pour aligner avec l'icône */
}

.specialty-grid .grid-item {
    color: #2e7d32;
}

.services-grid .grid-item {
    color: #1565c0;
    padding: 6px 10px;
    justify-content: flex-start;
    background-color: #f0f7ff;
    border: 1px solid #e3f2fd;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    height: 30px;
}

.service-item {
    display: inline-flex;
    align-items: center;
    height: 28px;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    padding-left: 10px;
}

.service-name {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 4px;
}

/* Style pour le badge d'urgence des créneaux horaires */
.emergency-time-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e53935;
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Styles pour les boutons d'action de la carte vétérinaire */
.vet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 8px;
    padding: 15px 0 0;
    margin-top: auto;
}

.vet-actions a {
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 5px;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vet-actions a i {
    margin-right: 5px;
}

.vet-actions .btn-primary {
    background-color: #4CAF50;
    color: white;
    border: none;
}

.vet-actions .btn-primary:hover {
    background-color: #3e8e41;
}

.vet-actions .btn-outline {
    background-color: transparent;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.vet-actions .btn-outline:hover {
    background-color: #4CAF50;
    color: white;
}

.services-grid .grid-item:hover {
    background-color: #e3f2fd;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.service-icon {
    color: #1565c0;
    font-size: 0.9rem;
    margin-right: 8px;
    min-width: 14px;
    display: inline-flex;
    justify-content: center;
}

/* Ajuster l'espacement entre les éléments de la grille */
.specialty-grid {
    gap: 12px;
    margin-top: 10px;
}

.services-grid {
    gap: 6px;
    margin-top: 10px;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
}

.grid-item .specialty-icon {
    width: 18px;
    height: 18px;
    margin-right: 5px;
}

/* Styles pour la description du vétérinaire */
.vet-description {
    font-size: 0.85rem;
    color: #555;
    margin: 8px 0;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Amélioration de l'affichage des horaires */
.availability-days {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.day-badge {
    font-size: 0.75rem;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    min-width: 30px;
    margin-right: 3px;
    margin-bottom: 3px;
}

.day-badge.available {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.day-badge.unavailable {
    background-color: #f5f5f5;
    color: #9e9e9e;
    border: 1px solid #e0e0e0;
}

.availability-details {
    font-size: 0.8rem;
    color: #555;
    margin-top: 5px;
}

.availability-day {
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
}

.availability-day .day {
    font-weight: 600;
    min-width: 35px;
    margin-right: 5px;
}

/* Badge pour les créneaux d'urgence */
.emergency-time-slot {
    background-color: #ffebee;
    color: #c62828;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.emergency-time-slot img.urgence-icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    filter: brightness(0.9);
}

/* Amélioration de l'affichage des services et spécialités */
.vet-specialty {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.specialty-icons {
    display: flex;
    gap: 5px;
    margin-right: 8px;
}

.specialty-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.specialty-text {
    font-size: 0.85rem;
    color: #555;
}

.vet-services {
    margin: 8px 0;
    background-color: #f5f8ff;
    padding: 6px 8px;
    border-radius: 4px;
    border-left: 3px solid #4a89dc;
}

.vet-services small {
    font-size: 0.8rem;
    color: #444;
    display: block;
}

.service-tag {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1565c0;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin: 2px;
}

/* Badge d'urgence sur l'image du vétérinaire */
.emergency-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #c62828;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Style pour les info-windows de Google Maps */
.vet-info-window {
    padding: 5px;
    max-width: 280px;
}

.vet-info-window h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #333;
}

.vet-info-window p {
    margin: 3px 0;
    font-size: 0.85rem;
    color: #555;
}

.vet-info-window .vet-services {
    margin: 5px 0;
    padding: 4px 6px;
}

.vet-info-window .availability-days {
    margin: 5px 0;
}

.vet-info-window .btn {
    font-size: 0.8rem;
    padding: 4px 8px;
    margin-top: 5px;
}

/* Styles pour le statut de géolocalisation */
#geo-status {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 5px 0;
    display: inline-block;
    transition: all 0.3s ease;
    min-height: 20px;
    min-width: 100px;
}

.position-found {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #2e7d32;
}

.position-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 3px solid #c62828;
    font-weight: 500;
}

/* Style pour le bouton de géolocalisation */
#geo-location-btn {
    background-color: #4285F4;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#geo-location-btn:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#geo-location-btn:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.7;
}

#geo-location-btn i {
    font-size: 1rem;
}
