/* ===============================================
   СТИЛИ ДЛЯ НОВЫХ КОМПОНЕНТОВ (06.02.2026)
   ClientSearch, TimeSlotPicker, AppointmentForm
   =============================================== */

/* ClientSearch Component */
.client-search-wrapper {
    position: relative;
}

.client-search-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.client-search-input:focus {
    outline: none;
    border-color: #D4AF37;
}

.client-search-results {
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.client-search-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.client-search-item:hover {
    background: #f8f9fa;
}

.selected-client-card {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* TimeSlotPicker Component */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
    clear: both;
    width: 100%;
}

.time-slot-btn {
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: block;
    width: 100%;
}

.time-slot-btn:hover:not(:disabled) {
    border-color: #D4AF37;
    background: #fff9e6;
}

.time-slot-btn.selected {
    border-color: #D4AF37;
    background: #D4AF37;
    color: white;
    font-weight: 600;
}

.time-slot-btn:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

/* AppointmentForm Component */
.appointment-form-wrapper {
    padding: 20px;
}

.form-section {
    margin-bottom: 24px;
    clear: both;
}

.form-section label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-select,
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #D4AF37;
}

.form-textarea {
    resize: vertical;
    font-family: inherit;
    min-height: 80px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.service-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.service-checkbox-label:hover {
    background: #f8f9fa;
}

.service-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Модальное окно отмены записи */
#cancelModal .modal-content {
    max-width: 400px;
}

#cancelReason {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

#cancelReason:focus {
    outline: none;
    border-color: #D4AF37;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
    }
    
    .time-slot-btn {
        padding: 10px 6px;
        font-size: 13px;
    }
    
    .client-search-results {
        max-height: 250px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .appointment-form-wrapper {
        padding: 16px;
    }
}

/* Обеспечение минимальной высоты для touch-устройств */
@media (pointer: coarse) {
    .time-slot-btn,
    .client-search-item,
    .service-checkbox-label,
    .form-actions button {
        min-height: 44px;
    }
}
