/* WEDOS Booking - Public booking page styles
 * Vanilla CSS, no preprocessor. Bootstrap 5.3 included for resets and grid only.
 * Color palette aligned with WEDOS brand.
 */

:root {
    --wb-bg: #f5f6f8;
    --wb-surface: #ffffff;
    --wb-surface-2: #f8f9fb;
    --wb-text: #1a1d23;
    --wb-text-secondary: #5b6168;
    --wb-text-tertiary: #8a9097;
    --wb-border: rgba(0, 0, 0, 0.1);
    --wb-border-strong: rgba(0, 0, 0, 0.18);
    --wb-info: #185fa5;
    --wb-info-bg: #e6f1fb;
    --wb-info-border: rgba(24, 95, 165, 0.25);
    --wb-success: #0f6e56;
    --wb-success-bg: #e1f5ee;
    --wb-danger: #a32d2d;
    --wb-radius-sm: 6px;
    --wb-radius-md: 8px;
    --wb-radius-lg: 12px;
    --wb-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--wb-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wb-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.booking-app {
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.booking-container {
    width: 100%;
    max-width: 720px;
    background: var(--wb-surface);
    border: 1px solid var(--wb-border);
    border-radius: var(--wb-radius-lg);
    padding: 28px;
    box-shadow: var(--wb-shadow-card);
}

/* ============ Header ============ */

.booking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--wb-border);
}

.host-info { display: flex; align-items: center; gap: 14px; }

.host-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--wb-info-bg);
    color: var(--wb-info);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
}

.host-name {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: var(--wb-text);
}

.host-role {
    font-size: 13px;
    color: var(--wb-text-secondary);
    margin: 2px 0 0;
}

.tz-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wb-surface-2);
    border: 1px solid var(--wb-border);
    border-radius: var(--wb-radius-md);
    padding: 7px 12px;
    font-size: 12px;
    color: var(--wb-text-secondary);
    white-space: nowrap;
}

.tz-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wb-success);
    box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.15);
}

.tz-strip {
    background: var(--wb-info-bg);
    border: 1px solid var(--wb-info-border);
    border-radius: var(--wb-radius-md);
    padding: 10px 14px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--wb-info);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.tz-offset { font-size: 11px; opacity: 0.85; }

/* ============ Steps ============ */

.step-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--wb-text);
}

.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.step-actions .btn-link { margin-right: auto; }
.step-actions .btn-primary { margin-left: auto; }

/* ============ Meeting type cards ============ */

.meeting-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.mt-card {
    background: var(--wb-surface-2);
    border: 1px solid var(--wb-border);
    border-radius: var(--wb-radius-md);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.mt-card:hover {
    border-color: var(--wb-border-strong);
    background: var(--wb-surface);
}

.mt-card.selected {
    border: 2px solid var(--wb-info);
    padding: 13px 15px;
    background: var(--wb-surface);
}

.mt-duration {
    font-size: 12px;
    color: var(--wb-text-secondary);
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}

.mt-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
}

.mt-desc {
    font-size: 12px;
    color: var(--wb-text-tertiary);
    margin: 0;
}

/* ============ Calendar ============ */

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 28px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.calendar-nav { display: flex; gap: 4px; }

