/* ==============================================
   Blåsebanken – CSS (v2.3.1)
   Eigen produktside-template – ingen WC-layout-arv.
   Fargepalett: stein/amber + grøn kalender.
   ============================================== */

/* ── Fargevariablar ──────────────────────────────── */
:root {
    --bb-bg:       #f8f7f5;
    --bb-card:     #ffffff;
    --bb-border:   #e7e5e4;
    --bb-text:     #1c1917;
    --bb-sub:      #44403c;
    --bb-muted:    #78716c;
    --bb-amber:    #92400e;
    --bb-amber-bg: #fffbeb;
    --bb-green:    #2a6d3f;
    --bb-green-bg: #d4edda;
    --bb-dark:     #1c1917;
    --bb-r:        8px;
    --bb-r-lg:     12px;
    --bb-shadow:   0 1px 3px rgba(0,0,0,.06);
}

/* ── Produktside wrapper ─────────────────────────── */
.bb-product-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
    font-family: inherit;
    color: var(--bb-text);
}

/* ── Breadcrumb ──────────────────────────────────── */
.bb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 8px;
}

.bb-breadcrumb-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--bb-amber) !important;
    text-decoration: none !important;
}
.bb-breadcrumb-link:hover {
    text-decoration: underline !important;
}

.bb-breadcrumb-sep { color: #d6d3d1; }

.bb-breadcrumb-snr {
    font-size: 0.78rem;
    color: var(--bb-muted);
    letter-spacing: 0.03em;
}

/* ── Hero: bilete + info ─────────────────────────── */
.bb-product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

/* Bilete */
.bb-product-images {
    position: sticky;
    top: 100px;
}

.bb-product-main-img {
    border-radius: var(--bb-r-lg);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--bb-border);
    max-height: 480px;
}

.bb-product-main-img .bb-hero-img {
    object-fit: cover;
    max-height: 480px;
}

.bb-hero-img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.15s ease;
}

.bb-product-gallery {
    display: flex;
    gap: 6px;
}

.bb-gallery-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--bb-border);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}
.bb-gallery-thumb:hover {
    border-color: var(--bb-amber);
}
.bb-gallery-thumb--active {
    border-color: var(--bb-amber);
    box-shadow: 0 0 0 1px var(--bb-amber);
}

.bb-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Info-kolonne */
.bb-product-info {
    padding-top: 4px;
}

.bb-product-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--bb-text);
    margin: 0 0 8px;
    line-height: 1.25;
}

.bb-product-excerpt {
    font-size: 0.95rem;
    color: var(--bb-sub);
    line-height: 1.6;
    margin: 0 0 16px;
}

/* ── Status ──────────────────────────────────────── */
.bb-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.bb-status {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.bb-status--ledig {
    background: var(--bb-green-bg);
    color: #1a5c2a;
    border: 1px solid #a3d4ae;
}
.bb-status--utlant {
    background: #fde8d0;
    color: #7a3900;
    border: 1px solid #f5c89a;
}
.bb-status--reservert {
    background: #fff3cd;
    color: #664d00;
    border: 1px solid #f0d070;
}

.bb-serienr {
    font-size: 0.82rem;
    color: var(--bb-muted);
}

/* ── [UX 5] Prisindikator (synleg før datoval) ───── */
.bb-quick-price {
    background: var(--bb-card);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-r);
    padding: 14px 16px 10px;
    margin-bottom: 20px;
}

.bb-quick-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid #f0eeec;
}
.bb-quick-price-row:last-of-type {
    border-bottom: none;
}

.bb-quick-price-label {
    font-size: 0.88rem;
    color: var(--bb-sub);
}

.bb-quick-price-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bb-text);
}
.bb-quick-price-value small {
    font-weight: 400;
    color: var(--bb-muted);
    font-size: 0.82em;
}

.bb-quick-price--free {
    color: var(--bb-green);
}

.bb-quick-price-note {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--bb-muted);
    line-height: 1.4;
}

/* ── [UX 1] Stegsindikator ──────────────────────── */
.bb-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
    padding: 0 4px;
}

.bb-steps--form {
    margin-bottom: 20px;
    justify-content: center;
}

.bb-step {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.bb-step--active {
    opacity: 1;
}
.bb-step--done {
    opacity: 0.7;
}

.bb-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bb-border);
    color: var(--bb-muted);
    flex-shrink: 0;
}

.bb-step--active .bb-step-num {
    background: var(--bb-amber);
    color: #fff;
}
.bb-step--done .bb-step-num {
    background: var(--bb-green);
    color: #fff;
}

