/**
 * Booking flow styles — placeholder, to be fleshed out with calendar + step UI.
 */

.kmb-booking-flow {
    max-width: 1140px;
    margin: 0 auto;
    padding: 50px 20px;
}

.kmb-booking-flow .kmb-step {
    max-width: 800px;
    margin: 50px auto 0;
}

.kmb-booking-flow .kmb-navigation {
    max-width: 800px;
    margin: 0 auto;
}

/* Progress bar — 5 steps */
.woocommerce .kmb-progress.tab-progress {
    max-width: 1140px;
    margin: 0 auto 30px;
}

.kmb-progress.tab-progress .column {
    width: 20%;
}

.kmb-progress.tab-progress .column p {
    font-size: 1rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .kmb-progress.tab-progress .column {
        width: 10%;
        margin-top: 24px;
    }
    .kmb-progress.tab-progress .column.active {
        width: 50%;
        margin-top: 24px;
    }
}

/* Hide the floating "Book nu" button on meeting booking page */
a#book-nu {
    display: none !important;
}

/* Date search — WC Bookings style dd / mm / yyyy fields */
.kmb-date-search {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0;
    width: 100%;
}

.kmb-date-search label {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    width: 25%;
}

.kmb-date-search label > input {
    width: 100% !important;
}

.kmb-date-search label span {
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
    padding-left: 2px;
}

.kmb-date-search__field {
    padding: 10px 14px;
    border: 1px solid #ccc;
    font-size: 16px;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    outline: none;
}

.kmb-date-search__field:focus {
    border-color: #791515;
}

.kmb-date-search__field::placeholder {
    color: #ccc;
}

.kmb-date-search__sep {
    font-size: 20px;
    color: #999;
    padding: 8px 6px 0;
    line-height: 1;
    align-self: flex-start;
    margin-top: 2px;
}

.kmb-date-search__hint {
    width: 100%;
    font-size: 16px;
    color: #000000;
    margin: 12px 0 0;
}

.kmb-step {
    display: none;
}

.kmb-step--active {
    display: block;
}

/* Calendar legend */
.kmb-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    column-gap: 16px;
    row-gap: 0;
    margin-bottom: 14px;
    font-size: 14px;
    color: #555;
}

.kmb-calendar-legend__title {
    width: 100%;
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.kmb-calendar-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kmb-calendar-legend__item::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.kmb-calendar-legend__item--green::before {
    background-color: #2ecc71;
}

.kmb-calendar-legend__item--yellow::before {
    background-color: #c8b832;
}

.kmb-calendar-legend__item--red::before {
    background-color: #c0392b;
}

/* Calendar */
.kmb-calendar {
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.19);
}

.kmb-calendar__nav {
    background-color: rgb(148, 36, 43);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5em .5em;
    line-height: 1em;
    font-weight: normal;
}

.kmb-calendar__title {
    font-size: 20px;
    font-weight: 400;
}

.kmb-calendar__nav .kmb-btn--nav {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
}

.kmb-calendar__nav .kmb-btn--nav:hover {
    color: #fff;
    background-color: transparent !important;
}

.kmb-calendar table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
}

.kmb-calendar th {
    text-align: center;
    padding: 12px 0;
    color: #bbb;
    font-weight: 400;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fefefe;
    border: none;
    border-top: 1px solid #e6e6e6;
}

.kmb-calendar td {
    text-align: center;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 400;
    border: none;
    border-top: 1px solid #e6e6e6;
    border-right: 1px solid #e6e6e6;
}

.kmb-calendar td:last-child {
    border-right: 0;
}

.kmb-calendar td:empty,
.kmb-calendar td.kmb-day--empty {
    background-color: #f5f5f5;
}

.kmb-calendar td.kmb-day {
    cursor: pointer;
    transition: opacity 0.15s;
}

.kmb-calendar td.kmb-day:hover {
    opacity: 0.8;
}

.kmb-calendar td.kmb-day--green {
    background-color: #2ecc71 !important;
    color: #fff !important;
}

.kmb-calendar td.kmb-day--yellow {
    background-color: #c8b832 !important;
    color: #fff !important;
}

.kmb-calendar td.kmb-day--red {
    background-color: #c0392b !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: not-allowed;
}

.kmb-calendar td.kmb-day--past {
    background-color: #eee !important;
    color: #2b2b2b !important;
    cursor: not-allowed;
}

.kmb-calendar td.kmb-day--disabled {
    color: #ccc;
    cursor: not-allowed;
}

.kmb-calendar td.kmb-day--selected {
    outline: 3px solid #791515;
    position: relative;
    z-index: 1;
}

