/* Rentals module — contract booking form */

.rental-contract-form {
    padding: 15px 0;
}

.rental-contract-title {
    font-size: 22px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.rental-contract-title strong {
    color: var(--rentals-primary, #337ab7);
}

.rental-contract-wrapper {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 25px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.rental-contract-section-label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
    margin-top: 5px;
}

/* mode selector (days / weeks / months tabs) */
.rental-contract-mode-selector {
    margin-bottom: 25px;
}

.rental-contract-mode-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rental-contract-mode-tab {
    flex: 1 1 150px;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.rental-contract-mode-tab input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rental-contract-mode-label {
    display: block;
    text-align: center;
    padding: 14px 12px;
    border: 2px solid #d7d7d7;
    border-radius: 4px;
    background: #f8f8f8;
    font-weight: 600;
    color: #666;
    transition: all 0.15s ease;
}

.rental-contract-mode-label i {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
    color: #999;
}

.rental-contract-mode-tab:hover .rental-contract-mode-label {
    border-color: #999;
    color: #333;
}

.rental-contract-mode-tab input[type="radio"]:checked + .rental-contract-mode-label {
    border-color: #5cb85c;
    background: #eaf7ea;
    color: #2b662b;
}

.rental-contract-mode-tab input[type="radio"]:checked + .rental-contract-mode-label i {
    color: #5cb85c;
}

/* mode panels */
.rental-contract-panel {
    display: none;
    padding: 20px;
    background: #fafafa;
    border: 1px dashed #e0e0e0;
    border-radius: 4px;
    margin-bottom: 20px;
}

.rental-contract-panel.is-active {
    display: block;
}

.rental-contract-subselector {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.rental-contract-subselector .radio-list {
    margin-bottom: 8px;
}

/* renewal and its sub-options */
.rental-contract-renewal {
    margin-top: 12px;
    margin-bottom: 0;
}

.rental-contract-renewal-options {
    display: none;
    margin-top: 10px;
    padding: 12px 16px;
    background: #fffbec;
    border-left: 3px solid #f0ad4e;
    border-radius: 0 3px 3px 0;
}

.rental-contract-renewal-options.is-visible {
    display: block;
}

.rental-contract-renewal-options .checkbox {
    margin-top: 4px;
    margin-bottom: 4px;
}

/* recurrence block */
.rental-contract-recurrence {
    margin-top: 5px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.05);
    border-radius: 4px;
}

.rental-contract-weekdays {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.rental-contract-weekday {
    margin: 0;
    cursor: pointer;
    position: relative;
}

.rental-contract-weekday input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rental-contract-weekday span {
    display: inline-block;
    min-width: 44px;
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #c8d3de;
    border-radius: 3px;
    background: #fff;
    color: #555;
    font-weight: 600;
    transition: all 0.15s ease;
}

.rental-contract-weekday:hover span {
    border-color: #8a9bad;
}

.rental-contract-weekday input[type="checkbox"]:checked + span {
    background: var(--rentals-primary, #337ab7);
    border-color: var(--rentals-primary, #2a6395);
    color: #fff;
}

.rental-contract-times {
    margin-top: 5px;
}

/* start date + submit */
.rental-contract-start-group {
    margin-top: 20px;
}

.rental-contract-datepicker {
    max-width: 200px;
}

.rental-contract-availability {
    margin-top: 10px;
    margin-bottom: 15px;
    padding: 10px 14px;
    border-radius: 3px;
    display: none;
}

.rental-contract-availability.is-available,
.rental-contract-availability.is-blocked {
    display: block;
}

.rental-contract-availability.is-available {
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #c3e6cb;
}

.rental-contract-availability.is-blocked {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.rental-contract-submit {
    margin-top: 20px;
    text-align: right;
}

.rental-contract-template-group {
    margin-bottom: 25px;
}

@media (max-width: 600px) {
    .rental-contract-wrapper {
        padding: 15px;
    }

    .rental-contract-mode-tabs {
        flex-direction: column;
    }

    .rental-contract-submit {
        text-align: center;
    }
}

/* ============================================================
   Booking flow: categories → mode → template → units
   ============================================================ */

.rentals-module .rentals-section-heading {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px;
    line-height: 1.3;
}

.rentals-module .rentals-section-heading small {
    font-size: 14px;
    font-weight: 400;
    color: #888;
    margin-left: 8px;
}

/* -------- Category grid (index) -------- */

.rentals-category-grid {
    display: flex;
    flex-wrap: wrap;
}

.rentals-category-card {
    display: block;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    height: 100%;
}

.rentals-category-card:hover,
.rentals-category-card:focus {
    text-decoration: none;
    color: inherit;
    border-color: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.28);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}

.rentals-category-card-body {
    display: block;
    color: inherit;
    text-decoration: none;
}

.rentals-category-card-body:hover,
.rentals-category-card-body:focus {
    color: inherit;
    text-decoration: none;
}

/* category image slideshow — custom.js's normalizeCarousel levels all slides to the tallest
   image's height via min-height; we fill each slide (incl. its image) to that height via
   object-fit:cover so the bullets bottom:10px always sit on top of the visible image */
.rentals-category-carousel {
    position: relative;
    overflow: hidden;
    display: block;
    background: #f3f3f3;
}

.rentals-category-carousel .carousel-inner {
    position: relative;
    height: 100%;
}

.rentals-category-carousel .carousel-inner .item {
    height: 100%;
}

.rentals-category-carousel .carousel-inner .item > a,
.rentals-category-carousel .carousel-inner .item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rentals-category-carousel-ctrl {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    z-index: 4;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.rentals-category-card:hover .rentals-category-carousel-ctrl {
    opacity: 1;
}

/* always-visible variant used on the category detail page (bigger hero image, thumbnails below) */
.rentals-category-carousel-ctrl.rentals-category-carousel-ctrl-visible {
    opacity: 1;
    width: 38px;
    height: 38px;
    font-size: 15px;
}

.rentals-category-gallery {
    margin-bottom: 16px;
}

.rentals-category-carousel-ctrl:hover,
.rentals-category-carousel-ctrl:focus {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-decoration: none;
}

.rentals-category-carousel-prev { left: 10px; }
.rentals-category-carousel-next { right: 10px; }

.rentals-category-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 4;
    text-align: center;
}

.rentals-category-carousel-dots li {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
    text-indent: -9999px;
}

.rentals-category-carousel-dots li.active {
    width: 10px;
    height: 10px;
    background: #fff;
    border-color: rgba(0, 0, 0, 0.3);
}

.rentals-category-card-image {
    position: relative;
    width: 100%;
    background: #f3f3f3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.rentals-category-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* placeholder (no image at all) still needs a visible minimum height */
.rentals-category-card-placeholder {
    min-height: 180px;
    font-size: 48px;
    color: #bbb;
}

.rentals-category-card-image:hover,
.rentals-category-card-image:focus {
    text-decoration: none;
    color: inherit;
}

.rentals-category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rentals-category-card-placeholder {
    color: #bbb;
    font-size: 48px;
}

.rentals-category-card-body {
    padding: 16px 18px 20px;
}

.rentals-category-card-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.rentals-category-card-desc {
    color: #666;
    font-size: 14px;
    margin: 0 0 12px;
    line-height: 1.4;
}

.rentals-category-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--rentals-primary, #337ab7);
    font-weight: 600;
    font-size: 14px;
}

/* -------- Mode selection cards -------- */

.rentals-mode-grid {
    display: flex;
    flex-wrap: wrap;
}

/* mobile: the mode cards (e.g. "Einzeltermin" / "Vertragsbuchung") stack and
   must span the full width. Below the md breakpoint the col-md-* width rule no
   longer applies, so as flex items they would otherwise shrink to content width. */
@media (max-width: 991px) {
    .rentals-mode-grid > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.rentals-mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 34px 22px 24px;
    color: inherit;
    text-decoration: none;
    height: 100%;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.rentals-mode-card:hover,
.rentals-mode-card:focus {
    text-decoration: none;
    color: inherit;
    border-color: var(--rentals-primary, #337ab7);
    box-shadow: 0 6px 18px rgba(51, 122, 183, 0.15);
    transform: translateY(-3px);
}

.rentals-mode-card-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(51, 122, 183, 0.08);
    color: var(--rentals-primary, #337ab7);
}

.rentals-mode-card-icon i,
.rentals-mode-card-icon .fa {
    font-size: 36px;
    line-height: 1;
}

.rentals-mode-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.rentals-mode-card-hint {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 16px;
    flex-grow: 1;
}

.rentals-mode-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--rentals-primary, #337ab7);
    font-weight: 600;
    margin-top: auto;
}

/* -------- Template selection cards -------- */

.rentals-template-grid {
    display: flex;
    flex-wrap: wrap;
}

.rentals-template-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 20px;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rentals-template-card:hover {
    border-color: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.28);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.rentals-template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.rentals-template-card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    flex: 1;
}

.rentals-template-card-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #555;
    background: #f4f4f4;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.rentals-template-card-contract {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.05);
    border-left: 3px solid var(--rentals-primary, #337ab7);
    border-radius: 0 3px 3px 0;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.rentals-template-card-contract-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.rentals-template-card-runtime,
.rentals-template-card-discount {
    font-size: 13px;
    color: #555;
}

.rentals-template-card-discount {
    color: #2b662b;
    font-weight: 600;
}

.rentals-template-card-dates {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rentals-template-card-dates .form-group {
    flex: 1 1 130px;
    margin-bottom: 0;
}

.rentals-template-card-footer {
    margin-top: auto;
    padding-top: 12px;
}

.rentals-template-card-availability {
    margin: 6px 0 10px;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 13px;
    display: none;
}

.rentals-template-card-availability.is-available,
.rentals-template-card-availability.is-blocked,
.rentals-template-card-availability.is-loading {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rentals-template-card-availability.is-available {
    background: #eaf6ea;
    color: #2b662b;
    border: 1px solid #cbe7cb;
}

.rentals-template-card-availability.is-blocked {
    background: #fdecee;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.rentals-template-card-availability.is-loading {
    background: #f3f4f6;
    color: #555;
    border: 1px solid #e0e2e5;
}

/* -------- Contract selection cards (modern layout) --------
   Colors are driven by the customer's primary brand color. The wrapper element
   exposes --rentals-primary (hex) and --rentals-primary-rgb (R, G, B) as inline
   CSS custom properties; this stylesheet consumes them via var(...). Fallbacks
   keep things sensible on pages that don't set the variables. */

.rentals-template-boxes .rentals-mode-card {
    padding: 28px 22px 22px;
}

.rentals-template-box-details {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    flex-grow: 1;
    width: 100%;
}

.rentals-template-box-details li {
    padding: 2px 0;
}

.rentals-template-contracts-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rentals-template-contracts-title {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.rentals-contract-grid {
    margin-left: -12px;
    margin-right: -12px;
}

.rentals-contract-card-col {
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 24px;
    display: flex;
}

.rentals-contract-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid #ecedef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
}

.rentals-contract-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--rentals-primary, #337ab7);
}

.rentals-contract-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.10);
    border-color: transparent;
}

.rentals-contract-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 22px 16px;
}

.rentals-contract-card-head-text {
    flex: 1 1 auto;
    min-width: 0;
}

.rentals-contract-card-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.rentals-contract-card-subtitle {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.35;
}

.rentals-contract-card-pill {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rentals-primary, #337ab7);
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.12);
    border-radius: 999px;
    white-space: nowrap;
}

.rentals-contract-card-price-section {
    padding: 18px 22px 20px;
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.05);
    border-top: 1px solid rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.10);
    border-bottom: 1px solid rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.10);
    text-align: center;
}

.rentals-contract-card-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    line-height: 1;
}