.bb-step-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--bb-muted);
    white-space: nowrap;
}
.bb-step--active .bb-step-label {
    color: var(--bb-text);
    font-weight: 600;
}

.bb-step-line {
    flex: 1;
    height: 1px;
    background: var(--bb-border);
    margin: 0 8px;
    min-width: 16px;
}
.bb-step-line--done {
    background: var(--bb-green);
}

/* ── Kalender ────────────────────────────────────── */
.bb-calendar-wrap {
    margin-bottom: 8px;
}

#bb-calendar .flatpickr-calendar {
    width: 100%;
    max-width: 340px;
    box-shadow: var(--bb-shadow);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-r);
    font-family: inherit;
}
#bb-calendar .flatpickr-calendar.inline {
    display: block;
    position: relative;
    top: auto;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange {
    background: var(--bb-green) !important;
    border-color: var(--bb-green) !important;
}
.flatpickr-day.inRange {
    background: var(--bb-green-bg) !important;
    border-color: var(--bb-green-bg) !important;
    color: #1a5c2a;
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    background: transparent !important;
    color: #cfcfcf !important;
    text-decoration: none;
    cursor: default;
}
.flatpickr-day.bb-day-past,
.flatpickr-day.bb-day-past:hover {
    background: transparent !important;
    color: #cfcfcf !important;
    text-decoration: none;
    cursor: default;
}
.flatpickr-day.bb-day-booked,
.flatpickr-day.bb-day-booked:hover {
    background: #fef3c7 !important;
    color: #92400e !important;
    text-decoration: line-through;
    cursor: not-allowed;
    border-color: #fde68a !important;
    font-weight: 500;
}

/* ── [UX 4] Kalender-forklaring ──────────────────── */
.bb-cal-legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding: 0 2px;
}

.bb-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--bb-muted);
}

.bb-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.bb-legend-dot--available {
    background: #fff;
    border: 1px solid #ccc;
}
.bb-legend-dot--blocked {
    background: #fef3c7;
    border: 1px solid #fde68a;
}
.bb-legend-dot--selected {
    background: var(--bb-green);
    border: 1px solid var(--bb-green);
}

/* ── [UX 3] Varsle meg (utlånt) ─────────────────── */
.bb-notify-wrap {
    background: var(--bb-amber-bg);
    border: 1px solid #fde68a;
    border-radius: var(--bb-r-lg);
    padding: 20px 22px;
    margin-top: 8px;
}

.bb-notify-text {
    font-size: 0.93rem;
    color: var(--bb-sub);
    margin: 0 0 12px;
    line-height: 1.5;
}

.bb-notify-row {
    display: flex;
    gap: 8px;
}

.bb-notify-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.93rem;
    font-family: inherit;
}
.bb-notify-input:focus {
    border-color: var(--bb-amber);
    outline: none;
    box-shadow: 0 0 0 3px rgba(146,64,14,0.08);
}

.bb-notify-btn {
    background: var(--bb-dark);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.bb-notify-btn:hover {
    background: #292524;
}

.bb-notify-msg {
    margin: 10px 0 0;
    font-size: 0.88rem;
    font-weight: 500;
}
.bb-notify-msg.bb-success { color: #155724; }
.bb-notify-msg.bb-error { color: #721c24; }

/* ── [UX 6] Seksjonsskilje ──────────────────────── */
.bb-section {
    padding: 0;
    margin-bottom: 0;
}

.bb-section--form {
    background: var(--bb-bg);
    margin: 0 -1.25rem;
    padding: 2rem 1.25rem;
    border-top: 1px solid var(--bb-border);
    border-bottom: 1px solid var(--bb-border);
}

.bb-section--desc {
    padding-top: 0;
}

.bb-section--cta {
    margin-bottom: 0;
}

/* ── Prisviser ───────────────────────────────────── */
.bb-price-display {
    margin: 12px 0 16px;
    padding: 12px 16px;
    border-radius: var(--bb-r);
    font-size: 0.95rem;
    line-height: 1.5;
}
.bb-price-display.bb-price-ok {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
}
.bb-price-display.bb-price-error {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
}
.bb-price-detail {
    font-size: 0.85em;
    color: #4a7a55;
    display: block;
    margin-top: 3px;
}
.bb-price-extra {
    font-size: 0.88em;
    color: #5a7a5a;
}
.bb-price-select-age {
    color: #555;
    font-style: italic;
}

/* ── Bookingskjema ───────────────────────────────── */
.bb-form-wrap {
    background: var(--bb-card);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-r-lg);
    padding: 28px 28px 24px;
    margin-bottom: 2rem;
}

.bb-form-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--bb-text);
}

