/**
 * Shared hour-picker styles for home, vehicle list, and vehicle detail search forms.
 * Selected state uses theme preset variables (--orange-500), not hardcoded orange.
 */

.vehicle-datetime-picker {
    width: auto !important;
    max-width: none !important;
}

.vehicle-datetime-picker-body {
    display: flex;
    align-items: stretch;
}

.vehicle-hour-panel {
    border-left: 1px solid #e5e7eb;
    padding: 12px;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dark .vehicle-hour-panel {
    border-left-color: #4b5563;
}

.vehicle-hour-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.vehicle-hour-btn {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 8px 6px;
    line-height: 1;
    transition: all 0.15s ease;
}

.dark .vehicle-hour-btn {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.vehicle-hour-btn--available {
    border-color: #22c55e;
    color: #15803d;
    background: #f0fdf4;
}

.vehicle-hour-btn--available:hover {
    background: #dcfce7;
}

.vehicle-hour-btn--selected {
    border-color: var(--orange-500);
    background: var(--orange-500);
    color: #fff;
}

.vehicle-hour-btn--occupied {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
    opacity: 0.85;
    cursor: not-allowed;
}

.vehicle-hour-btn--disabled {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.75;
}

.vehicle-hour-legend {
    display: grid;
    gap: 6px;
    margin-top: auto;
    font-size: 0.6875rem;
    color: #6b7280;
}

.vehicle-hour-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vehicle-hour-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    flex-shrink: 0;
}

.vehicle-hour-legend-dot--past,
.vehicle-hour-legend-dot--disabled {
    background: #d1d5db;
}

.vehicle-hour-legend-dot--occupied {
    background: #fb7185;
}

.vehicle-hour-legend-dot--available {
    background: #22c55e;
}

.vehicle-hour-legend-dot--selected {
    background: var(--orange-500);
}

.vehicle-datetime-picker .flatpickr-time {
    display: none !important;
}