.rentals-contract-card-price-value {
    font-size: 34px;
    font-weight: 800;
    color: var(--rentals-primary, #337ab7);
    letter-spacing: -0.02em;
}

.rentals-contract-card-price-rate {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.rentals-contract-card-price-sub {
    margin-top: 6px;
    font-size: 13px;
    color: #55606e;
}

.rentals-contract-card-meta {
    list-style: none;
    margin: 0;
    padding: 16px 22px 4px;
}

.rentals-contract-card-meta li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    font-size: 13.5px;
    color: #374151;
}

.rentals-contract-card-meta li + li {
    border-top: 1px solid #f3f4f6;
}

.rentals-contract-card-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.10);
    color: var(--rentals-primary, #337ab7);
    border-radius: 50%;
    font-size: 13px;
}

.rentals-contract-card-meta-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.rentals-contract-card-meta-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.rentals-contract-card-meta-value {
    color: #1f2937;
    word-break: break-word;
}

.rentals-contract-card-highlights {
    list-style: none;
    margin: 0;
    padding: 12px 22px 18px;
    background: #f7faf7;
    border-top: 1px solid #eef3ee;
}

.rentals-contract-card-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 0;
    font-size: 13.5px;
    color: #2b4634;
}

.rentals-contract-card-highlights li i {
    width: 30px;
    flex-shrink: 0;
    color: #3faa3f;
    font-size: 14px;
    line-height: 20px;
    margin-top: 2px;
    text-align: center;
}

.rentals-contract-card-form {
    display: flex;
    flex-direction: column;
    margin: 0;
    margin-top: auto;
}

.rentals-contract-card-rate {
    padding: 14px 22px 0;
}

.rentals-contract-card-rate-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin: 0 0 6px;
}