.kmb-calendar td.kmb-day--green.kmb-day--selected {
    background-color: #239e57 !important;
}

.kmb-calendar td.kmb-day--yellow.kmb-day--selected {
    background-color: #c8a832 !important;
}

/* Package card header (flex for info button) */
.kmb-package-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Info button */
.kmb-info-btn {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #999;
    width: 28px;
    height: 28px;
    font-size: 24px;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 28px;
    padding: 0 !important;
    margin-left: 12px;
    transition: color 0.2s;
}

.kmb-info-btn:hover,
.kmb-info-btn:focus,
.kmb-info-btn:active {
    color: #791515 !important;
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

/* Info box */
.kmb-info-box {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

/* Packages */
.kmb-packages .kmb-package-card {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.kmb-packages .kmb-package-card:hover {
    border-color: #791515;
}

.kmb-packages .kmb-package-card--selected {
    border-color: #791515;
    background: #fdf2f2;
}

.kmb-packages .kmb-package-card--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Participants */
.kmb-participants {
    margin-bottom: 8px;
}

.kmb-participants__input,
input#kmb-participants {
    font-size: 24px;
    font-weight: normal;
    padding: 16px 14px;
    width: 100%;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    box-sizing: border-box;
}

.kmb-participants__input:focus,
input#kmb-participants:focus {
    border-color: #999 !important;
}

.kmb-participants__warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.kmb-participants__error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

/* Add-ons */
.kmb-addons .kmb-addon-card {
    border: 1px solid #ddd;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kmb-addons .kmb-addon-card label {
    flex: 1;
    cursor: pointer;
}

.kmb-addons .kmb-addon-card--selected {
    border-color: #791515;
    background: #fdf2f2;
}

.kmb-addons .kmb-addon-card .kmb-info-box {
    width: 100%;
}

/* Summary details */
.kmb-summary {
    margin-bottom: 0;
}

.kmb-summary__details {
    padding: 0 4px;
}

.kmb-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.kmb-summary__row:last-child {
    border-bottom: none;
}

.kmb-summary__label {
    color: #888;
    font-weight: 500;
}

/* Agreement notice */
.kmb-agreement-notice {
    background: #fff8e1;
    border: 1px solid #ffecb3;
    padding: 15px;
    max-width: 800px;
    margin: 15px auto;
    border-radius: 4px;
}

/* Running price summary */
.kmb-price-summary {
    background: #f9f9f9;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 20px 24px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* On step 5, merge summary + price into one card */
.kmb-step--summary.kmb-step--active ~ .kmb-price-summary {
    border-top: 2px solid #e0e0e0;
    border-radius: 0 0 6px 6px;
    margin-top: 0;
}

.kmb-step--summary.kmb-step--active .kmb-summary {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 20px;
}

.kmb-price-summary__inner {
    /* wrapper for price lines */
}

.kmb-price-summary__line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 15px;
    color: #555;
}

.kmb-price-summary__line--addon {
    font-size: 14px;
    color: #888;
    padding-left: 16px;
}

.kmb-price-summary__total {
    border-top: 1px solid #ddd;
    margin-top: 12px;
    padding-top: 14px;
    font-size: 20px !important;
    font-weight: 700;
    color: #222 !important;
}

.kmb-price-summary__total small {
    font-weight: 400;
    font-size: 13px;
    color: #999;
    margin-left: 4px;
}

/* Buttons */
.kmb-booking-flow .kmb-btn,
.kmb-booking-flow button.kmb-btn {
    display: inline-block;
    padding: 15px 30px !important;
    border: none !important;
    border-radius: 100px !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
    user-select: none;
    background-color: #791515 !important;
    color: #FFFFFF !important;
}

.kmb-booking-flow .kmb-btn:hover,
.kmb-booking-flow button.kmb-btn:hover {
    background-color: #5e1010 !important;
    color: #FFFFFF !important;
}

.kmb-booking-flow .kmb-btn--disabled,
.kmb-booking-flow button.kmb-btn--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.kmb-booking-flow .kmb-btn--back,
.kmb-booking-flow button.kmb-btn--back {
    background-color: transparent !important;
    color: #791515 !important;
    border: 2px solid #791515 !important;
}

.kmb-booking-flow .kmb-btn--back:hover,
.kmb-booking-flow button.kmb-btn--back:hover {
    background-color: rgba(121, 21, 21, 0.05) !important;
    color: #791515 !important;
}

.kmb-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
}

.kmb-navigation #kmb-back {
    margin-right: auto;
}

/* Price display */
.kmb-price {
    font-weight: bold;
}