.bb-dates-display-row {
    background: var(--bb-amber-bg);
    border-radius: var(--bb-r);
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    color: var(--bb-amber);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bb-change-dates-btn {
    background: none;
    border: 1px solid var(--bb-amber);
    color: var(--bb-amber);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.bb-change-dates-btn:hover {
    background: var(--bb-amber);
    color: #fff;
}

.bb-norway-notice {
    background: var(--bb-bg);
    border-left: 3px solid var(--bb-muted);
    padding: 8px 14px;
    border-radius: 0 var(--bb-r) var(--bb-r) 0;
    font-size: 0.86rem;
    color: var(--bb-sub);
    margin-bottom: 20px;
}

/* 2-kolonne skjema-grid */
.bb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}

/* [P1] Skjema-seksjonsetikett (Om utlånet / Kontaktinfo) */
.bb-form-section-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: var(--bb-muted);
    margin: 4px 0 12px;
}
.bb-form-section-label + .bb-form-grid { margin-bottom: 4px; }

/* [P1] Personvern-notis under Send-knappen */
.bb-privacy-note {
    font-size: 0.8rem;
    color: var(--bb-muted);
    margin: 14px 0 0;
    line-height: 1.5;
}
.bb-privacy-note a { color: inherit; text-decoration: underline; }

.bb-form-footer {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--bb-border);
}

/* Felt */
.bb-field {
    margin-bottom: 14px;
}
.bb-field label,
.bb-field legend {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #333;
}
.bb-required { color: #c0392b; }

.bb-field input[type="text"],
.bb-field input[type="email"],
.bb-field input[type="tel"],
.bb-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.93rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.bb-field input:focus,
.bb-field textarea:focus {
    border-color: var(--bb-amber);
    outline: none;
    box-shadow: 0 0 0 3px rgba(146,64,14,0.08);
}

.bb-fieldset { border: none; padding: 0; margin: 0; }

.bb-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bb-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.9rem;
}
.bb-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--bb-amber);
    cursor: pointer;
}
.bb-age-note {
    color: var(--bb-muted);
    font-size: 0.83em;
}

.bb-field textarea {
    min-height: 72px;
    resize: vertical;
}

/* Adressegruppe */
.bb-address-group {
    background: var(--bb-bg);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-r);
    padding: 12px 14px;
    margin-bottom: 14px;
}
.bb-address-note {
    margin: 0 0 8px;
    font-size: 0.86rem;
    color: var(--bb-sub);
    font-weight: 600;
}
.bb-address-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.bb-address-row .bb-field { margin-bottom: 0; }
.bb-address-row .bb-field:first-child { flex: 0 0 100px; }
.bb-address-row .bb-field:last-child { flex: 1; min-width: 120px; }

/* Checkbox */
.bb-field--checkbox { margin-bottom: 10px; }
.bb-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1.4;
}
.bb-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--bb-amber);
    cursor: pointer;
}
.bb-checkbox-label a {
    color: var(--bb-amber);
    text-decoration: underline;
}

/* Send-knapp */
.bb-field--submit { margin-top: 8px; }
.bb-submit-btn {
    background: var(--bb-dark);
    color: #fff;
    border: none;
    border-radius: var(--bb-r);
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.bb-submit-btn:hover { background: #292524; }
.bb-submit-btn:disabled { background: #888; cursor: not-allowed; }

/* Melding */
.bb-form-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--bb-r);
    font-size: 0.93rem;
    font-weight: 500;
}
.bb-form-message.bb-success {
    background: var(--bb-green-bg);
    color: #155724;
    border: 1px solid #b3d9bd;
}
.bb-form-message.bb-error {
    background: #fce8e8;
    color: #721c24;
    border: 1px solid #f5c6c6;
}

/* ── Instrumentbeskriving ────────────────────────── */
.bb-instrument-description {
    margin-bottom: 2rem;
    padding: 28px 0;
    border-top: 1px solid var(--bb-border);
}

.bb-desc-heading {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bb-text);
    margin: 0 0 16px;
}

.bb-instrument-description h3,
.bb-instrument-description h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bb-text);
    margin: 1.2em 0 0.35em;
}
.bb-instrument-description h3:first-of-type,
.bb-instrument-description h4:first-of-type {
    margin-top: 0;
}
.bb-instrument-description p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--bb-sub);
    margin: 0 0 0.7em;
}
.bb-instrument-description ul {
    padding-left: 1.25em;
    margin: 0.5em 0 1em;
}
.bb-instrument-description li {
    font-size: 0.93rem;
    color: var(--bb-sub);
    line-height: 1.6;
    margin-bottom: 0.25em;
}

