/* booking-widget.css — right-side booking panel */

body.tw-lock {
    overflow: hidden;
}

.tw-root {
    --tw-green: #4caf50;
    --tw-green-dark: #43a047;
    --tw-ink: #171717;
    --tw-muted: #7a7a7a;
    --tw-line: #ececec;
    --tw-bg: #f6f6f7;
    --tw-card: #ffffff;
    font-family: Manrope, system-ui, sans-serif;
    position: fixed;
    z-index: 10050;
    pointer-events: none;
    inset: 0;
}

.tw-fab {
    pointer-events: auto;
    position: fixed;
    right: 16px;
    bottom: 88px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: var(--tw-green);
    color: #fff;
    box-shadow: 0 10px 24px rgba(76, 175, 80, 0.35);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}
.tw-fab.is-on {
    display: inline-flex;
}
.tw-fab:hover {
    background: var(--tw-green-dark);
}
.tw-fab svg {
    width: 26px;
    height: 26px;
}

.tw-root.is-open {
    pointer-events: auto;
    background: rgba(17, 17, 17, 0.42);
}

.tw-panel {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--tw-bg);
    color: var(--tw-ink);
    overflow: hidden;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s;
}
.tw-panel.is-on {
    transform: translateX(0);
    visibility: visible;
}

.tw-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    background: var(--tw-card);
    border-bottom: 1px solid var(--tw-line);
    flex-shrink: 0;
}
.tw-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}
.tw-brand-meta {
    min-width: 0;
    flex: 1;
    line-height: 1.25;
}
.tw-brand-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.tw-brand-addr {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--tw-muted);
}

.tw-h {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 10px;
    letter-spacing: -0.03em;
}
.tw-lead {
    margin: 0 0 18px;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.tw-back,
.tw-x {
    border: 0;
    background: transparent;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
    color: #6b6b6b;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tw-back:hover,
.tw-x:hover {
    background: #f3f3f3;
    color: var(--tw-ink);
}

.tw-scroll {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.tw-body {
    padding: 20px 18px 28px;
}

.tw-p {
    margin: 0 0 14px;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
}
.tw-hint {
    margin: 8px 0 0;
    color: var(--tw-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}
.tw-err {
    color: #c62828;
    font-size: 0.8125rem;
    margin: 0 0 10px;
}

.tw-field {
    width: 100%;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 1.05rem;
    color: var(--tw-ink);
    background: var(--tw-card);
    box-sizing: border-box;
}
.tw-field:focus {
    outline: 2px solid rgba(76, 175, 80, 0.35);
    border-color: var(--tw-green);
}
.tw-code {
    letter-spacing: 0.4em;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
}
.tw-link {
    color: var(--tw-green);
    text-decoration: underline;
    font-weight: 600;
}
.tw-help {
    margin-top: 18px;
}

.tw-lbl {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--tw-muted);
    margin: 0 0 6px;
}

.tw-sec {
    margin: 22px 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.tw-foot {
    flex-shrink: 0;
    background: var(--tw-card);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
}
.tw-foot-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tw-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 1.05rem;
    font-weight: 800;
}
.tw-btn-block {
    width: 100%;
}

.tw-btn {
    border: 0;
    border-radius: 12px;
    padding: 0.95rem 1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.tw-btn-primary {
    background: var(--tw-green);
    color: #fff;
}
.tw-btn-primary:hover {
    background: var(--tw-green-dark);
}
.tw-btn-primary:disabled {
    opacity: 0.45;
    cursor: default;
}
.tw-btn-primary:disabled.is-wait {
    opacity: 1;
}
.tw-btn.is-wait {
    position: relative;
    overflow: hidden;
    pointer-events: none;
}
.tw-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 42%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: tw-bar 1.1s ease-in-out infinite;
    pointer-events: none;
}
@keyframes tw-bar {
    from { transform: translateX(-120%); }
    to { transform: translateX(280%); }
}
.tw-btn-ghost {
    background: #eeeeee;
    color: #333;
}
.tw-btn-ghost:hover {
    background: #e4e4e4;
}
.tw-text-btn {
    border: 0;
    background: transparent;
    color: #5f5f5f;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 8px 8px;
    text-align: center;
}
.tw-text-btn:hover {
    color: var(--tw-ink);
}
.tw-text-btn-sm {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0 8px 4px;
}
.tw-reset {
    margin-top: 4px;
    text-align: center;
}
.tw-reset-note {
    margin: 0 0 4px;
    color: var(--tw-muted);
    font-size: 0.75rem;
    line-height: 1.35;
    text-align: center;
}
.tw-legal {
    margin: 2px 4px 0;
    color: var(--tw-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: center;
}
.tw-legal .tw-link {
    font-weight: 600;
}
.tw-remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 0;
    color: var(--tw-muted);
    font-size: 0.75rem;
    line-height: 1.3;
    cursor: pointer;
    user-select: none;
}
.tw-remember input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--tw-green);
    flex-shrink: 0;
}

.tw-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.tw-row > * {
    flex: 1;
}

.tw-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tw-card,
.tw-svc {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
    border: 2px solid transparent;
    background: var(--tw-card);
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.tw-card:hover,
.tw-svc:hover {
    border-color: #e8e8e8;
}
.tw-card.is-on,
.tw-svc.is-on {
    border-color: var(--tw-green);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.35);
}
.tw-card.is-on:hover,
.tw-svc.is-on:hover {
    border-color: var(--tw-green);
}

.tw-svc {
    cursor: default;
}
.tw-svc[data-act] {
    cursor: pointer;
}
.tw-chk {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid #cfcfcf;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    position: relative;
    pointer-events: none;
    box-sizing: border-box;
}
.tw-chk:checked {
    border-color: var(--tw-green);
    background: var(--tw-green);
}
.tw-chk:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.tw-svc.is-off {
    background: #efefef;
    box-shadow: none;
    color: #9a9a9a;
}
.tw-svc.is-off .tw-opt-name,
.tw-svc.is-off .tw-opt-meta {
    color: #9a9a9a;
}
.tw-svc.is-off .tw-pic,
.tw-svc.is-off .tw-pic-ph {
    filter: grayscale(1);
    opacity: 0.45;
}


.tw-pic,
.tw-pic-ph {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    flex-shrink: 0;
    object-fit: cover;
    background: #ececec;
}
.tw-pic-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8a8a8a;
}
.tw-pic-ph svg {
    width: 28px;
    height: 28px;
}