.kmb-price__vat-note {
    font-size: 12px;
    color: #666;
}

/* Loading spinner */
/* Returning from checkout: spinner instead of the steps until they're restored. */
.kmb-restore-loader {
    display: none;
}

.kmb-booking-flow--restoring .kmb-restore-loader {
    display: block;
    max-width: 800px;
    margin: 50px auto 0;
}

.kmb-booking-flow--restoring .kmb-step,
.kmb-booking-flow--restoring .kmb-navigation,
.kmb-booking-flow--restoring .kmb-price-summary,
.kmb-booking-flow--restoring .kmb-agreement-notice {
    display: none !important;
}

.kmb-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.kmb-loader__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #791515;
    border-radius: 50%;
    animation: kmb-spin 0.8s linear infinite;
}

@keyframes kmb-spin {
    to { transform: rotate(360deg); }
}

/* VAT display switch (inkl./ekskl. moms) — booking flow + checkout */
.kmb-vat-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
    margin: 0 auto;
}

.kmb-vat-toggle__label {
    font-size: 14px;
    color: #555;
}

/* No gap between the two options so they share one border. */
.kmb-vat-toggle__options {
    display: inline-flex;
}

.kmb-vat-toggle__option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.kmb-vat-toggle__option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.kmb-vat-toggle__option span {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid #791515;
    background: #fff;
    color: #791515;
    font-size: 14px;
    line-height: 1.2;
    transition: background-color 0.2s, color 0.2s;
}

.kmb-vat-toggle__option:first-of-type span {
    border-radius: 100px 0 0 100px;
}

.kmb-vat-toggle__option:last-of-type span {
    border-left: none;
    border-radius: 0 100px 100px 0;
}

.kmb-vat-toggle__option input:checked + span {
    background: #791515;
    color: #fff;
}

.kmb-vat-toggle__option input:focus-visible + span {
    outline: 2px solid #791515;
    outline-offset: 2px;
}

/* Checkout (mødepakke only): back button left, VAT toggle right. */
.kmb-checkout-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 1140px;
    margin: 0 auto 30px;
}

.kmb-checkout-bar .kmb-vat-toggle {
    margin: 0;
}

a.kmb-checkout-back {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid #791515;
    border-radius: 100px;
    background: transparent;
    color: #791515;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

a.kmb-checkout-back:hover,
a.kmb-checkout-back:focus-visible {
    background: #791515;
    color: #fff;
    text-decoration: none;
}

.kmb-price-summary__line--incl {
    font-size: 14px;
    color: #888;
    padding-top: 2px;
}

/* "Hjælp til Booking" button + popup */
.kmb-help {
    display: flex;
    justify-content: flex-end;
    max-width: 100%;
    margin: 10px 0;
}

/* Booking flow: step heading on the left, VAT toggle + help on the right. */
.kmb-step__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.kmb-step__title {
    min-width: 0;
}

.kmb-flow-tools {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.kmb-flow-tools .kmb-vat-toggle {
    margin: 0;
}

@media (max-width: 640px) {
    .kmb-step__head {
        flex-direction: column-reverse;
        gap: 0;
    }

    .kmb-flow-tools {
        align-self: stretch;
        margin-bottom: 20px;
    }
}

.kmb-booking-flow .kmb-help__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px !important;
    border: 1px solid #791515 !important;
    border-radius: 100px !important;
    background: #fff !important;
    color: #791515 !important;
    font-size: 14px !important;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.kmb-booking-flow .kmb-help__btn:hover,
.kmb-booking-flow .kmb-help__btn:focus-visible {
    background: #791515 !important;
    color: #fff !important;
}

.kmb-help__dialog {
    width: min(480px, calc(100vw - 32px));
    padding: 30px 28px 24px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    color: #333;
}

.kmb-help__dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.kmb-help__title {
    margin: 0 0 12px;
    color: #791515;
}

.kmb-help__text p {
    margin: 0 0 14px;
    line-height: 1.6;
}

.kmb-help__text p:last-child {
    margin-bottom: 0;
}

.kmb-help__text a {
    color: #791515;
    font-weight: 600;
    text-decoration: none;
}

.kmb-help__text a:hover {
    text-decoration: underline;
}

.kmb-booking-flow .kmb-help__close {
    position: absolute;
    top: 8px;
    right: 12px;
    padding: 4px 8px !important;
    border: none !important;
    background: none !important;
    color: #555 !important;
    font-size: 26px !important;
    line-height: 1;
    cursor: pointer;
}

.kmb-booking-flow .kmb-help__close:hover {
    color: #791515 !important;
}
