/* WA Booking — Google Calendar inspired */
.wb {
    --wb-bg: #ffffff;
    --wb-surface: #f8f9fa;
    --wb-border: #dadce0;
    --wb-border-soft: #e8eaed;
    --wb-muted: #5f6368;
    --wb-muted-soft: #80868b;
    --wb-danger: #d93025;
    --wb-success: #1e8e3e;
    font-family: var(--wb-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    color: var(--wb-text, #202124);
}

.wb *, .wb *::before, .wb *::after { box-sizing: border-box; }

.wb-trigger {
    appearance: none;
    border: 0;
    cursor: pointer;
    background: var(--wb-primary, #1a73e8);
    color: #fff;
    font: 500 14px/1 var(--wb-font, system-ui, sans-serif);
    letter-spacing: 0.1px;
    padding: 12px 22px;
    border-radius: var(--wb-btn-radius, 999px);
    transition: background-color .15s ease, box-shadow .15s ease, transform .12s ease;
    box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}
.wb-trigger:hover { filter: brightness(0.95); box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15); }
.wb-trigger:active { transform: translateY(1px); }

/* Modal */
.wb-modal {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--wb-font);
}
.wb-modal[hidden] { display: none; }
.wb-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(32, 33, 36, 0.6);
    backdrop-filter: blur(2px);
}
.wb-modal__dialog {
    position: relative;
    background: var(--wb-bg);
    border-radius: 16px;
    box-shadow: 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12), 0 11px 15px -7px rgba(0,0,0,.20);
    width: min(880px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    color: var(--wb-text);
}
.wb-modal__close {
    position: absolute; top: 12px; right: 12px;
    width: 36px; height: 36px;
    background: transparent; border: 0; border-radius: 50%;
    cursor: pointer; color: var(--wb-muted);
    display: inline-flex; align-items: center; justify-content: center;
    z-index: 2;
}
.wb-modal__close:hover { background: var(--wb-border-soft); }

.wb-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 520px;
    max-height: calc(100vh - 32px);
}

/* Left info pane */
.wb-info {
    background: var(--wb-surface);
    border-right: 1px solid var(--wb-border-soft);
    padding: 28px 24px;
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.wb-info__avatar {
    width: 48px; height: 48px;
    background: var(--wb-primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 20px;
    margin-bottom: 16px;
}
.wb-info__host {
    margin: 0;
    font-size: 14px; font-weight: 500;
    color: var(--wb-muted);
    letter-spacing: 0.1px;
}
.wb-info__title {
    margin: 4px 0 24px;
    font-size: 22px; font-weight: 400;
    line-height: 1.25;
    color: var(--wb-text);
}
.wb-info__meta {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    gap: 14px;
}
.wb-info__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--wb-text);
}
.wb-info__row svg { color: var(--wb-muted); flex-shrink: 0; margin-top: 2px; }
.wb-info__row-content { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wb-info__row-label { color: var(--wb-muted); font-size: 12px; }

.wb-duration-toggle {
    display: inline-flex;
    border: 1px solid var(--wb-border);
    border-radius: 999px;
    padding: 2px;
    background: #fff;
    width: fit-content;
}
.wb-duration-toggle__btn {
    appearance: none; background: transparent;
    border: 0;
    padding: 6px 12px;
    font: 500 12px var(--wb-font);
    color: var(--wb-muted);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.wb-duration-toggle__btn.is-active {
    background: var(--wb-primary);
    color: #fff;
}

.wb-info__hosttz {
    margin-top: auto;
    padding-top: 20px;
    font-size: 12px;
    color: var(--wb-muted);
    display: flex; flex-direction: column; gap: 2px;
}
.wb-info__hosttz strong { color: var(--wb-text); font-weight: 500; }

/* Main pane */
.wb-main {
    padding: 28px 28px 24px;
    overflow-y: auto;
    display: flex; flex-direction: column;
}
.wb-view { display: flex; flex-direction: column; flex: 1; }
.wb-view[hidden] { display: none; }

/* Calendar */
.wb-cal__header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}
.wb-cal__title {
    margin: 0;
    font-size: 16px; font-weight: 500; letter-spacing: 0.1px;
}
.wb-cal__nav { display: inline-flex; gap: 4px; }
.wb-icon-btn {
    width: 36px; height: 36px;
    border: 0; background: transparent; border-radius: 50%;
    cursor: pointer; color: var(--wb-muted);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .15s;
}
.wb-icon-btn:hover:not(:disabled) { background: var(--wb-border-soft); color: var(--wb-text); }
.wb-icon-btn:disabled { opacity: .4; cursor: not-allowed; }

.wb-cal__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--wb-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.wb-cal__weekdays span { padding: 6px 0; }

.wb-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.wb-day {
    appearance: none;
    background: transparent;
    border: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    font: 500 14px var(--wb-font);
    color: var(--wb-text);
    cursor: pointer;
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .15s, color .15s, transform .12s;
}
.wb-day:hover:not(:disabled):not(.is-empty) { background: var(--wb-primary-12, rgba(26,115,232,.12)); }
.wb-day.is-outside { color: var(--wb-muted-soft); cursor: default; }
.wb-day.is-outside:hover { background: transparent; }
.wb-day.is-disabled,
.wb-day:disabled {
    color: var(--wb-muted-soft);
    cursor: not-allowed;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}
.wb-day.is-today { box-shadow: inset 0 0 0 1px var(--wb-primary); color: var(--wb-primary); }
.wb-day.is-available { color: var(--wb-primary); font-weight: 600; }
.wb-day.is-available::after {
    content: ""; position: absolute; bottom: 6px; left: 50%;
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--wb-primary);
    transform: translateX(-50%);
}
.wb-day.is-selected,
.wb-day.is-selected:hover {
    background: var(--wb-primary);
    color: #fff;
    box-shadow: none;
}
.wb-day.is-selected::after { background: #fff; }

.wb-cal__hint {
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--wb-muted);
    text-align: center;
}
.wb-cal__hint.is-empty { color: var(--wb-muted); }