.tw-ava,
.tw-ava-ph {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: #ececec;
}
.tw-ava-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7a7a7a;
    font-weight: 700;
    font-size: 0.85rem;
}
.tw-ava-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #e9e9e9;
    color: #6f6f6f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tw-ava-icon svg {
    width: 22px;
    height: 22px;
}

.tw-card-txt {
    min-width: 0;
    flex: 1;
}
.tw-opt-name {
    display: block;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
}
.tw-opt-meta {
    display: block;
    color: var(--tw-muted);
    font-size: 0.8rem;
    margin-top: 3px;
    line-height: 1.35;
}

.tw-master {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 8px;
}
.tw-master-name {
    font-weight: 700;
    font-size: 1.02rem;
}

.tw-days-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 8px 0 16px;
}
.tw-days {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
}
.tw-days::-webkit-scrollbar {
    display: none;
}
.tw-days-nav {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    background: var(--tw-card);
    color: #555;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.tw-days-nav:hover {
    color: var(--tw-ink);
}
.tw-day {
    border: 1px solid var(--tw-line);
    background: var(--tw-card);
    border-radius: 12px;
    padding: 8px 2px;
    font: inherit;
    cursor: pointer;
    text-align: center;
    width: 52px;
    min-width: 52px;
    flex-shrink: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
}
.tw-day small {
    display: block;
    color: var(--tw-muted);
    font-size: 0.65rem;
}
.tw-day strong {
    font-size: 0.9rem;
}
.tw-day em {
    display: block;
    font-style: normal;
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--tw-muted);
    margin-top: 1px;
}
.tw-day.is-on {
    background: var(--tw-green);
    border-color: var(--tw-green);
    color: #fff;
}
.tw-day.is-on small,
.tw-day.is-on em {
    color: rgba(255, 255, 255, 0.85);
}
.tw-day:disabled {
    opacity: 0.35;
    cursor: default;
}

.tw-times {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tw-time {
    border: 1px solid var(--tw-line);
    background: var(--tw-card);
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.tw-time.is-on,
.tw-time:hover {
    background: var(--tw-green);
    border-color: var(--tw-green);
    color: #fff;
}

.tw-ok-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.18);
    color: var(--tw-green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tw-ok-icon svg {
    width: 22px;
    height: 22px;
}
.tw-body-done {
    padding-top: 16px;
}
.tw-done-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    padding: 14px 14px 15px;
    border-radius: 16px;
    background: #eef8ee;
    margin: 0 0 14px;
}
.tw-done-banner .tw-h {
    font-size: 1.15rem;
    margin: 0 0 4px;
}
.tw-done-banner .tw-p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #4a4a4a;
}
.tw-btn-tg {
    background: #229ED9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-sizing: border-box;
    margin: 0 0 20px;
}
.tw-btn-tg:hover {
    background: #1b8ec4;
    color: #fff;
}
.tw-done-visit {
    border-top: 1px solid var(--tw-line);
    padding-top: 14px;
}
.tw-done-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tw-muted);
    margin: 0 0 8px;
}
.tw-done-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}
.tw-done-row b {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    line-height: 1.3;
}
.tw-done-row > div span {
    display: block;
    color: var(--tw-muted);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
}
.tw-done-row > div b + span,
.tw-done-row > div span + b {
    margin-top: 1px;
}
.tw-done-row .tw-done-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f3f3f3;
    color: #6a6a6a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    line-height: 0;
}
.tw-done-ico svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}
.tw-done-ico-pic img,
.tw-done-ico-ava img,
.tw-done-ico-ava .tw-ava,
.tw-done-ico-ava .tw-ava-ph {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
}
.tw-done-ico-ava {
    background: transparent;
    padding: 0;
}
.tw-done-ico-ava .tw-ava-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    line-height: 1;
}

@media (min-width: 640px) {
    .tw-panel {
        width: 420px;
        max-width: 100%;
        box-shadow: -16px 0 48px rgba(0, 0, 0, 0.22);
    }
    .tw-fab {
        bottom: 24px;
        right: 24px;
    }
}