.rentals-contract-card-rate-label i {
    color: var(--rentals-primary, #337ab7);
}

.rentals-contract-card-rate-select {
    width: 100%;
    height: 38px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #d5d8dd;
    border-radius: 6px;
    padding: 6px 10px;
}

.rentals-contract-card-rate-select:disabled {
    background: #f7f8fa;
    color: #55606e;
    cursor: default;
}

.rentals-contract-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
    padding: 16px 22px;
    background: var(--rentals-primary, #337ab7);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    border: 0;
    cursor: pointer;
    transition: filter 0.2s ease, gap 0.2s ease;
}

.rentals-contract-card-cta i {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.rentals-contract-card-cta:hover,
.rentals-contract-card-cta:focus {
    background: var(--rentals-primary, #337ab7);
    color: #fff;
    text-decoration: none;
    filter: brightness(0.92);
}

.rentals-contract-card-cta:hover i {
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .rentals-contract-card-head {
        padding: 18px 18px 14px;
    }
    .rentals-contract-card-price-section {
        padding: 16px 18px 18px;
    }
    .rentals-contract-card-meta {
        padding-left: 18px;
        padding-right: 18px;
    }
    .rentals-contract-card-highlights {
        padding-left: 18px;
        padding-right: 18px;
    }
    .rentals-contract-card-price-value {
        font-size: 30px;
    }
}

/* -------- Contract booking form (tariff-aware flow) --------
   Scoped to .rental-contract-form[data-rental-type] so the legacy free-form flow
   keeps its original styles. Reuses --rentals-primary / --rentals-primary-rgb. */

.rental-contract-form[data-rental-type] .rental-contract-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.rental-contract-form[data-rental-type] .rental-contract-title > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.12);
    color: var(--rentals-primary, #337ab7);
    border-radius: 50%;
    font-size: 16px;
}

.rental-contract-form[data-rental-type] .rental-contract-title strong {
    color: var(--rentals-primary, #337ab7);
    font-weight: 700;
}

.rental-contract-form[data-rental-type] .rental-contract-wrapper {
    background: #fff;
    border: 1px solid #ecedef;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    /* overflow intentionally visible so floating pickers (SVG timepicker, datepicker
       dropdown) can extend outside the card without being clipped */
}

.rental-contract-form[data-rental-type] .rental-contract-selected-template {
    padding: 22px 26px;
    background: linear-gradient(135deg,
        rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.06) 0%,
        rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.02) 100%);
    border-bottom: 1px solid rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.10);
    border-radius: 14px 14px 0 0;
    position: relative;
    overflow: hidden;
}

.rental-contract-form[data-rental-type] .rental-contract-selected-template::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--rentals-primary, #337ab7);
}