.calendar-nav button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--wb-border);
    background: var(--wb-surface);
    border-radius: var(--wb-radius-sm);
    cursor: pointer;
    font-size: 16px;
    color: var(--wb-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

.calendar-nav button:hover {
    border-color: var(--wb-border-strong);
    background: var(--wb-surface-2);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-dow {
    font-size: 11px;
    color: var(--wb-text-tertiary);
    text-align: center;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.cal-day {
    aspect-ratio: 1;
    border: none;
    background: transparent;
    border-radius: var(--wb-radius-sm);
    font-size: 13px;
    cursor: pointer;
    color: var(--wb-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    font-family: inherit;
    padding: 0;
}

.cal-day:hover:not(:disabled) { background: var(--wb-surface-2); }

.cal-day:disabled {
    color: var(--wb-text-tertiary);
    cursor: not-allowed;
    opacity: 0.45;
}

.cal-day.has-slots {
    font-weight: 600;
    color: var(--wb-info);
    background: var(--wb-info-bg);
}

.cal-day.has-slots:hover { filter: brightness(0.96); }

.cal-day.selected {
    background: var(--wb-info);
    color: #fff;
    font-weight: 600;
}

.cal-day.today {
    box-shadow: inset 0 0 0 1.5px var(--wb-border-strong);
}

.cal-day-spacer { aspect-ratio: 1; }

/* ============ Slots ============ */

.slots-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
}

.slots-tz {
    font-size: 11px;
    color: var(--wb-text-tertiary);
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.slots-empty {
    font-size: 13px;
    color: var(--wb-text-secondary);
    padding: 16px 0;
    margin: 0;
}

.slots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.slot-btn {
    padding: 9px 8px;
    font-size: 13px;
    background: var(--wb-surface);
    border: 1px solid var(--wb-border);
    border-radius: var(--wb-radius-sm);
    cursor: pointer;
    color: var(--wb-text);
    transition: all 0.12s ease;
    font-family: inherit;
    font-weight: 500;
}

.slot-btn:hover {
    border-color: var(--wb-info);
    color: var(--wb-info);
}

.slot-btn.confirm {
    background: var(--wb-info);
    color: #fff;
    border-color: var(--wb-info);
    margin-top: 4px;
    grid-column: span 2;
    font-weight: 600;
}

/* ============ Form ============ */

.summary-box {
    background: var(--wb-surface-2);
    border-radius: var(--wb-radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    gap: 16px;
}

.summary-row span:first-child { color: var(--wb-text-secondary); }
.summary-row span:last-child { font-weight: 500; text-align: right; }
.tz-note {
    font-size: 11px;
    color: var(--wb-text-tertiary);
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-row { margin-bottom: 14px; }

.form-row label {
    display: block;
    font-size: 13px;
    color: var(--wb-text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.required { color: var(--wb-danger); }

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--wb-border);
    border-radius: var(--wb-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--wb-text);
    background: var(--wb-surface);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--wb-info);
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.15);
}

.form-row textarea { resize: vertical; min-height: 80px; }

.form-error {
    background: #fcebeb;
    border: 1px solid #f0b8b8;
    color: var(--wb-danger);
    padding: 10px 12px;
    border-radius: var(--wb-radius-sm);
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Field-level validation */
.form-row input.field-invalid,
.form-row textarea.field-invalid {
    border-color: var(--wb-danger);
    box-shadow: 0 0 0 3px rgba(163, 45, 45, 0.12);
}

.form-row input.field-invalid:focus,
.form-row textarea.field-invalid:focus {
    border-color: var(--wb-danger);
    box-shadow: 0 0 0 3px rgba(163, 45, 45, 0.2);
}

.field-error {
    color: var(--wb-danger);
    font-size: 12px;
    margin-top: 5px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.field-error::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: var(--wb-danger);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ============ Buttons ============ */

.btn-primary {
    background: var(--wb-info);
    color: #fff;
    border: 1px solid var(--wb-info);
    padding: 10px 22px;
    border-radius: var(--wb-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.12s ease, transform 0.05s ease;
    font-family: inherit;
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.05); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-link {
    background: transparent;
    border: none;
    color: var(--wb-text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 0;
    font-family: inherit;
    font-weight: 500;
}

.btn-link:hover { color: var(--wb-text); }

/* ============ Success state ============ */

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--wb-success-bg);
    color: var(--wb-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto 16px;
    font-size: 24px;
}

.success-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
}

.success-sub {
    text-align: center;
    font-size: 13px;
    color: var(--wb-text-secondary);
    margin: 0 0 22px;
}

.manage-note {
    font-size: 12px;
    color: var(--wb-text-tertiary);
    text-align: center;
    margin: 0;
}

/* ============ Add-to-calendar (success screen) ============ */

.add-to-cal-box {
    background: var(--wb-surface-2);
    border-radius: var(--wb-radius-md);
    padding: 16px 18px;
    margin: 18px 0;
}

.add-to-cal-label {
    font-size: 12px;
    color: var(--wb-text-secondary);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.add-to-cal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cal-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    background: var(--wb-surface);
    border: 1px solid var(--wb-border);
    border-radius: var(--wb-radius-sm);
    color: var(--wb-info);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.12s ease;
}

.cal-btn:hover {
    border-color: var(--wb-info);
    background: var(--wb-info-bg);
    color: var(--wb-info);
}

.cal-btn i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

/* ============ Step indicator ============ */

.step-indicator {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--wb-border);
}

.step-indicator .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wb-border);
    transition: background 0.2s ease;
}

.step-indicator .dot.active { background: var(--wb-info); }

/* ============ Private mode (invitation-only landing) ============ */

.private-mode {
    text-align: center;
    padding: 24px 8px 8px;
}

.private-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--wb-info-bg);
    color: var(--wb-info);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 26px;
}

.private-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--wb-text);
}

.private-text {
    font-size: 14px;
    color: var(--wb-text-secondary);
    line-height: 1.55;
    margin: 0 auto 12px;
    max-width: 420px;
}

.private-email {
    color: var(--wb-info);
    text-decoration: none;
    font-weight: 500;
}

.private-email:hover {
    text-decoration: underline;
}

/* ============ Footer ============ */

.booking-footer {
    margin-top: 16px;
    font-size: 12px;
    color: var(--wb-text-tertiary);
    text-align: center;
}

/* ============ Responsive ============ */

@media (max-width: 600px) {
    .booking-container { padding: 18px; }
    .booking-header { flex-wrap: wrap; }
    .calendar-layout { grid-template-columns: 1fr; gap: 24px; }
    .meeting-types { grid-template-columns: 1fr; }
}
