/* =========================================================================
   Bookings Component — shared/css/components/bookings.css
   Extracted from app/appointments.html page-local styles.
   Used by EchoBookings component in both client and admin contexts.
   ========================================================================= */

/* =========================================================================
   Booking Method Selector — side-by-side cards
   ========================================================================= */
.bm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--v2-space-4);
}
.bm-card {
    position: relative;
    background: var(--v2-bg-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-xl);
    padding: var(--v2-space-6);
    cursor: pointer;
    transition: all var(--v2-duration-fast) var(--v2-ease-out);
    display: flex;
    flex-direction: column;
    gap: var(--v2-space-4);
    min-height: 240px;
}
.bm-card:hover { border-color: var(--v2-border-hover); }
.bm-card.is-active {
    border-color: var(--v2-accent);
    background: linear-gradient(180deg, var(--v2-accent-subtle) 0%, var(--v2-bg-surface) 60%);
    box-shadow: 0 0 0 1px var(--v2-accent), var(--v2-shadow-md);
    cursor: default;
}
.bm-card.is-inactive { opacity: 0.7; }
.bm-card.is-inactive:hover { opacity: 0.9; }
.bm-card.is-blocked {
    border-color: var(--v2-warning-border);
    background: linear-gradient(180deg, var(--v2-warning-bg) 0%, var(--v2-bg-surface) 68%);
}
.bm-card.is-blocked.is-inactive { opacity: 1; }

.bm-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--v2-space-3);
}
.bm-card-head-left {
    display: flex;
    align-items: center;
    gap: var(--v2-space-3);
    min-width: 0;
}
.bm-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--v2-radius-md);
    background: var(--v2-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.bm-card-icon img { width: 22px; height: 22px; }
.bm-card.is-active .bm-card-icon { background: var(--v2-accent-subtle); }

.bm-card-title {
    font-size: var(--v2-text-base);
    font-weight: 600;
    color: var(--v2-fg);
}

.bm-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--v2-border-strong);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--v2-duration-fast) var(--v2-ease-out);
}
.bm-card.is-active .bm-radio {
    border-color: var(--v2-accent);
    background: var(--v2-accent);
}
.bm-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: opacity var(--v2-duration-fast);
}
.bm-card.is-active .bm-radio::after { opacity: 1; }

.bm-card-desc {
    font-size: var(--v2-text-sm);
    color: var(--v2-fg-muted);
    line-height: var(--v2-leading-normal);
    flex: 1;
}

.bm-card-meta {
    display: flex;
    align-items: center;
    gap: var(--v2-space-2);
    flex-wrap: wrap;
}
.bm-card-meta-text {
    font-size: var(--v2-text-xs);
    color: var(--v2-fg-subtle);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bm-card-meta-text.is-empty { font-style: italic; }

.bm-provider-detail {
    font-size: var(--v2-text-xs);
    color: var(--v2-fg-muted);
    line-height: var(--v2-leading-normal);
    padding: var(--v2-space-2) var(--v2-space-3);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-md);
    background: var(--v2-bg-elevated);
}
.bm-card.is-blocked .bm-provider-detail {
    border-color: var(--v2-warning-border);
    background: var(--v2-warning-bg);
    color: var(--v2-warning-text);
}

.bm-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--v2-space-2);
    padding-top: var(--v2-space-3);
    border-top: 1px solid var(--v2-border);
    margin-top: auto;
}
.bm-card.is-active .bm-card-foot { border-top-color: var(--v2-border-accent); }
.bm-card-foot-text {
    font-size: var(--v2-text-xs);
    color: var(--v2-fg-subtle);
}

.bm-hint {
    font-size: var(--v2-text-sm);
    color: var(--v2-fg-muted);
    margin-bottom: var(--v2-space-3);
    padding: var(--v2-space-2) var(--v2-space-3);
    background: var(--v2-accent-subtle);
    border: 1px solid var(--v2-border-accent);
    border-radius: var(--v2-radius-md);
}

@media (max-width: 720px) {
    .bm-grid { grid-template-columns: 1fr; }
}

/* Service Types section subtitle (only shown when calendar is the method) */
.svc-section-sub {
    font-size: var(--v2-text-xs);
    font-weight: 500;
    color: var(--v2-fg-subtle);
    margin-top: 2px;
}


/* Service type list items */
.svc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 12px;
}
.svc-item + .svc-item { border-top: 1px solid var(--v2-border); }
.svc-content { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.svc-name {
    font-size: var(--v2-text-sm);
    font-weight: 600;
    color: var(--v2-fg);
    line-height: var(--v2-leading-tight);
}
.svc-duration {
    display: inline-flex;
    align-items: center;
    font-size: var(--v2-text-xs);
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--v2-bg-elevated);
    color: var(--v2-fg-muted);
    border: 1px solid var(--v2-border);
}
.svc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.svc-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--v2-radius-sm);
    border: none;
    background: transparent;
    color: var(--v2-fg-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.svc-action-btn:hover { background: var(--v2-surface-hover); color: var(--v2-fg); }
.svc-action-btn.delete:hover { color: var(--v2-error); }
.svc-disabled { opacity: 0.5; }

/* Badge variant for "Smart" label */
.v2-badge-info {
    background: var(--v2-info-bg);
    color: var(--v2-info-text);
}

/* Suggestion chips in modal */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--v2-radius-full);
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-elevated);
    color: var(--v2-fg);
    font-size: var(--v2-text-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggestion-chip:hover {
    border-color: var(--v2-accent);
    background: var(--v2-accent-subtle);
}
.suggestion-chip.selected {
    border-color: var(--v2-accent);
    background: var(--v2-accent-subtle);
    color: var(--v2-accent);
}
.suggestion-chip.disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}
.chip-duration {
    font-size: var(--v2-text-xs);
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 99px;
    background: var(--v2-surface);
    color: var(--v2-fg-muted);
    border: 1px solid var(--v2-border);
}
.suggestion-chip.selected .chip-duration {
    background: var(--v2-accent-subtle);
    border-color: var(--v2-accent);
    color: var(--v2-accent);
}
.suggestion-chip.disabled .chip-duration {
    background: transparent;
}
.selected-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Show all toggle — collapses chips on mobile to keep custom input visible */
.suggestion-show-toggle {
    display: none;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px 2px;
    color: var(--v2-accent);
    font-size: var(--v2-text-sm);
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
}
.suggestion-show-toggle:hover .suggestion-toggle-label { text-decoration: underline; }
.suggestion-show-toggle .suggestion-toggle-caret { font-size: 10px; line-height: 1; }
@media (max-width: 768px) {
    .suggestion-chips.collapsed > .suggestion-chip:nth-child(n+7) { display: none; }
    .suggestion-show-toggle.has-overflow { display: inline-flex; }
}
