/**
 * GFA Booking - Styles pour les créneaux horaires
 */

/* Styles pour le champ téléphone avec indicatif */
.phone-group,
.gfa-phone-group {
    width: 100%;
}

.phone-input-container,
.gfa-phone-input-container {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

/* Wrapper pour le sélecteur personnalisé */
.phone-indicatif-wrapper,
.gfa-phone-indicatif-wrapper {
    position: relative;
    flex: 0 0 auto;
    min-width: 80px;
    max-width: 100px;
}

/* Select caché */
.phone-indicatif-hidden,
.gfa-phone-indicatif-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    visibility: hidden;
}

/* Sélecteur personnalisé */
.phone-indicatif-custom,
.gfa-phone-indicatif-custom {
    position: relative;
    width: 100%;
}

/* Affichage principal */
.phone-indicatif-display,
.gfa-phone-indicatif-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 6px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 12px;
    color: #333;
    transition: border-color 0.3s ease;
    text-align: center;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    min-height: 48px;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
}

.phone-flag,
.gfa-phone-flag {
    font-size: 16px;
    line-height: 1;
}

.phone-code,
.gfa-phone-code {
    font-weight: 600;
    font-size: 12px;
}

.phone-arrow,
.gfa-phone-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

/* Dropdown personnalisé */
.phone-indicatif-dropdown,
.gfa-phone-indicatif-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #DE3834;
    border-radius: 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

.phone-indicatif-custom.open .phone-indicatif-dropdown,
.gfa-phone-indicatif-custom.open .gfa-phone-indicatif-dropdown {
    display: block !important;
}

.phone-indicatif-custom.open .phone-arrow,
.gfa-phone-indicatif-custom.open .gfa-phone-arrow {
    transform: rotate(180deg);
}

/* Options du dropdown */
.phone-option,
.gfa-phone-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.phone-option:last-child,
.gfa-phone-option:last-child {
    border-bottom: none;
}

.phone-option:hover,
.gfa-phone-option:hover {
    background-color: #fff5f5;
}

.phone-option.selected,
.gfa-phone-option.selected {
    background-color: #DE3834;
    color: white;
}

.phone-option .phone-flag,
.phone-option .gfa-phone-flag,
.gfa-phone-option .phone-flag,
.gfa-phone-option .gfa-phone-flag {
    font-size: 11px;
    font-weight: 600;
    background: #DE3834;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 28px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gfa-phone-indicatif-display .gfa-phone-flag {
    font-size: 10px;
    font-weight: 600;
    background: #DE3834;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    min-width: 24px;
    text-align: center;
}

.phone-option .phone-code,
.phone-option .gfa-phone-code,
.gfa-phone-option .phone-code,
.gfa-phone-option .gfa-phone-code {
    font-weight: 500;
    font-size: 13px;
}

/* Focus states */
.phone-indicatif-custom:focus-within .phone-indicatif-display,
.gfa-phone-indicatif-custom:focus-within .gfa-phone-indicatif-display {
    border-color: #DE3834;
    box-shadow: 0 0 0 3px rgba(222, 56, 52, 0.1);
}

.phone-indicatif:focus,
.gfa-phone-indicatif:focus {
    outline: none;
    border-color: #DE3834;
    box-shadow: 0 0 0 3px rgba(222, 56, 52, 0.1);
}

/* Styles pour le select natif d'indicatif */
.gfa-phone-indicatif {
    min-width: 120px;
    max-width: 140px;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gfa-phone-indicatif option {
    padding: 8px 12px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.phone-group input[type="tel"],
.gfa-phone-group input[type="tel"] {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    min-width: 0;
}

.phone-group input[type="tel"]:focus,
.gfa-phone-group input[type="tel"]:focus {
    outline: none;
    border-color: #DE3834;
    box-shadow: 0 0 0 3px rgba(222, 56, 52, 0.1);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .phone-input-container,
    .gfa-phone-input-container {
        flex-direction: column;
        gap: 6px;
    }
    
    .phone-indicatif,
    .gfa-phone-indicatif {
        min-width: auto;
        width: 100%;
        max-width: none;
    }
}

/* Créneaux disponibles */
.available-slots {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.available-slots h5 {
    margin-bottom: 15px;
    color: #030101;
    font-size: 1.1rem;
    font-weight: 600;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.slot-item {
    padding: 10px;
    text-align: center;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.slot-item:hover {
    border-color: #DE3834;
    background: #fff5f5;
    transform: translateY(-2px);
}

.slot-item.selected {
    border-color: #DE3834;
    background: #DE3834;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(222, 56, 52, 0.3);
}

.slot-item.unavailable {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #ccc;
}

.slot-item.unavailable:hover {
    background: #f0f0f0;
    border-color: #ccc;
    transform: none;
}

/* Responsive pour les créneaux */
@media (max-width: 768px) {
    .slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .slot-item {
        padding: 8px;
        font-size: 0.8rem;
    }
}