/* Times */
.wb-times__header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px;
}
.wb-back {
    width: 36px; height: 36px;
    background: transparent; border: 0; border-radius: 50%;
    cursor: pointer; color: var(--wb-muted);
    display: inline-flex; align-items: center; justify-content: center;
}
.wb-back:hover { background: var(--wb-border-soft); }
.wb-times__title { margin: 0; font-size: 15px; font-weight: 500; }
.wb-times__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow-y: auto;
    max-height: 360px;
    padding-right: 4px;
}
.wb-time {
    appearance: none;
    background: #fff;
    border: 1px solid var(--wb-primary);
    color: var(--wb-primary);
    border-radius: var(--wb-btn-radius, 999px);
    padding: 12px 16px;
    font: 500 14px var(--wb-font);
    cursor: pointer;
    transition: background-color .15s, color .15s;
    text-align: center;
}
.wb-time:hover {
    background: var(--wb-primary);
    color: #fff;
}
.wb-times__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--wb-muted);
    padding: 24px 0;
    font-size: 14px;
}

/* Form */
.wb-form__summary {
    background: var(--wb-primary-08, rgba(26,115,232,.08));
    color: var(--wb-text);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.wb-form__summary strong { display: block; font-weight: 500; margin-bottom: 4px; color: var(--wb-text); }
.wb-form__summary span { color: var(--wb-muted); font-size: 13px; }

.wb-form { display: flex; flex-direction: column; gap: 14px; }
.wb-field { display: flex; flex-direction: column; gap: 6px; }
.wb-field__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--wb-muted);
}
.wb-field__label em {
    color: var(--wb-danger);
    font-style: normal;
    margin-left: 2px;
}
.wb-field input,
.wb-field textarea {
    width: 100%;
    background: #fff;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    padding: 10px 12px;
    font: 400 14px var(--wb-font);
    color: var(--wb-text);
    transition: border-color .15s, box-shadow .15s;
}
.wb-field input:hover,
.wb-field textarea:hover { border-color: var(--wb-muted-soft); }
.wb-field input:focus,
.wb-field textarea:focus {
    outline: 0;
    border-color: var(--wb-primary);
    box-shadow: 0 0 0 1px var(--wb-primary);
}
.wb-field textarea { resize: vertical; min-height: 70px; }

.wb-form__error {
    background: rgba(217,48,37,.08);
    color: var(--wb-danger);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}
.wb-form__actions {
    display: flex; justify-content: flex-end;
    margin-top: 8px;
}
.wb-primary-btn {
    appearance: none;
    background: var(--wb-primary);
    color: #fff;
    border: 0;
    padding: 10px 24px;
    border-radius: var(--wb-btn-radius, 999px);
    font: 500 14px var(--wb-font);
    cursor: pointer;
    transition: filter .15s, box-shadow .15s;
}
.wb-primary-btn:hover { filter: brightness(.95); box-shadow: 0 1px 3px rgba(60,64,67,.3); }
.wb-primary-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Success */
.wb-success {
    text-align: center;
    padding: 32px 12px;
    display: flex; flex-direction: column; align-items: center;
    gap: 12px;
}
.wb-success__check {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--wb-success);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.wb-success__title { margin: 0; font-size: 20px; font-weight: 500; }
.wb-success__msg { margin: 0; color: var(--wb-muted); max-width: 360px; font-size: 14px; line-height: 1.5; }
.wb-success__meet { margin: 0; }
.wb-link { color: var(--wb-primary); text-decoration: none; font-weight: 500; }
.wb-link:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 720px) {
    .wb-layout {
        grid-template-columns: 1fr;
        max-height: calc(100vh - 16px);
    }
    .wb-info {
        border-right: 0;
        border-bottom: 1px solid var(--wb-border-soft);
        padding: 24px 20px 18px;
    }
    .wb-info__title { font-size: 18px; margin-bottom: 16px; }
    .wb-info__hosttz { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--wb-border-soft); }
    .wb-main { padding: 20px; }
    .wb-times__list { grid-template-columns: 1fr; max-height: none; }
    .wb-modal__dialog { width: calc(100vw - 16px); border-radius: 12px; }
}