/* ── Kommersiell CTA ─────────────────────────────── */
.bb-commercial-cta {
    padding: 20px 24px;
    background: #f7f3ee;
    border: 1px solid #ddd0c0;
    border-left: 4px solid #a07850;
    border-radius: 0 var(--bb-r-lg) var(--bb-r-lg) 0;
    margin-bottom: 2rem;
}
.bb-commercial-cta p {
    margin: 0 0 12px;
    font-size: 0.92rem;
    color: #4a3a28;
    line-height: 1.5;
}
.bb-commercial-link {
    display: inline-block;
    background: #a07850;
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}
.bb-commercial-link:hover { background: #7a5a38; }

/* ── Oslo kommune ────────────────────────────────── */
.bb-oslo-kommune {
    text-align: center;
    padding: 20px;
}
.bb-oslo-kommune--product {
    padding-top: 24px;
    border-top: 1px solid var(--bb-border);
}
.bb-oslo-label {
    font-size: 0.82rem;
    color: var(--bb-muted);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.bb-oslo-logo {
    width: 72px;
    height: auto;
    display: inline-block;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.bb-oslo-logo:hover { opacity: 0.85; }

/* ── Instrumentliste-shortcode ───────────────────── */
.bb-instrument-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin: 24px 0 36px;
}
.bb-instrument-card {
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-r);
    overflow: hidden;
    background: var(--bb-card);
    position: relative;
    transition: box-shadow 0.2s, transform 0.15s;
}
.bb-instrument-card:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.bb-card--utlant { opacity: 0.82; }

.bb-card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.bb-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: linear-gradient(135deg, #f5efe8, #ede3d8);
    text-decoration: none;
    font-size: 3rem;
    color: #a07850;
}

.bb-card-body { padding: 14px; }
.bb-card-title {
    font-size: 1rem;
    margin: 0 0 8px;
    line-height: 1.3;
}
.bb-card-title a {
    text-decoration: none;
    color: var(--bb-text);
}
.bb-card-title a:hover { color: var(--bb-amber); }

.bb-card-return {
    font-size: 0.83rem;
    color: var(--bb-muted);
    margin: 6px 0;
}
.bb-card-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bb-amber);
    text-decoration: none;
}
.bb-card-link:hover { text-decoration: underline; }
.bb-card-link--secondary { color: var(--bb-muted); }

/* ── Admin-knappar ───────────────────────────────── */
.bb-confirm-btn,.bb-decline-btn,.bb-cancel-btn {
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    color: #fff;
}
.bb-confirm-btn { background: #2ecc71; }
.bb-confirm-btn:hover { background: #27ae60; color: #fff; }
.bb-decline-btn { background: #e74c3c; margin-left: 4px; }
.bb-decline-btn:hover { background: #c0392b; color: #fff; }
.bb-cancel-btn { background: #95a5a6; margin-left: 4px; }
.bb-cancel-btn:hover { background: #7f8c8d; color: #fff; }

.bb-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.bb-admin-table th,.bb-admin-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--bb-border);
    text-align: left;
    vertical-align: top;
}
.bb-admin-table th { background: #f5f8ff; font-weight: 600; white-space: nowrap; }
.bb-admin-table tr:hover td { background: #fafbff; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .bb-product-hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .bb-product-images {
        position: static;
        max-width: 500px;
    }
    .bb-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .bb-form-wrap {
        padding: 20px 16px;
    }
}

@media (max-width: 600px) {
    .bb-product-page {
        padding: 0 1rem 2rem;
    }
    .bb-product-title {
        font-size: 1.35rem;
    }
    .bb-instrument-liste {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    .bb-card-img img,
    .bb-card-img-placeholder {
        height: 150px;
    }
    .bb-oslo-logo { width: 80px; }
}

@media (max-width: 380px) {
    .bb-instrument-liste {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   v2.1.0 – Inline-validering, ordresamandrag,
   stadfestingskort, mobil CTA, animasjonar, a11y
   ============================================== */

/* ── 1. Inline-validering ────────────────────────── */
.bb-field--valid input,
.bb-field--valid textarea {
    border-color: var(--bb-green) !important;
}

.bb-field--invalid input,
.bb-field--invalid textarea,
.bb-field--invalid .bb-radio-group,
.bb-field--invalid .bb-checkbox-label {
    border-color: #e74c3c !important;
}
.bb-field--invalid .bb-radio-group {
    border: 1px solid #e74c3c;
    border-radius: var(--bb-r);
    padding: 6px 10px;
}
.bb-field--invalid.bb-field--checkbox {
    background: #fef2f2;
    border-radius: var(--bb-r);
    padding: 6px 10px;
    margin-left: -10px;
    margin-right: -10px;
}

.bb-field-feedback {
    display: block;
    font-size: 0.78rem;
    margin-top: 3px;
    line-height: 1.3;
}
.bb-field-feedback--error {
    color: #c0392b;
}
.bb-field-feedback--ok {
    color: var(--bb-green);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ── 2. Ordresamandrag ───────────────────────────── */
.bb-summary {
    background: var(--bb-card);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-r-lg);
    padding: 18px 22px;
    margin: 20px 0 8px;
}

.bb-summary-title {
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bb-muted);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bb-border);
}

.bb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--bb-sub);
}

.bb-summary-row span:first-child {
    color: var(--bb-muted);
}

.bb-summary-total {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--bb-border);
    font-size: 1rem;
}

.bb-summary-free {
    color: var(--bb-green);
    font-weight: 600;
}

/* [P1] «per påbyrja veke»-forklaring i samandraget */
.bb-summary-note {
    font-size: 0.8rem;
    color: var(--bb-muted);
    font-style: italic;
    padding: 2px 0 4px;
}

/* ── 3. Stadfestingskort ─────────────────────────── */
.bb-confirmation {
    text-align: center;
    padding: 3rem 2rem;
    animation: bbFadeUp 0.5s ease-out;
}

.bb-confirmation:focus {
    outline: none;
}

.bb-confirmation-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bb-green);
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    animation: bbPop 0.4s ease-out 0.15s both;
}

