/* MyBooking 1 Person – frontend i kalendarz w panelu admina (pastelowy błękit) */
:root, .mb1p-theme-blue {
    --mb-ink: #1f2f40; --mb-muted: #6b7c8f; --mb-line: #dce7f2; --mb-bg: #f5f9fd;
    --mb-accent: #4a90c9; --mb-accent-dark: #3a78ad; --mb-soft: #e8f2fb;
    --mb-free-ink: #2f6393; --mb-free-line: #bcd5ee;
    --mb-pending: #d9dde2; --mb-confirmed: #b3cde6; --mb-confirmed-ink: #34506b;
    --mb-vacation: #ece6f4; --mb-vacation-ink: #5b4a78; --mb-shadow: var(--mb-shadow);
    --mb-ok: #2f7d4f; --mb-err: #b4382f;
}
.mb1p-theme-purple {
    --mb-ink: #2a2340; --mb-muted: #7a7292; --mb-line: #e6dff3; --mb-bg: #f9f7fd;
    --mb-accent: #8b6fc4; --mb-accent-dark: #7357ad; --mb-soft: #f0ebf9;
    --mb-free-ink: #5d479a; --mb-free-line: #d3c7ec;
    --mb-pending: #dcdde2; --mb-confirmed: #cfc0ec; --mb-confirmed-ink: #4b3b78;
    --mb-vacation: #e4ecf1; --mb-vacation-ink: #44596a; --mb-shadow: rgba(139, 111, 196, .12);
}
.mb1p-theme-green {
    --mb-ink: #1f3a2e; --mb-muted: #6a8577; --mb-line: #dcebe3; --mb-bg: #f5fbf8;
    --mb-accent: #52a37d; --mb-accent-dark: #3f8a66; --mb-soft: #e9f6ef;
    --mb-free-ink: #2f7050; --mb-free-line: #bfe0cf;
    --mb-pending: #dde0e0; --mb-confirmed: #b5dcc6; --mb-confirmed-ink: #2f5a45;
    --mb-vacation: #f4ecdc; --mb-vacation-ink: #6e5a2e; --mb-shadow: rgba(82, 163, 125, .12);
}
.mb1p-theme-gray {
    --mb-ink: #2b3138; --mb-muted: #727b86; --mb-line: #e1e5ea; --mb-bg: #f6f7f9;
    --mb-accent: #6b7785; --mb-accent-dark: #525d6b; --mb-soft: #eef0f3;
    --mb-free-ink: #4a5460; --mb-free-line: #cbd1d8;
    --mb-pending: #e8eaed; --mb-confirmed: #b4bdc7; --mb-confirmed-ink: #2f3842;
    --mb-vacation: #efe9e4; --mb-vacation-ink: #6b5a4c; --mb-shadow: rgba(80, 90, 105, .12);
}

.mb1p-wrap {
    max-width: 860px;
    margin: 28px auto;
    padding: 26px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--mb-line);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(74, 144, 201, .10);
    color: var(--mb-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}
