/* ===== BOOKING VIEW MODAL ===== */
.booking-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 768px) {
    .booking-view-overlay {
        align-items: center;
    }
}

.booking-view {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@media (min-width: 768px) {
    .booking-view {
        border-radius: 20px;
        max-height: 80vh;
    }
}

.booking-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.booking-view-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.booking-view-header button {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.booking-view-header button:hover {
    background: #f5f5f5;
}

.booking-view-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}

.booking-view-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

/* Секции */
.bv-section {
    margin-bottom: 20px;
}

.bv-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bv-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* Клиент */
.bv-client-section {
    background: #f9f9f9;
    border-radius: 14px;
    padding: 14px;
}

.bv-client-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bv-client-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fdf2f5;
    color: #dd1847;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bv-client-info {
    flex: 1;
    min-width: 0;
}

.bv-client-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.bv-client-phone {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.bv-client-menu {
    position: relative;
    cursor: pointer;
    padding: 4px;
}

.bv-client-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 150px;
    z-index: 10;
    overflow: hidden;
}

.bv-client-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.15s;
}

.bv-client-dropdown-item:hover {
    background: #f5f5f5;
}

/* Статусы */
.bv-status-buttons {
    margin-top: 12px;
}

.bv-status-row {
    display: flex;
    gap: 6px;
}

.bv-status-btn {
    flex: 1;
    padding: 8px 6px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f5f5f5;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    color: #1a1a1a;
    font-family: inherit;
    transition: all 0.15s;
}

.bv-confirmed.active { background: #d4edda; border-color: #4CAF50; color: #2e7d32; }
.bv-arrived.active { background: #d4edda; border-color: #4CAF50; color: #2e7d32; }
.bv-no-show.active { background: #fce4e4; border-color: #f44336; color: #c62828; }

/* Сотрудник */
.bv-employee-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.15s;
}

.bv-employee-card:hover {
    border-color: #e0e0e0;
}

.bv-employee-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.bv-employee-card-info {
    flex: 1;
    min-width: 0;
}

.bv-employee-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Время */
.bv-time-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bv-time-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f8f8f8;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.bv-time-item:hover {
    background: #f0f0f0;
}

.bv-time-label {
    font-size: 14px;
    color: #666;
}

.bv-time-value {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

/* Услуги */
.bv-add-service-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fdf2f5;
    border: none;
    border-radius: 8px;
    color: #dd1847;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.bv-add-service-btn:hover {
    background: #fce4ec;
}

.bv-services-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bv-service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8f8f8;
    border-radius: 10px;
    color: #1a1a1a;
}

.bv-service-photo-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.bv-service-photo-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bv-svc-info {
    flex: 1;
    min-width: 0;
}

.bv-svc-name {
    font-weight: 500;
    font-size: 14px;
}
.bv-svc-master { color: #666; font-size: 12px; margin-top: 2px; }
.bv-svc-master-name { font-weight: 500; }

.bv-svc-price {
    color: #888;
    font-size: 12px;
    margin-top: 1px;
}

.bv-service-total {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #dd1847;
    padding: 4px 0;
}

/* Уведомления */
.bv-notify-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: #f8f8f8;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background 0.15s;
}

.bv-notify-row:hover {
    background: #f0f0f0;
}

.bv-notify-row span:first-child {
    flex: 1;
    font-size: 14px;
    color: #666;
}

.bv-notify-value {
    font-size: 14px;
    color: #888;
    margin-right: 8px;
}

/* Цвета */
.bv-section-row {
    display: flex;
    align-items: center;
}

.bv-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.bv-color-squircle {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.bv-color-squircle.active {
    transform: scale(1.15);
    box-shadow: 0 3px 10px currentColor;
}

.bv-color-glare {
    position: absolute;
    top: 0;
    left: 2px;
    right: 2px;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 10px 10px 40% 40%;
    pointer-events: none;
}

.bv-color-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Примечание */
.bv-comment {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    background: #f8f8f8;
    resize: vertical;
    min-height: 70px;
    font-family: inherit;
    box-sizing: border-box;
    color: #1a1a1a;
}

.bv-comment:focus {
    outline: none;
    border-color: #dd1847;
    background: #fff;
}

/* Отменить */
.bv-cancel-btn {
    width: 100%;
    padding: 14px;
    background: #fff;
    border: 1px solid #f44336;
    color: #f44336;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 20px;
    font-family: inherit;
    transition: all 0.15s;
}

.bv-cancel-btn:hover {
    background: #f44336;
    color: #fff;
}

/* Сохранить */
.bv-save-btn {
    width: 100%;
    padding: 16px;
    background: #dd1847;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.bv-save-btn:hover {
    background: #c4153e;
}

/* Под-попапы */
.bv-sub-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1700;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 768px) {
    .bv-sub-overlay {
        align-items: center;
    }
}

.bv-sub-popup {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 768px) {
    .bv-sub-popup {
        border-radius: 20px;
    }
}

.bv-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.bv-sub-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.bv-sub-header button {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bv-sub-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.bv-sub-warning {
    padding: 12px 14px;
    background: #fff9e6;
    border-radius: 10px;
    font-size: 13px;
    color: #8b6914;
    margin-bottom: 16px;
    line-height: 1.4;
}

.bv-sub-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bv-sub-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    border-radius: 10px;
    font-size: 14px;
    transition: background 0.15s;
}

.bv-sub-option:hover {
    background: #f5f5f5;
}

.bv-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.bv-sub-option.selected .bv-radio {
    border-color: #dd1847;
    background: #dd1847;
    box-shadow: inset 0 0 0 4px #fff;
}

/* Перерыв */
.bv-break-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.bv-break-item {
    padding: 12px;
    text-align: center;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.bv-break-item:hover {
    border-color: #e0e0e0;
}

.bv-break-item.selected {
    border-color: #dd1847;
    background: #fdf2f5;
    color: #dd1847;
}

.bv-break-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.bv-break-custom-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bv-break-custom-input input {
    width: 60px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    font-family: inherit;
}

.bv-break-custom button {
    padding: 8px 16px;
    background: #dd1847;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

/* Подтверждение */
.bv-reminder-confirm {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
    font-size: 14px;
    color: #1a1a1a;
}

.consent-modal-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #f0f0f0;
}

.consent-save-btn {
    width: 100%;
    padding: 16px;
    background: #dd1847;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* Тоггл */
.client-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.client-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.client-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 26px;
}

.client-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.client-toggle input:checked + .client-toggle-slider {
    background-color: #dd1847;
}

.client-toggle input:checked + .client-toggle-slider:before {
    transform: translateX(22px);
}

/* Доступность */
@media (prefers-reduced-motion: reduce) {
    .booking-view { animation: none; }
    .bv-sub-popup { animation: none; }
}