/* v3 booking — desktop wizard layout */
:root {
    --v3-border: #d8dde3;
    --v3-muted: #8a939c;
    --v3-radius: 8px;
    --v3-shell-max: 1080px;
    --v3-sidebar-w: 300px;
}

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

html, body {
    margin: 0;
    padding: 0;
}

body.v3-body {
    background: var(--obg, #f3f5f8);
    color: var(--obtext, #212529);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100dvh;
}

.v3-page {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: 16px;
}

.v3-page > .v3-app {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.v3-app {
    width: 100%;
    max-width: var(--v3-shell-max);
    margin: 0 auto;
}

.v3-shell {
    background: #fff;
    border: 1px solid var(--v3-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

/* ─── Stepper ─── */
.v3-stepper {
    padding: 0;
    border-bottom: 1px solid var(--v3-border);
    background: #fff;
}

.v3-stepper-track {
    display: flex;
    width: 100%;
}

.v3-step {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 12px 20px 12px 16px;
    color: var(--v3-muted);
    background: #fff;
    border-right: 1px solid var(--v3-border);
    transition: background 0.2s, color 0.2s;
}

.v3-step:last-child {
    border-right: none;
}

.v3-step + .v3-step {
    padding-left: 16px;
}

.v3-step-num {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.v3-step-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.v3-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.v3-step-sub {
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v3-step.is-done {
    color: var(--obaccent, #3d6cb9);
}

.v3-step.is-done .v3-step-num {
    font-size: 0;
}

.v3-step.is-done .v3-step-num::before {
    content: '\F26B';
    font-family: 'bootstrap-icons';
    font-size: 1.25rem;
    font-weight: 400;
}

.v3-step.is-active {
    background: var(--obtn, #3d6cb9);
    color: var(--obbtn-text, #fff);
    border-right-color: var(--obtn, #3d6cb9);
    z-index: 2;
}

.v3-step.is-active .v3-step-sub {
    opacity: 0.9;
}

.v3-step.is-upcoming {
    color: #b0b8c0;
}

/* ─── Body layout ─── */
.v3-body-layout {
    display: grid;
    grid-template-columns: 1fr var(--v3-sidebar-w);
    min-height: 480px;
}

.v3-body-layout.is-full,
.v3-body-layout.is-success {
    grid-template-columns: 1fr;
}

.v3-body-layout.is-full {
    display: flex;
    flex-direction: column;
}

.v3-body-layout.is-full .v3-main {
    flex: 1 1 auto;
}

.v3-body-layout.is-full .v3-sidebar {
    display: flex;
    flex-shrink: 0;
    border-left: none;
    border-top: 1px solid var(--v3-border);
    padding: 16px 24px 20px;
    background: #fff;
}

.v3-body-layout.is-full .v3-sidebar-inner {
    display: none;
}

.v3-body-layout.is-full .v3-sidebar .v3-sidebar-btn {
    max-width: 360px;
    margin: 0 auto;
}

.v3-body-layout.is-success .v3-sidebar,
.v3-body-layout.is-contact .v3-sidebar .v3-sidebar-btn {
    display: none;
}

.v3-body-layout.is-contact {
    grid-template-columns: 1fr 340px;
}

.v3-main {
    min-width: 0;
    padding: 20px 24px 28px;
    overflow-y: auto;
    max-height: calc(100dvh - 180px);
}

.v3-main-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 16px;
    min-height: 40px;
}

.v3-main-head.is-hidden {
    display: none;
}

.v3-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--obaccent, #198754);
    font-size: 1.25rem;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.v3-back-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.v3-back-btn.hidden {
    visibility: hidden;
    pointer-events: none;
}

.v3-main-title {
    flex: 1;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.v3-body-layout.is-full .v3-main,
.v3-body-layout.is-success .v3-main {
    max-height: none;
}

.v3-sidebar {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--v3-border);
    background: #fff;
    padding: 20px 18px 18px;
}

.v3-sidebar-inner {
    flex: 1 1 auto;
    min-height: 0;
}

.v3-sidebar-btn {
    flex-shrink: 0;
    width: 100%;
    margin-top: 16px;
    padding: 14px 16px;
    border: none;
    border-radius: var(--v3-radius);
    background: var(--obtn, #3d6cb9);
    color: var(--obbtn-text, #fff);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.15s, filter 0.15s;
}

.v3-sidebar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.v3-sidebar-btn:not(:disabled):hover {
    filter: brightness(0.95);
}

/* ─── Sidebar overview ─── */
.v3-overview-title {
    margin: 0 0 14px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--obaccent, #3d6cb9);
}

.v3-overview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.v3-overview-table th {
    padding: 0 0 8px;
    font-weight: 600;
    color: var(--v3-muted);
    text-align: left;
    border-bottom: 1px solid var(--v3-border);
}

.v3-overview-table th:last-child {
    text-align: right;
}

.v3-overview-table td {
    padding: 10px 0;
    vertical-align: top;
    border-bottom: 1px solid #eef1f4;
}

.v3-overview-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.v3-overview-rm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    border: 1px solid var(--v3-border);
    border-radius: 50%;
    background: #fff;
    color: var(--v3-muted);
    font-size: 0.65rem;
    cursor: pointer;
    vertical-align: middle;
    padding: 0;
}

.v3-overview-rm:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.v3-overview-total td {
    border-bottom: none;
    padding-top: 14px;
    font-weight: 700;
    font-size: 0.9rem;
}

.v3-overview-note {
    margin: 12px 0 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--v3-muted);
}

/* ─── Service cards ─── */
.v3-svc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 18px;
    margin-bottom: 8px;
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.v3-svc-card:hover {
    border-color: var(--obaccent, #3d6cb9);
}

.v3-svc-card.selected {
    border-color: var(--obaccent, #3d6cb9);
    box-shadow: inset 0 0 0 1px var(--obaccent, #3d6cb9);
}

.v3-svc-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v3-svc-card-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--obtext, #212529);
}

.v3-svc-card-desc {
    display: block;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--v3-muted);
}

.v3-svc-card-price {
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--obtext, #212529);
}

.v3-svc-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid var(--obaccent, #3d6cb9);
    border-radius: 50%;
    color: transparent;
    font-size: 1rem;
    transition: background 0.15s, color 0.15s;
}

.v3-svc-card.selected .v3-svc-check {
    background: var(--obaccent, #3d6cb9);
    color: #fff;
}

.v3-category-label {
    margin: 18px 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--v3-muted);
}

.v3-category-label:first-child {
    margin-top: 0;
}

/* ─── Week calendar ─── */
.v3-week-wrap {
    width: 100%;
    position: relative;
    min-height: 360px;
}

.v3-week-loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: var(--v3-radius);
}

.v3-week-loading .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.22em;
    color: var(--obaccent, #3d6cb9);
}

.v3-week-col-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 4px;
    min-height: 48px;
}

.v3-week-col-loading .spinner-border {
    color: var(--obaccent, #3d6cb9);
}

.v3-week-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.v3-week-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--v3-border);
    border-radius: 50%;
    background: #fff;
    color: var(--obaccent, #3d6cb9);
    cursor: pointer;
    font-size: 1rem;
}

.v3-week-nav-btn:hover:not(:disabled) {
    border-color: var(--obaccent, #3d6cb9);
    background: color-mix(in srgb, var(--obaccent, #3d6cb9) 6%, #fff);
}

.v3-week-nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.v3-week-col.is-past {
    opacity: 0.45;
}

.v3-week-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--obaccent, #3d6cb9);
}

.v3-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    background: #f0f2f5;
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    overflow: hidden;
    position: relative;
}

.v3-week-col {
    min-height: 320px;
    padding: 10px 6px 14px;
    border-right: 1px solid var(--v3-border);
    background: #f0f2f5;
}

.v3-week-col:last-child {
    border-right: none;
}

.v3-week-col.is-weekend {
    background: #e8ebef;
}

.v3-week-col-hd {
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--obaccent, #3d6cb9);
}

.v3-week-times {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}

.v3-week-time {
    display: block;
    width: 100%;
    padding: 8px 4px;
    border: 1px solid var(--v3-border);
    border-radius: 6px;
    background: #fff;
    color: var(--obaccent, #3d6cb9);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.v3-week-time:hover {
    border-color: var(--obaccent, #3d6cb9);
}

.v3-week-time.selected {
    background: var(--obtn, #3d6cb9);
    border-color: var(--obtn, #3d6cb9);
    color: var(--obbtn-text, #fff);
}

.v3-week-empty {
    display: block;
    width: 100%;
    font-size: 0.75rem;
    color: var(--obaccent, #3d6cb9);
    text-align: center;
    padding: 8px 4px;
}

.v3-waitlist-area {
    margin-top: 28px;
    text-align: center;
}

.v3-waitlist-text {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: var(--obaccent, #3d6cb9);
}

.v3-waitlist-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--v3-radius);
    background: var(--obtn, #3d6cb9);
    color: var(--obbtn-text, #fff);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
}

.v3-waitlist-btn:hover {
    filter: brightness(0.95);
}

/* ─── Contact form ─── */
.v3-contact-form .v3-field {
    margin-bottom: 16px;
}

.v3-contact-form .v3-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--obtext, #212529);
}

.v3-contact-form .form-control {
    border-radius: 6px;
    border-color: var(--v3-border);
    padding: 10px 12px;
    font-size: 0.9rem;
}

.v3-contact-form .form-control.is-invalid {
    border-color: #dc3545;
}

.v3-contact-form .invalid-feedback {
    display: block;
    font-size: 0.8rem;
}

.v3-contact-form textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.v3-opt-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.v3-opt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.v3-opt-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--obaccent, #3d6cb9);
}

.v3-confirm-box {
    margin-top: 8px;
    padding: 20px;
    background: #f5f7fa;
    border-radius: var(--v3-radius);
}

.v3-terms-check {
    margin-bottom: 14px;
}

.v3-terms-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 0.85rem;
    color: var(--v3-muted);
    cursor: pointer;
}

.v3-terms-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--obaccent, #3d6cb9);
    cursor: pointer;
}

.v3-terms-label-text a {
    color: var(--obaccent, #3d6cb9);
}

.v3-confirm-box p {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: var(--v3-muted);
}

.v3-confirm-box a {
    color: var(--obaccent, #3d6cb9);
}

.v3-confirm-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: var(--v3-radius);
    background: var(--obtn, #3d6cb9);
    color: var(--obbtn-text, #fff);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
}

.v3-confirm-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ─── Contact sidebar (oversigt og vilkår) ─── */
.v3-detail-sidebar .v3-overview-title {
    text-align: left;
}

.v3-terms-text {
    margin: 0 0 16px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--obtext, #212529);
}

.v3-terms-text a {
    color: var(--obaccent, #3d6cb9);
}

.v3-detail-list {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.v3-detail-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.v3-detail-list i {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--obaccent, #3d6cb9);
}

/* ─── Shared components ─── */
.v3-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    margin-bottom: 8px;
    background: #fff;
    cursor: pointer;
}

.v3-list-row:hover {
    border-color: var(--obaccent, #3d6cb9);
}

.v3-list-row-body { flex: 1; min-width: 0; }
.v3-list-row-title { font-weight: 600; margin: 0 0 2px; }
.v3-list-row-sub { font-size: 0.85rem; color: var(--v3-muted); margin: 0; }
.v3-list-row-chevron { color: var(--v3-muted); }

.v3-employee-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.v3-employee-card {
    flex: 0 0 calc(50% - 6px);
    text-align: center;
    padding: 16px 8px;
    border: 2px solid var(--v3-border);
    border-radius: var(--v3-radius);
    cursor: pointer;
}

.v3-employee-card.selected {
    border-color: var(--obaccent, #3d6cb9);
    background: color-mix(in srgb, var(--obaccent, #3d6cb9) 8%, #fff);
}

.v3-employee-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 8px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.5rem;
    color: var(--v3-muted);
}

.v3-employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v3-item-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
}

.v3-item-card.selected {
    border-color: var(--obaccent, #3d6cb9);
    background: color-mix(in srgb, var(--obaccent, #3d6cb9) 6%, #fff);
}

.v3-item-img {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.v3-item-body { flex: 1; min-width: 0; }
.v3-item-name { font-weight: 600; font-size: 0.9rem; margin: 0 0 4px; }
.v3-item-desc { font-size: 0.8rem; color: var(--v3-muted); margin: 0; }
.v3-item-meta { font-size: 0.85rem; font-weight: 600; }

.v3-qty-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v3-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--v3-border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.v3-loading {
    display: flex;
    justify-content: center;
    padding: 48px;
}

.v3-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--v3-muted);
}

.v3-alert-inline {
    margin-bottom: 16px;
    border-radius: var(--v3-radius);
}

.v3-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 14px;
}

.v3-payment-card {
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    padding: 16px;
    margin-bottom: 12px;
}

.v3-success {
    text-align: center;
    padding: 40px 20px;
}

.v3-success-icon {
    font-size: 4rem;
    color: var(--obaccent, #3d6cb9);
    margin-bottom: 16px;
}

/* Top links */
.v3-top-links {
    display: flex;
    gap: 8px;
    padding: 10px 0 14px;
    overflow: visible;
    position: relative;
    z-index: 30;
}

.v3-top-links .dropdown {
    position: relative;
    flex-shrink: 0;
}

button.v3-top-link {
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.v3-top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #e9ecef;
    background: #fff;
    color: var(--obtext, #212529);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.v3-top-link i { color: var(--obaccent, #3d6cb9); }
.v3-top-link:hover { border-color: var(--obaccent, #3d6cb9); text-decoration: none; }

.v3-portal-bar { flex-shrink: 0; }

/* Month calendar fallback */
#v3Calendar .ui-datepicker {
    width: 100% !important;
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius);
    padding: 8px;
}

#v3Calendar .ui-datepicker-title,
#v3Calendar .ui-datepicker-title span,
#v3Calendar .ui-datepicker-title select {
    color: #212529 !important;
}

#v3Calendar .available-day a {
    background: var(--obtn, #3d6cb9) !important;
    color: var(--obbtn-text, #fff) !important;
    border-radius: 6px;
}

.v3-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
}

.v3-time-slot {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--v3-border);
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
}

.v3-time-slot.selected {
    background: var(--obtn, #3d6cb9);
    color: var(--obbtn-text, #fff);
    border-color: var(--obbtn, #3d6cb9);
}

@media (max-width: 900px) {
    .v3-page { padding: 8px; }

    .v3-stepper-track {
        flex-direction: column;
    }

    .v3-step {
        min-height: auto;
        padding: 10px 16px;
    }

    .v3-step + .v3-step {
        padding-left: 16px;
        border-top: 1px solid var(--v3-border);
        border-right: none;
    }

    .v3-body-layout,
    .v3-body-layout.is-contact {
        grid-template-columns: 1fr;
    }

    .v3-sidebar {
        border-left: none;
        border-top: 1px solid var(--v3-border);
    }

    .v3-week-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .v3-week-col {
        border-right: none;
        border-bottom: 1px solid var(--v3-border);
        min-height: auto;
    }
}

@media (max-width: 520px) {
    .v3-week-grid {
        grid-template-columns: 1fr;
    }

    .v3-main {
        padding: 16px;
    }
}