.mb1p-wrap *, .mb1p-wrap *::before, .mb1p-wrap *::after { box-sizing: border-box; }
.mb1p-title { margin: 0 0 18px; font-size: 1.45em; line-height: 1.25; color: var(--mb-ink); }
.mb1p-selector { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.mb1p-selector label { font-weight: 600; }
.mb1p-selector select { flex: 1 1 240px; padding: 11px 12px; border: 1px solid var(--mb-line); border-radius: 10px; font-size: 1em; background: var(--mb-bg); color: var(--mb-ink); }
.mb1p-body[hidden], .mb1p-form[hidden] { display: none; }
.mb1p-hint { margin: 0 0 10px; color: var(--mb-muted); font-size: .92em; }

/* legenda */
.mb1p-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; font-size: .82em; color: var(--mb-muted); }
.mb1p-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mb1p-legend .lg { display: inline-block; width: 16px; height: 16px; border: 1px solid var(--mb-line); border-radius: 5px; background: #fff; }
.mb1p-legend .lg-free { border-color: var(--mb-accent); }
.mb1p-legend .lg-pending { background: var(--mb-pending); }
.mb1p-legend .lg-confirmed { background: var(--mb-confirmed); }
.mb1p-legend .lg-vacation { background: var(--mb-vacation); }

/* nawigacja tygodni */
.mb1p-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.mb1p-navlabel { font-weight: 700; }
.mb1p-wrap .mb1p-nav button {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; width: 64px; height: 42px; min-width: 0; max-width: none; margin: 0; padding: 0;
    border: 1px solid var(--mb-line); border-radius: 12px; background: var(--mb-soft); color: var(--mb-accent-dark);
    font-size: 1em; line-height: 1; text-align: center; box-shadow: none; cursor: pointer; transition: background .15s ease;
}
.mb1p-wrap .mb1p-nav button svg { display: block; width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.mb1p-wrap .mb1p-nav button:hover:not(:disabled) { background: var(--mb-confirmed); }
.mb1p-wrap .mb1p-nav button:disabled { opacity: .35; cursor: default; }

/* kalendarz tygodniowy */
.mb1p-cal { transition: opacity .15s ease; }
.mb1p-week { display: none; }
.mb1p-week.is-active { display: block; }
.mb1p-weektitle { font-weight: 700; margin: 14px 0 8px; }
.mb1p-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mb1p-day { background: var(--mb-bg); border: 1px solid var(--mb-line); border-radius: 12px; padding: 8px 6px 10px; min-width: 0; }
.mb1p-day.is-today { box-shadow: inset 0 0 0 2px var(--mb-accent); }
.mb1p-day.is-pastday { opacity: .6; }
.mb1p-dayhead { display: flex; flex-direction: column; align-items: center; margin-bottom: 8px; line-height: 1.2; }
.mb1p-dayhead b { font-size: .9em; }
.mb1p-dayhead span { font-size: .75em; color: var(--mb-muted); }
.mb1p-slots { display: flex; flex-direction: column; gap: 5px; }
.mb1p-slot { display: block; width: 100%; padding: 7px 2px; border-radius: 8px; border: 1px solid var(--mb-line); background: #fff; color: var(--mb-ink); font: inherit; font-size: .85em; text-align: center; }
.mb1p-slot.s-free { border-color: var(--mb-free-line); color: var(--mb-free-ink); font-weight: 600; }
button.mb1p-slot.s-free { cursor: pointer; transition: background .12s ease, border-color .12s ease; }
button.mb1p-slot.s-free:hover { background: var(--mb-soft); border-color: var(--mb-accent); }
.mb1p-slot.is-selected { background: var(--mb-accent) !important; border-color: var(--mb-accent) !important; color: #fff !important; }
.mb1p-slot.s-pending { background: var(--mb-pending); border-color: var(--mb-pending); border-style: dashed; color: #6b7280; cursor: not-allowed; }
.mb1p-slot.s-confirmed { background: var(--mb-confirmed); border-color: var(--mb-confirmed); color: var(--mb-confirmed-ink); cursor: not-allowed; }
.mb1p-slot.s-past { background: transparent; border-color: transparent; color: #a8b4c0; text-decoration: line-through; }
.mb1p-slot.is-past { opacity: .55; }
.mb1p-dayinfo { text-align: center; font-size: .78em; color: var(--mb-muted); padding: 8px 2px; }
.mb1p-dayinfo.is-vacation { background: var(--mb-vacation); border-radius: 8px; color: var(--mb-vacation-ink); }

/* formularz */
.mb1p-form { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--mb-line); }
.mb1p-form h4 { margin: 0 0 12px; font-size: 1.15em; }
.mb1p-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.mb1p-chosen { padding: 14px; margin-bottom: 16px; background: var(--mb-soft); border: 1px solid var(--mb-line); border-radius: 12px; }
.mb1p-k { display: block; font-size: .8em; color: var(--mb-muted); margin-bottom: 2px; }
.mb1p-field { margin-bottom: 14px; }
.mb1p-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.mb1p-field input, .mb1p-field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--mb-line); border-radius: 10px; font-size: 1em; font-family: inherit; background: #fff; color: var(--mb-ink); }
.mb1p-field input:focus, .mb1p-field textarea:focus, .mb1p-selector select:focus { outline: 2px solid var(--mb-accent); outline-offset: 1px; }
.mb1p-wrap .req { color: var(--mb-err); }
.mb1p-rodo { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: .85em; cursor: pointer; }
.mb1p-rodo input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 18px; }
.mb1p-submit { width: 100%; padding: 14px 18px; background: var(--mb-accent); color: #fff; border: 0; border-radius: 10px; font-size: 1em; font-weight: 700; cursor: pointer; transition: background .15s ease; }
.mb1p-submit:hover { background: var(--mb-accent-dark); }
.mb1p-message p { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; }
.mb1p-ok { background: #edf7f0; color: var(--mb-ok); font-weight: 600; }
.mb1p-err { background: #fdf0ee; color: var(--mb-err); font-weight: 600; }
.mb1p-wait { background: var(--mb-bg); color: var(--mb-muted); }
.mb1p-notice { padding: 14px; background: var(--mb-bg); border-radius: 10px; }

@media (max-width: 700px) {
    .mb1p-wrap { padding: 16px; margin: 16px auto; border-radius: 12px; }
    .mb1p-days { grid-template-columns: 1fr; }
    .mb1p-day { display: grid; grid-template-columns: 64px 1fr; align-items: start; gap: 8px; }
    .mb1p-dayhead { margin: 0; padding-top: 4px; }
    .mb1p-slots { flex-direction: row; flex-wrap: wrap; }
    .mb1p-slot { width: auto; min-width: 62px; padding: 8px 10px; }
    .mb1p-dayinfo { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    .mb1p-cal, .mb1p-submit, .mb1p-nav button { transition: none; }
}

/* kalendarz w panelu admina */
.mb1p-admin .mb1p-scroll { max-height: 640px; overflow-y: auto; padding-right: 4px; }
.mb1p-admin .mb1p-days { grid-template-columns: repeat(7, minmax(80px, 1fr)); }
.mb1p-admin .mb1p-slot[data-bids] { cursor: pointer; }
.mb1p-admin .mb1p-slot[data-bids]:hover { border-color: var(--mb-accent); box-shadow: 0 0 0 1px var(--mb-accent); }