.rental-contract-form[data-rental-type] .rental-contract-selected-template-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.rental-contract-form[data-rental-type] .rental-contract-selected-template-name i {
    color: var(--rentals-primary, #337ab7);
    font-size: 18px;
}

.rental-contract-form[data-rental-type] .rental-contract-selected-template-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 30px;
    font-weight: 800;
    color: var(--rentals-primary, #337ab7);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.rental-contract-form[data-rental-type] .rental-contract-selected-template-price small {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

/* Tariff picker on the booking form. Shows up when the price group offers
   2+ age-less tiers ("Standard" / "Premium" / …). The heading uses the shared
   .rentals-section-subheading style (matching the "Gäste" block); options
   stack vertically as radios; active option highlights via brand colour. */
.rentals-tariff-picker {
    margin: 16px 0;
}

.rentals-tariff-picker-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rentals-tariff-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #dde1e6;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.rentals-tariff-option:hover {
    border-color: var(--rentals-primary, #337ab7);
}

.rentals-tariff-option.is-active {
    border-color: var(--rentals-primary, #337ab7);
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.06);
}

.rentals-tariff-option input[type="radio"] {
    margin: 0;
}

.rentals-tariff-option-name {
    flex: 1 1 auto;
}

.rentals-tariff-option-price {
    font-weight: 700;
    color: var(--rentals-primary, #337ab7);
}

.rental-contract-form[data-rental-type] .rental-contract-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0 0 12px;
}

.rental-contract-form[data-rental-type] .rental-contract-section-label i {
    color: var(--rentals-primary, #337ab7);
    font-size: 14px;
}

.rental-contract-form[data-rental-type] .rental-contract-section-label .required {
    color: #d9534f;
    font-weight: 500;
    margin-left: 2px;
}

.rental-contract-form[data-rental-type] .rental-contract-body {
    margin: 0;
}

.rental-contract-form[data-rental-type] .rental-contract-body-main,
.rental-contract-form[data-rental-type] .rental-contract-body-side {
    padding: 0;
}

.rental-contract-form[data-rental-type] .rental-contract-body-side {
    border-left: 1px solid #eef0f3;
    background: #fafbfc;
}

.rental-contract-form[data-rental-type] .rental-contract-recurrence,
.rental-contract-form[data-rental-type] .rental-contract-start-group,
.rental-contract-form[data-rental-type] .rental-contract-calendar-wrapper,
.rental-contract-form[data-rental-type] .rental-contract-first-period-preview,
.rental-contract-form[data-rental-type] .rental-contract-daily-hint {
    margin: 0;
    padding: 22px 26px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #eef0f3;
}

.rental-contract-form[data-rental-type] .rental-contract-body-main > :last-child,
.rental-contract-form[data-rental-type] .rental-contract-body-side > :last-child {
    border-bottom: 0;
}

@media (max-width: 991px) {
    .rental-contract-form[data-rental-type] .rental-contract-body-side {
        border-left: 0;
        border-top: 1px solid #eef0f3;
    }
}

.rental-contract-form[data-rental-type] .rental-contract-daily-hint {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #374151;
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.05);
}

.rental-contract-form[data-rental-type] .rental-contract-daily-hint::before {
    content: "";
    width: 0;
    height: 0;
}

.rental-contract-form[data-rental-type] .rental-contract-daily-hint i {
    color: var(--rentals-primary, #337ab7);
    font-size: 18px;
    margin-top: 1px;
}

/* Weekday pills */
.rental-contract-form[data-rental-type] .rental-contract-weekdays {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.rental-contract-form[data-rental-type] .rental-contract-weekday {
    margin: 0;
    cursor: pointer;
    position: relative;
}

.rental-contract-form[data-rental-type] .rental-contract-weekday input[type="checkbox"],
.rental-contract-form[data-rental-type] .rental-contract-weekday input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rental-contract-form[data-rental-type] .rental-contract-weekday span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    background: #fff;
    border: 1px solid #d5d8dd;
    border-radius: 999px;
    transition: all 0.15s ease;
}

.rental-contract-form[data-rental-type] .rental-contract-weekday:hover span {
    border-color: var(--rentals-primary, #337ab7);
    color: var(--rentals-primary, #337ab7);
}

.rental-contract-form[data-rental-type] .rental-contract-weekday input[type="checkbox"]:checked + span,
.rental-contract-form[data-rental-type] .rental-contract-weekday input[type="radio"]:checked + span {
    background: var(--rentals-primary, #337ab7);
    border-color: var(--rentals-primary, #337ab7);
    color: #fff;
}

/* Form inputs */
.rental-contract-form[data-rental-type] .rental-contract-times .form-group,
.rental-contract-form[data-rental-type] .rental-contract-start-group {
    margin-bottom: 0;
}

.rental-contract-form[data-rental-type] .rental-contract-times .form-group label,
.rental-contract-form[data-rental-type] .rental-contract-start-group > label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 6px;
}

.rental-contract-form[data-rental-type] .rental-contract-times .form-group label i,
.rental-contract-form[data-rental-type] .rental-contract-start-group > label i {
    color: var(--rentals-primary, #337ab7);
}

.rental-contract-form[data-rental-type] .rental-contract-wrapper .form-control {
    height: 42px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #d5d8dd;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rental-contract-form[data-rental-type] .rental-contract-wrapper .form-control:focus {
    border-color: var(--rentals-primary, #337ab7);
    box-shadow: 0 0 0 3px rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.15);
    outline: 0;
}

.rental-contract-form[data-rental-type] .rental-contract-datepicker {
    max-width: 220px;
}

/* Calendar preview */
.rental-contract-form[data-rental-type] .rental-contract-calendar {
    margin-top: 4px;
    padding: 12px;
    background: #f7f8fa;
    border: 1px solid #eef0f3;
    border-radius: 10px;
}

.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker,
.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker-inline {
    width: 100%;
    border: 0;
    background: transparent;
}

.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker-days,
.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker-months,
.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker-years {
    width: 100%;
}

.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker table {
    width: 100%;
    table-layout: fixed;
}

.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker td,
.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker th {
    padding: 6px 0;
}

/* Preview day marks (weekday slots + DAILY range) */
.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker td.day.rental-contract-day-slot {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.22) !important;
    color: var(--rentals-primary, #337ab7) !important;
    font-weight: 600;
    border-radius: 6px;
}

.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker td.day.rental-contract-day-range-start,
.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker td.day.rental-contract-day-range-end {
    background: var(--rentals-primary, #337ab7) !important;
    color: #fff !important;
    font-weight: 700;
}

.rental-contract-form[data-rental-type] .rental-contract-calendar .datepicker td.day.rental-contract-day-range-middle {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.18) !important;
    color: var(--rentals-primary, #337ab7) !important;
}

/* Start-date picker: unavailable weekdays (not in the chosen weekday) get a soft disabled look */
.rental-contract-form[data-rental-type] #rentalContractStart + .datepicker td.day.rental-contract-weekday-off,
.rental-contract-form[data-rental-type] .datepicker-dropdown td.day.rental-contract-weekday-off {
    background: #f3f4f6 !important;
    color: #bbb !important;
}

.rental-contract-form[data-rental-type] .datepicker-dropdown td.day.rental-contract-weekday-on {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.10) !important;
    color: var(--rentals-primary, #337ab7) !important;
    font-weight: 600;
}

/* First-period rate preview */
.rental-contract-form[data-rental-type] .rental-contract-first-period-preview p {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #55606e;
}

.rental-contract-form[data-rental-type] .rental-contract-first-period-preview p i {
    color: var(--rentals-primary, #337ab7);
    margin-top: 2px;
}

/* Availability feedback */
.rental-contract-form[data-rental-type] .rental-contract-availability {
    margin: 0;
    padding: 0 26px;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: none;
}

.rental-contract-form[data-rental-type] .rental-contract-availability.is-available,
.rental-contract-form[data-rental-type] .rental-contract-availability.is-blocked {
    display: block;
    padding: 14px 26px;
    border-top: 1px solid #eef0f3;
}

.rental-contract-form[data-rental-type] .rental-contract-availability.is-available {
    background: #eaf7ea;
    color: #2b662b;
}

.rental-contract-form[data-rental-type] .rental-contract-availability.is-blocked {
    background: #fdecee;
    color: #842029;
}

/* Submit button — matches the CTA on the contract selection cards */
.rental-contract-form[data-rental-type] .rental-contract-submit {
    margin: 0;
    padding: 0;
    text-align: left;
}

.rental-contract-form[data-rental-type] .rental-contract-submit .btn,
.rental-contract-form[data-rental-type] .rental-contract-submit button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 22px !important;
    margin: 0;
    background: var(--rentals-primary, #337ab7) !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 0 !important;
    border-radius: 0 0 14px 14px !important;
    box-shadow: none !important;
    transition: filter 0.2s ease;
}

.rental-contract-form[data-rental-type] .rental-contract-submit .btn:hover,
.rental-contract-form[data-rental-type] .rental-contract-submit button[type="submit"]:hover,
.rental-contract-form[data-rental-type] .rental-contract-submit .btn:focus,
.rental-contract-form[data-rental-type] .rental-contract-submit button[type="submit"]:focus {
    background: var(--rentals-primary, #337ab7) !important;
    color: #fff !important;
    filter: brightness(0.92);
    outline: 0;
}

/* Warning/info alerts inside the form keep subtle spacing */
.rental-contract-form[data-rental-type] .rental-contract-wrapper .alert {
    margin: 22px 26px;
    border-radius: 10px;
}

@media (max-width: 767px) {
    .rental-contract-form[data-rental-type] .rental-contract-selected-template,
    .rental-contract-form[data-rental-type] .rental-contract-recurrence,
    .rental-contract-form[data-rental-type] .rental-contract-start-group,
    .rental-contract-form[data-rental-type] .rental-contract-calendar-wrapper,
    .rental-contract-form[data-rental-type] .rental-contract-first-period-preview,
    .rental-contract-form[data-rental-type] .rental-contract-daily-hint {
        padding-left: 18px;
        padding-right: 18px;
    }
    .rental-contract-form[data-rental-type] .rental-contract-selected-template-price {
        font-size: 26px;
    }
    .rental-contract-form[data-rental-type] .rental-contract-title {
        font-size: 20px;
    }
}

/* -------- Available units -------- */

.rentals-available-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.rentals-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #555;
}

.rentals-summary-item strong {
    color: #333;
}

.rentals-summary-item small {
    color: #999;
}

.rentals-unit-grid {
    display: flex;
    flex-wrap: wrap;
}

.rentals-unit-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.rentals-unit-card:hover {
    border-color: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.28);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}

.rentals-unit-card .rentals-unit-card-cta.btn {
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 10px 16px;
}

.rentals-unit-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 180px;                /* fallback for browsers without aspect-ratio support */
    background: #f3f3f3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rentals-unit-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rentals-unit-card-placeholder {
    color: #bbb;
    font-size: 54px;
    min-height: 180px;
}

.rentals-unit-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.rentals-unit-card-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
}

.rentals-unit-card-meta {
    margin: 0 0 4px;
    font-size: 13px;
    color: #666;
}

.rentals-unit-card-price {
    margin: 12px 0;
    padding: 10px 12px;
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.05);
    border-radius: 3px;
    text-align: center;
}

.rentals-unit-card-price-amount {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--rentals-primary, #337ab7);
}

.rentals-unit-card-price-prefix {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 2px;
}

.rentals-unit-card-price-label {
    display: block;
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rentals-unit-card-price-discount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e3f4e3;
    color: #2b662b;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.rentals-unit-card-price-breakdown {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    color: #777;
}

.rentals-unit-card-price-base {
    text-decoration: line-through;
    color: #aaa;
}

.rentals-unit-card-price-sep {
    font-size: 13px;
    color: #777;
}

.rentals-unit-card-price-percent {
    color: #2b662b;
    font-weight: 600;
}

.rentals-unit-card-price-netto {
    display: inline;
    margin-left: 4px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    color: #999;
}

.rentals-unit-card-cta {
    margin-top: auto;
}

/* -------- Unit detail (show) -------- */

.rentals-unit-detail-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.rentals-unit-detail-image-box {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f3f3f3;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rentals-unit-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.rentals-unit-detail-image-placeholder {
    color: #bbb;
    font-size: 64px;
}

.rentals-unit-carousel {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background: #1a1a1a;
    max-height: 520px;
}

.rentals-unit-carousel .carousel-inner .item {
    background: #1a1a1a;
    text-align: center;
}

.rentals-unit-carousel .carousel-inner a {
    display: block;
    cursor: zoom-in;
}

.rentals-unit-carousel .carousel-inner img {
    display: inline-block;
    max-width: 100%;
    max-height: 520px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* thumbnail strip underneath the main image */
.rentals-unit-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.rentals-unit-gallery-thumb {
    width: 64px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: opacity 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

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

.rentals-unit-gallery-thumb:hover {
    opacity: 1;
}

.rentals-unit-gallery-thumb.is-active {
    border-color: var(--rentals-primary, #337ab7);
    opacity: 1;
}

.rentals-unit-carousel-ctrl {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    text-decoration: none;
    transition: background 0.15s ease;
}

.rentals-unit-carousel-ctrl:hover,
.rentals-unit-carousel-ctrl:focus {
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    text-decoration: none;
}

.rentals-unit-carousel-prev { left: 12px; }
.rentals-unit-carousel-next { right: 12px; }

.rentals-unit-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 4;
    text-align: center;
}

.rentals-unit-carousel-dots li {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.15);
    text-indent: -9999px;
}

.rentals-unit-carousel-dots li.active {
    width: 12px;
    height: 12px;
    background: #fff;
    border-color: rgba(0, 0, 0, 0.25);
}

.rentals-unit-detail-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.25;
}

.rentals-unit-detail-category {
    color: #666;
    margin: 0 0 18px;
    font-size: 14px;
}

.rentals-unit-detail-meta {
    margin: 0 0 20px;
    padding: 14px 16px;
    background: #f7f8fa;
    border-radius: 6px;
    font-size: 14px;
}

.rentals-unit-detail-meta li {
    padding: 3px 0;
    color: #444;
}

.rentals-unit-detail-meta li i {
    width: 18px;
    color: #8391a5;
    margin-right: 6px;
}

.rentals-unit-detail-equipment {
    margin-bottom: 20px;
}

.rentals-unit-detail-equipment h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}

.rentals-unit-detail-equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 12px;
    font-size: 14px;
    color: #444;
    margin: 0;
}

.rentals-unit-detail-equipment-list li i {
    margin-right: 6px;
}

.rentals-unit-detail-description {
    color: #555;
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 20px;
}

.rentals-unit-detail-actions {
    margin-top: 10px;
}

/* ============================================================
   Availability flow: calendar + units + details modal
   ============================================================ */

.rentals-availability-help {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.10);
    border: 1px solid rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.28);
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 14px;
    color: var(--rentals-primary, #2b5e8d);
    font-size: 14px;
}

.rentals-availability-help i {
    margin-right: 6px;
}

.rentals-availability-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 6px 0 14px;
    font-size: 13px;
    color: #555;
}

.rentals-availability-legend .legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.rentals-availability-legend .dot-free     { background: #eafaef; }
.rentals-availability-legend .dot-partial  { background: #fff6d5; }
.rentals-availability-legend .dot-full     { background: #fcebed; }
.rentals-availability-legend .dot-inactive { background: #f3f4f6; }
.rentals-availability-legend .dot-arrival  { background: linear-gradient(to top left, #fcebed 50%, #eafaef 50%); }
.rentals-availability-legend .dot-departure{ background: linear-gradient(to bottom right, #fcebed 50%, #eafaef 50%); }

.rentals-availability-calendar {
    position: relative;
    z-index: 0;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* bootstrap-datepicker inline sizing + theming (full width, no internal z-index overlay) */
.rentals-availability-calendar .datepicker-inline {
    width: 100%;
    max-width: none;
    border: 0;
    padding: 0;
    z-index: auto;
}

/* bootstrap-datepicker's inline variant sometimes sets a stacking context high
   enough to float above modals — pin its stack down explicitly */
.rentals-availability-calendar .datepicker,
.rentals-availability-calendar .datepicker-inline,
.rentals-availability-calendar .datepicker-days {
    z-index: 0 !important;
}

.rentals-availability-calendar .datepicker table {
    width: 100%;
    table-layout: fixed;
    font-size: 14px;
}

.rentals-availability-calendar .datepicker table thead tr:first-child th {
    font-size: 15px;
    font-weight: 600;
    padding: 8px 4px;
}

.rentals-availability-calendar .datepicker table tbody td,
.rentals-availability-calendar .datepicker table tbody td.day {
    border-radius: 4px;
    padding: 10px 0;
    font-weight: 500;
    transition: background 0.12s ease, color 0.12s ease;
}

/* availability status tinting */
/* hide the leading/trailing days of adjacent months — bootstrap-datepicker
   renders them (.old / .new) to keep the 7-column grid intact, but we want a
   clean month view. visibility:hidden keeps the cell size so the grid stays. */
.rentals-availability-calendar .datepicker td.day.old,
.rentals-availability-calendar .datepicker td.day.new {
    visibility: hidden;
}

.rentals-availability-calendar .datepicker td.day.rentals-day-free     { background: #eafaef; color: #1f5f32; }
.rentals-availability-calendar .datepicker td.day.rentals-day-partial  { background: #fff6d5; color: #7a5a00; }
.rentals-availability-calendar .datepicker td.day.rentals-day-full     { background: #fcebed; color: #842029; cursor: not-allowed; }
.rentals-availability-calendar .datepicker td.day.rentals-day-inactive,
.rentals-availability-calendar .datepicker td.day.disabled              { background: #f3f4f6; color: #bbb; cursor: not-allowed; }

.rentals-availability-calendar .datepicker td.day.rentals-day-free:hover,
.rentals-availability-calendar .datepicker td.day.rentals-day-partial:hover {
    background: #cfe5d9;
    color: #1f5f32;
}

/* Existing booking's check-in day: free top-left, occupied bottom-right (arrival) */
.rentals-availability-calendar .datepicker td.day.rentals-day-arrival {
    background: linear-gradient(to top left, #fcebed 50%, #eafaef 50%);
    color: #7a5a00;
}

/* Existing booking's check-out day: occupied top-left, free bottom-right (departure) */
.rentals-availability-calendar .datepicker td.day.rentals-day-departure {
    background: linear-gradient(to bottom right, #fcebed 50%, #eafaef 50%);
    color: #7a5a00;
}

/* range-middle: the whole day is part of the chosen booking */
.rentals-availability-calendar .datepicker td.day.rentals-range-middle {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.28) !important;
    color: var(--rentals-primary, #1f3f5d) !important;
    font-weight: 500;
}

/* range start: arriving on this day → bottom-right filled with primary, top-left still free (green) */
.rentals-availability-calendar .datepicker td.day.rentals-range-start {
    background: linear-gradient(to top left, var(--rentals-primary, #337ab7) 50%, #eafaef 50%) !important;
    color: var(--rentals-primary, #1f3f5d) !important;
    font-weight: 700;
}

/* range end: leaving on this day → top-left filled with primary, bottom-right free again (green) */
.rentals-availability-calendar .datepicker td.day.rentals-range-end {
    background: linear-gradient(to bottom right, var(--rentals-primary, #337ab7) 50%, #eafaef 50%) !important;
    color: var(--rentals-primary, #1f3f5d) !important;
    font-weight: 700;
}

/* range single: whole day selected */
.rentals-availability-calendar .datepicker td.day.rentals-range-single {
    background: var(--rentals-primary, #337ab7) !important;
    color: #fff !important;
    font-weight: 700;
}

/* suppress bootstrap-datepicker's built-in "active" style (we drive visuals ourselves) */
.rentals-availability-calendar .datepicker td.day.active:not(.rentals-range-start):not(.rentals-range-end):not(.rentals-range-single),
.rentals-availability-calendar .datepicker td.day.active:hover {
    background: inherit !important;
    color: inherit !important;
}

.rentals-hourly-input {
    padding: 10px 14px;
    background: #f7f8fa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 12px;
}

.rentals-hourly-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.rentals-hourly-input label {
    margin: 0;
    font-weight: 600;
    color: #444;
    flex: 0 0 auto;
}

.rentals-hourly-input input[type="time"],
.rentals-hourly-input .rentals-time-field {
    flex: 1 1 90px;
    min-width: 0;
    max-width: 130px;
}

.rentals-hourly-hint {
    flex: 1 1 100%;
    font-size: 12px;
    color: #888;
    margin: 4px 0 0;
}

@media (max-width: 540px) {
    .rentals-hourly-input-row {
        gap: 6px;
    }
    .rentals-hourly-input label {
        font-size: 13px;
    }
    .rentals-hourly-input input[type="time"],
    .rentals-hourly-input .rentals-time-field {
        flex: 1 1 0;
        max-width: none;
    }
}

.rentals-hourly-hint.is-error {
    color: #842029;
    font-weight: 600;
}

/* start/end chip picker — replaces the clock-picker on the availability flow */
.rentals-chip-group {
    margin-bottom: 10px;
}

/* flat-tariff hint inside the hourly-input box */
.rentals-flat-duration-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-bottom: 10px;
    border-radius: 16px;
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.07);
    color: var(--rentals-primary, #1f3f5d);
    font-size: 13px;
    font-weight: 500;
}

.rentals-flat-duration-info i {
    color: var(--rentals-primary, #337ab7);
}

.rentals-chip-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    margin-bottom: 4px;
}

.rentals-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
    align-items: center;
}

.rentals-chip {
    border: 1px solid #d0d4da;
    background: #fff;
    color: #333;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

.rentals-chip:hover {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.07);
    border-color: var(--rentals-primary, #337ab7);
    color: var(--rentals-primary, #1f3f5d);
}

.rentals-chip.is-active {
    background: var(--rentals-primary, #337ab7);
    border-color: var(--rentals-primary, #337ab7);
    color: #fff;
}

.rentals-chip.is-disabled,
.rentals-chip[disabled] {
    background: #f3f4f6;
    border-color: #e1e3e8;
    color: #9aa1a8;
    cursor: not-allowed;
    text-decoration: line-through;
}

.rentals-chip.is-disabled:hover,
.rentals-chip[disabled]:hover {
    background: #f3f4f6;
    border-color: #e1e3e8;
    color: #9aa1a8;
}

.rentals-chip-hint {
    color: #888;
    font-size: 13px;
    font-style: italic;
}

/* desktop analog clock-picker — mobile browsers keep their native type="time" picker */
.rentals-time-wrapper {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    flex: 1 1 90px;
    min-width: 0;
    max-width: 140px;
}

.rentals-time-wrapper .rentals-time-field {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding-right: 30px;
    cursor: pointer;
    background: #fff;
}

.rentals-time-trigger {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: #777;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.12s ease;
}

.rentals-time-trigger:hover,
.rentals-time-wrapper.is-open .rentals-time-trigger {
    color: var(--rentals-primary, #337ab7);
}

.rentals-time-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 60;
    display: none;
    background: #fff;
    border: 1px solid #d5d8dd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    padding: 14px 14px 10px;
    width: 248px;
    user-select: none;
}

.rentals-time-wrapper.is-open .rentals-time-dropdown {
    display: block;
}

.rentals-time-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    font-size: 32px;
    font-weight: 300;
    color: #333;
    margin-bottom: 10px;
    line-height: 1;
}

.rentals-time-dpart {
    border: 0;
    background: transparent;
    padding: 4px 6px;
    border-radius: 4px;
    font: inherit;
    color: #888;
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease;
}

.rentals-time-dpart:hover { color: var(--rentals-primary, #337ab7); }

.rentals-time-dpart.is-active {
    color: var(--rentals-primary, #1f3f5d);
    font-weight: 500;
}

.rentals-time-dsep {
    color: #888;
    padding: 0 2px;
    font-weight: 300;
}

.rentals-time-svg {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
}

.rentals-time-face {
    fill: #f4f6fa;
    stroke: #e0e4ea;
    stroke-width: 1;
}

.rentals-time-hand {
    stroke: var(--rentals-primary, #337ab7);
    stroke-width: 2;
    stroke-linecap: round;
}

.rentals-time-tip {
    fill: var(--rentals-primary, #337ab7);
}

.rentals-time-pivot {
    fill: var(--rentals-primary, #337ab7);
}

.rentals-time-digit {
    font-size: 14px;
    font-weight: 500;
    fill: #333;
    pointer-events: none;
}

.rentals-time-digit.is-inner {
    font-size: 11px;
    fill: #777;
}

/* when the picker appears inside a .form-group/.row (book-contract) anchor under control */
.form-group .rentals-time-wrapper,
.rental-contract-times .rentals-time-wrapper {
    width: 100%;
    max-width: none;
}

/* keep digit legible over the hand by letting the hand render under the digits */
.rentals-time-svg .rentals-time-digits {
    pointer-events: none;
}

.rentals-hourly-schedule {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 4px 14px;
    font-size: 12px;
    color: #666;
}

.rentals-hourly-schedule li {
    display: flex;
    gap: 6px;
    padding: 2px 0;
}

.rentals-hourly-schedule-day {
    font-weight: 700;
    color: #333;
    min-width: 28px;
}

.rentals-hourly-schedule-slots {
    color: #555;
}

/* Schedule accordion: collapses the weekday opening-hours list so it doesn't
   eat the chip rows' vertical space. Default state is collapsed; the toggle
   button reveals the schedule on demand. */
.rentals-schedule-accordion {
    margin-top: 10px;
    border: 1px solid #eceff3;
    border-radius: 3px;
    background: #f7f8fa;
}

.rentals-schedule-accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    border-radius: 3px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease;
}

.rentals-schedule-accordion-header:hover,
.rentals-schedule-accordion-header:focus {
    background: #eef1f4;
    outline: none;
}

.rentals-schedule-accordion-label {
    flex: 1 1 auto;
}

.rentals-schedule-accordion-chevron {
    transition: transform 0.2s ease;
    color: #888;
}

.rentals-schedule-accordion.is-expanded .rentals-schedule-accordion-chevron {
    transform: rotate(180deg);
}

.rentals-schedule-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.rentals-schedule-accordion.is-expanded .rentals-schedule-accordion-body {
    /* Generous max-height so all 7 weekdays in 2 columns fit without scrolling. */
    max-height: 240px;
}

/* The schedule list inside the accordion: drop the standalone background/border
   (the wrapper already provides them) and tighten the spacing. */
.rentals-schedule-accordion-body .rentals-hourly-schedule {
    margin: 0;
    padding: 8px 12px 10px;
}

.rentals-availability-selection {
    min-height: 24px;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--rentals-primary, #2b5e8d);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rentals-selection-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(132, 32, 41, 0.08);
    color: #842029;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.rentals-selection-clear:hover,
.rentals-selection-clear:focus {
    background: #842029;
    color: #fff;
    text-decoration: none;
}

.rentals-availability-hint {
    padding: 14px;
    text-align: center;
    color: #888;
    font-size: 14px;
    background: #fafbfc;
    border: 1px dashed #dcdfe3;
    border-radius: 4px;
}

.rentals-availability-loading {
    padding: 30px 0;
    color: #888;
}

.rentals-unit-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.rentals-modal-loading {
    padding: 40px 0;
    color: #888;
}

/* Fancybox must render ABOVE Bootstrap modals (Modal is z-index 10050) */
.fancybox-overlay     { z-index: 11000 !important; }
.fancybox-wrap,
.fancybox-opened,
.fancybox-outer,
.fancybox-inner       { z-index: 11020 !important; }
.fancybox-title,
.fancybox-skin        { z-index: 11010 !important; }
.fancybox-nav,
.fancybox-close       { z-index: 11030 !important; }

/* ============================================================
   Book-unit form: summary + guest cards + new guest rows
   ============================================================ */

.rentals-booking-summary {
    background: #f7f8fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.rentals-booking-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 14px;
}

.rentals-booking-summary-label {
    color: #6b7685;
    font-weight: 500;
}

.rentals-booking-summary-label i {
    width: 18px;
    text-align: center;
    margin-right: 4px;
}

.rentals-booking-summary-price {
    border-top: 1px solid #dee2e6;
    margin-top: 6px;
    padding-top: 8px;
    font-size: 16px;
}

.rentals-section-subheading {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
}

.rentals-book-user-name {
    margin: 0 0 18px;
}

.rentals-book-guests, .rentals-book-notes, .rentals-tariff-picker {
    padding: 25px;
}

.rentals-book-guests-hint {
    color: #666;
    font-size: 13px;
}

.rentals-guest-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.rentals-guest-card-wrapper {
    display: flex;
    flex-direction: column;
}

.rentals-guest-card-wrapper .rentals-guest-card {
    width: 100%;
}

.rentals-guest-birthday {
    display: none;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    background: #fff3f4;
    font-size: 13px;
}

.rentals-guest-birthday.is-visible {
    display: block;
}

.rentals-guest-birthday label {
    display: block;
    margin-bottom: 4px;
    color: #842029;
    font-weight: 600;
    font-size: 12px;
}

.rentals-guest-birthday input {
    max-width: 160px;
}

.rentals-guest-birthday-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rentals-guest-birthday-row .form-control {
    flex: 0 1 160px;
}

.rentals-guest-birthday-error {
    margin-top: 6px;
    font-size: 12px;
}

.rentals-book-submit {
    margin-top: 20px;
    text-align: center;
}

.rentals-guest-card.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.rentals-guest-card.is-disabled:hover {
    border-color: #e5e5e5;
    box-shadow: none;
}

.rentals-guest-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    margin: 0;
}

.rentals-guest-card:hover {
    border-color: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.28);
}

.rentals-guest-card.is-selected {
    border-color: var(--rentals-primary, #337ab7);
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.10);
    box-shadow: 0 2px 6px rgba(51, 122, 183, 0.12);
}

.rentals-guest-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rentals-guest-card-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.18);
    color: var(--rentals-primary, #335f89);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.rentals-guest-card.is-selected .rentals-guest-card-avatar {
    background: var(--rentals-primary, #337ab7);
    color: #fff;
}

.rentals-guest-card-body {
    flex: 1;
    min-width: 0;
}

.rentals-guest-card-name {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rentals-guest-card-meta {
    display: block;
    color: #888;
    font-size: 12px;
}

.rentals-guest-card-check {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: #e9ecef;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s ease;
}

.rentals-guest-card.is-selected .rentals-guest-card-check {
    background: var(--rentals-primary, #337ab7);
    color: #fff;
}

.rentals-new-guests {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.rentals-new-guest-row {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 8px 10px;
    background: #fcfcfd;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.rentals-new-guest-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 140px 140px;
    gap: 6px;
    flex: 1;
}

.rentals-new-guest-remove {
    flex: 0 0 auto;
}

.rentals-book-legal {
    margin: 0 0 10px;
    padding: 25px;
    background: #fafbfc;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.rentals-book-legal .checkbox {
    margin: 4px 0;
}

@media (max-width: 700px) {
    .rentals-new-guest-fields {
        grid-template-columns: 1fr 1fr;
    }
}

/* -------- Responsive tuning -------- */

@media (max-width: 600px) {
    .rentals-module .rentals-section-heading {
        font-size: 18px;
    }

    .rentals-mode-card {
        padding: 22px 16px;
    }

    .rentals-mode-card-icon {
        font-size: 36px;
    }

    .rentals-available-summary {
        flex-direction: column;
        gap: 8px;
    }

    .rentals-template-card-dates {
        flex-direction: column;
    }
}

/* ===== Configure-Contract: unit grid + summary styles (P5 frontend) ===== */

/* Wrapper around the unit grid on the configure-contract page. The label acts as a
   section heading; the grid itself is a full-width band under the two-column form. */
.rentals-configure-contract .rental-contract-units-section {
    padding: 22px 26px;
    border-top: 1px solid #eef0f3;
    background: #fafbfc;
}

.rentals-configure-contract .rental-contract-units-heading {
    margin-bottom: 16px;
}

.rentals-configure-contract #rentalContractUnitGrid {
    position: relative;
    min-height: 120px;
}

.rentals-configure-contract #rentalContractUnitGrid.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.rentals-configure-contract #rentalContractUnitGrid .rentals-empty-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 22px;
    background: #fff;
    border: 1px dashed #d5d8dd;
    border-radius: 10px;
    color: #6b7280;
    font-size: 14px;
}

.rentals-configure-contract #rentalContractUnitGrid .rentals-empty-hint i {
    color: var(--rentals-primary, #337ab7);
    font-size: 18px;
}

.rentals-configure-contract .rental-contract-unit-row {
    margin: 0 -12px;
}

/* Unit-card anchor: keep the card-level :hover styles while making the whole tile
   clickable and removing the default link underline. */
.rentals-configure-contract .rental-contract-unit-card {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.rentals-configure-contract .rental-contract-unit-card:hover,
.rentals-configure-contract .rental-contract-unit-card:focus {
    text-decoration: none;
    color: inherit;
}

.rentals-configure-contract .rental-contract-unit-cta .btn {
    background: var(--rentals-primary, #337ab7);
    border-color: var(--rentals-primary, #337ab7);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 767px) {
    .rentals-configure-contract .rental-contract-units-section {
        padding: 18px;
    }
}

/* ===== Summary view on book-contract (after configure) ===== */

.rental-contract-summary-view .rental-contract-summary {
    padding: 22px 26px;
    border-bottom: 1px solid #eef0f3;
}

.rental-contract-summary-view .rental-contract-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.rental-contract-summary-view .rental-contract-summary-unit {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #fafbfc;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    padding: 12px;
}

.rental-contract-summary-view .rental-contract-summary-unit-image {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rental-contract-summary-view .rental-contract-summary-unit-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rental-contract-summary-view .rental-contract-summary-unit-placeholder {
    color: #bbb;
    font-size: 32px;
}

.rental-contract-summary-view .rental-contract-summary-unit-text strong {
    display: block;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 4px;
}

.rental-contract-summary-view .rental-contract-summary-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rental-contract-summary-view .rental-contract-summary-meta li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.rental-contract-summary-view .rental-contract-summary-meta i {
    color: var(--rentals-primary, #337ab7);
    width: 16px;
    text-align: center;
}

.rental-contract-summary-view .rental-contract-summary-meta-label {
    color: #6b7280;
}

@media (max-width: 767px) {
    .rental-contract-summary-view .rental-contract-summary {
        padding: 18px;
    }
    .rental-contract-summary-view .rental-contract-summary-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ============================================================
   Availability — Variant C (dual calendar + side summary box)
   Legend renders on its own full-width row above a two-column grid:
   left column = two consecutive months side-by-side (month N + N+1,
   rendered by two bootstrap-datepicker instances kept in sync by
   rentals.js). Right column = summary / time-picker box, starting
   at the same top edge as the calendar. Available units render at
   full width below both columns.
   Consumes the brand tokens --rentals-primary / --rentals-primary-rgb
   already exposed on the .rentals-module wrapper.
   ============================================================ */

.rentals-availability-vc .vc-h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 14px;
}

.rentals-availability-vc .vc-alert {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.08);
    border: 1px solid rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.2);
    color: var(--rentals-primary, #2b5e8d);
    border-radius: 3px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

.rentals-availability-vc .vc-alert i {
    margin-right: 6px;
}

/* Legend on its own full-width row above the two-column grid */
.rentals-availability-vc .vc-legend {
    margin-bottom: 14px;
}

/* Flexbox row so the side box stretches to the calendar's height. Overrides
   Bootstrap 3's float-based col layout (flex ignores floats, col widths stay
   through the .col-md-* width rules). */
.rentals-availability-vc .vc-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-left: -10px;
    margin-right: -10px;
}

.rentals-availability-vc .vc-col-main,
.rentals-availability-vc .vc-col-side-wrap {
    display: flex;
    padding-left: 10px;
    padding-right: 10px;
}

.rentals-availability-vc .vc-col-main > .rentals-calendar-dual,
.rentals-availability-vc .vc-col-side-wrap > .vc-side {
    width: 100%;
}

/* Dual-calendar container: two datepickers sit side-by-side with a divider.
   Each picker renders via bootstrap-datepicker's inline markup; only the outer
   border/radius live on the container so both halves look like one unit. */
.rentals-availability-vc .vc-cal-wrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.rentals-availability-vc .vc-cal {
    flex: 1 1 50%;
    min-width: 0;
    padding: 6px 4px;
    /* neutralise the standalone calendar's border/box-shadow — the outer .vc-cal-wrap owns them */
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.rentals-availability-vc .vc-cal-next {
    border-left: 1px solid #e5e5e5;
}

/* Strip the double row of prev/next arrows: keep « only on the left calendar
   and » only on the right — navigation still moves both months together via
   the changeMonth sync handlers in rentals.js. */
.rentals-availability-vc .vc-cal:not(.vc-cal-next) .datepicker-days th.next { visibility: hidden; }
.rentals-availability-vc .vc-cal-next .datepicker-days th.prev { visibility: hidden; }

/* Units section lives outside the two-column grid on its own full-width row */
.rentals-availability-vc .vc-units-full {
    margin-top: 14px;
}

/* Summary / time-picker box on the right: matches the calendar's height via the
   flexbox row, uses an internal column-flex so the top (summary hero) stays
   fixed and the body (chip groups, schedule, hint) takes the remaining space.
   Overflow is owned by the inner chip rows — the box itself never scrolls. */
.rentals-availability-vc .vc-side {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rentals-availability-vc .vc-side-top {
    position: relative;
    background: var(--rentals-primary, #337ab7);
    color: #fff;
    padding: 14px 18px;
}

.rentals-availability-vc .vc-kicker {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.75;
    margin-bottom: 4px;
}

.rentals-availability-vc .vc-selection {
    color: #fff;
    min-height: 22px;
    /* override the default flex layout so vc-date-big + vc-dur stack vertically */
    display: block;
    margin-bottom: 0;
}

.rentals-availability-vc .vc-date-big {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.rentals-availability-vc .vc-dur {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 4px;
}

/* Clear-icon sits on the dark hero → pin it to the corner and reset the default
   badge styling (red circle) so it reads as a subtle inverse X. */
.rentals-availability-vc .vc-selection .rentals-selection-clear {
    position: absolute;
    top: 10px;
    right: 12px;
    width: auto;
    height: auto;
    padding: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    font-size: 13px;
    line-height: 1;
}

.rentals-availability-vc .vc-selection .rentals-selection-clear:hover,
.rentals-availability-vc .vc-selection .rentals-selection-clear:focus {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Body grows to fill the remaining space under the hero; each chip group gets
   an equal share of that space and scrolls on its own if the raster exceeds it */
.rentals-availability-vc .vc-side-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 18px 10px;
    display: flex;
    flex-direction: column;
}

.rentals-availability-vc .vc-side-body .rentals-hourly-input {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.rentals-availability-vc .vc-side-body .rentals-chip-group {
    flex: 1 1 auto;
    /* Keep the chip group from collapsing to 0 when the schedule accordion
       is expanded — at least one chip row (~80px) plus its label stays visible. */
    min-height: 100px;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
}

.rentals-availability-vc .vc-side-body .rentals-chip-row {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    /* soften the inner scroll edge so chips don't touch the bar */
    padding-right: 2px;
    align-content: flex-start;
}

.rentals-availability-vc .vc-side-body .rentals-hourly-schedule {
    /* Background/border now live on .rentals-schedule-accordion (the wrapper),
       so the list itself stays neutral. Force exactly two columns so all seven
       weekdays fit inside the narrow aside without an inner scrollbar. */
    font-size: 12px;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 10px;
}

.rentals-availability-vc .vc-side-body .rentals-flat-duration-info {
    background: rgba(var(--rentals-primary-rgb, 51, 122, 183), 0.08);
    border-left: 3px solid var(--rentals-primary, #337ab7);
    padding: 6px 10px;
    border-radius: 0 3px 3px 0;
    font-size: 12px;
    color: var(--rentals-primary, #2b5e8d);
    margin-bottom: 10px;
}

/* Tablet / small desktop: stack right-column box under the calendar */
@media (max-width: 991px) {
    .rentals-availability-vc .vc-side {
        margin-top: 18px;
    }
}

/* Phone: hide the paired calendar — two months no longer fit readably and
   bootstrap-datepicker's single-month view stays fully navigable via the
   arrows on the visible picker (paired sync listener is harmless when hidden) */
@media (max-width: 767px) {
    .rentals-availability-vc .vc-cal-wrap {
        flex-wrap: wrap;
    }
    .rentals-availability-vc .vc-cal-next {
        display: none;
    }
}

/* ============================================================
   Book-Unit — small additions on top of the contract-booking styles
   Book-unit's wrapper carries `.rental-contract-form.rental-contract-summary-view`
   with data-rental-type="single", so it inherits the card wrapper, hero
   (selected-template) and summary-card styling. The rules below only cover
   the single-booking-specific tweaks: a bigger gesamtpreis label and the
   warm legal-box heading that ships inside the shared guests/notes/legal
   partial.
   ============================================================ */

.rentals-book-unit .rental-contract-selected-template-price small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

.rentals-book-unit .rentals-book-legal-heading {
    font-size: 12px;
    font-weight: 600;
    color: #8a7a20;
    margin: 0 0 6px;
    line-height: 1.3;
}