.bb-confirmation-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bb-text);
    margin: 0 0 8px;
}

.bb-confirmation-text {
    font-size: 1rem;
    color: var(--bb-sub);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.bb-confirmation-next {
    background: var(--bb-bg);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-r-lg);
    padding: 20px 24px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.bb-confirmation-next h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--bb-text);
    margin: 0 0 10px;
}

.bb-confirmation-next ol {
    margin: 0;
    padding-left: 1.25em;
}

.bb-confirmation-next li {
    font-size: 0.9rem;
    color: var(--bb-sub);
    line-height: 1.6;
    margin-bottom: 4px;
}

.bb-confirmation-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--bb-border);
    border-top-color: var(--bb-amber);
    border-radius: 50%;
    animation: bbSpin 0.8s linear infinite;
    margin: 0 auto;
}

/* ── 4. Mobil CTA-bar ────────────────────────────── */
.bb-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bb-card);
    border-top: 1px solid var(--bb-border);
    padding: 10px 16px;
    z-index: 999;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease;
}

.bb-mobile-cta--hidden {
    transform: translateY(100%);
}

.bb-mobile-cta-btn {
    display: block;
    width: 100%;
    background: var(--bb-dark);
    color: #fff;
    border: none;
    border-radius: var(--bb-r);
    padding: 13px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.bb-mobile-cta-btn:active {
    background: #292524;
}

/* Padding nedst for å unngå at CTA-baren dekkjer innhald */
@media (max-width: 768px) {
    .bb-product-page {
        padding-bottom: 80px;
    }
}

/* ── 5. Animasjonar ──────────────────────────────── */
@keyframes bbFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes bbPop {
    0%   { transform: scale(0); opacity: 0; }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bbSpin {
    to { transform: rotate(360deg); }
}

/* Spinner i knapp */
.bb-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bbSpin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

/* Mjuk fade på seksjonar */
.bb-section--form {
    animation: bbFadeUp 0.35s ease-out;
}

/* ── 6. A11y ─────────────────────────────────────── */
.bb-field input:focus-visible,
.bb-field textarea:focus-visible,
.bb-checkbox-label input:focus-visible,
.bb-radio-label input:focus-visible {
    outline: 2px solid var(--bb-amber);
    outline-offset: 2px;
}

/* Skip-link (skjult, synleg ved tab) */
.bb-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bb-dark);
    color: #fff;
    padding: 8px 16px;
    z-index: 1000;
    font-size: 0.85rem;
    border-radius: 0 0 var(--bb-r) 0;
    transition: top 0.15s;
}
.bb-skip-link:focus {
    top: 0;
}

/* Leigetids-reglane under kalender-legenden (v2.2.1) */
.bb-cal-rules {
    font-size: 0.85rem;
    color: #57534e;
    margin: 0.5rem 0 0;
}
