/* Input Field - Styles basés sur wp-transport-booking */

.input-field {
    margin-bottom: 16px;
}

.input-field:last-child {
    margin-bottom: 0;
}

.field-label {
    display: block;
    font-weight: 600;
    color: #1f2937 !important;
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: #f59e0b;
    font-weight: 700;
    margin-left: 2px;
}

.field-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    color: #1f2937 !important;
    background: white !important;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.field-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.field-input:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.field-input::placeholder {
    color: #9ca3af;
}

.field-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.field-input.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-input.valid {
    border-color: #f59e0b;
}

.field-input.valid:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.field-input.warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.field-input.warning:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.field-input[type="date"],
.field-input[type="time"] {
    position: relative;
    cursor: pointer;
}

.field-input[type="date"]::-webkit-calendar-picker-indicator,
.field-input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.5);
}

.field-input[type="date"]:hover::-webkit-calendar-picker-indicator,
.field-input[type="time"]:hover::-webkit-calendar-picker-indicator {
    filter: invert(0.2);
}

.field-input[type="date"]:disabled::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: not-allowed;
}

/* Custom Time Select Component */
.custom-time-select {
    position: relative;
    width: 100%;
}

.time-select-trigger {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    box-sizing: border-box;
}

.time-select-trigger:hover {
    border-color: #d1d5db;
}

.time-select-trigger.open {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.time-select-trigger.disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.time-display {
    flex: 1;
    color: #1f2937;
    font-size: 16px;
}

.time-display:not(.selected) {
    color: #9ca3af;
}

.time-select-arrow {
    color: #6b7280;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.time-select-trigger.open .time-select-arrow {
    transform: rotate(180deg);
    color: #f59e0b;
}

.time-options-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 4px;
    display: none;
}

.time-options {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #f59e0b #f3f4f6;
}

.time-options::-webkit-scrollbar {
    width: 6px;
}

.time-options::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.time-options::-webkit-scrollbar-thumb {
    background: #f59e0b;
    border-radius: 3px;
}

.time-option {
    padding: 12px 16px;
    cursor: pointer;
    color: #1f2937;
    font-size: 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.time-option:last-child {
    border-bottom: none;
}

.time-option:hover {
    background: #fffbeb;
}

.time-option.selected {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.time-option.selected:hover {
    background: #fde68a;
}

textarea.field-input {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

select.field-input {
    cursor: pointer;
    background-color: white !important;
    color: #1f2937 !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.field-input:focus {
    background-color: white !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23f59e0b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
}

.error-message {
    display: none;
    color: #ef4444;
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.4;
}

.error-message.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

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

.success-message {
    display: none;
    color: #f59e0b;
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.4;
}

.success-message.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.warning-message {
    display: none;
    color: #f59e0b;
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.4;
}

.warning-message.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

/* Autocomplétion Google Places */
.pac-container {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    margin-top: 4px;
}

.pac-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    font-size: 14px;
}

.pac-item:hover {
    background: #fffbeb;
}

.pac-item-selected {
    background: #fef3c7;
}

.pac-matched {
    font-weight: 600;
    color: #f59e0b;
}

@media (max-width: 640px) {
    .field-input {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .field-label {
        font-size: 14px;
    }
    
    .time-select-trigger {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .time-display {
        font-size: 16px;
    }
    
    .time-option {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .time-options {
        max-height: 180px;
    }
}

.time-select-trigger:focus-visible,
.field-input:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}