/* Loovie Rent – Product Detail Dark Contrast V3.8
 * Isolated to the product-detail page via :has(form[data-product-rental-form]).
 * Only the existing dark theme is affected. No JavaScript, API, form or prices.
 * Modern Chrome/Edge/Firefox/Safari support :has().
 */

/* Typography, breadcrumb and product metadata. */
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .breadcrumb,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .breadcrumb-item.active {
    color: #c8d4e3 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .breadcrumb a {
    color: #b9d7f5 !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .breadcrumb a:hover,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .breadcrumb a:focus-visible {
    color: #f4d69d !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .breadcrumb-item + .breadcrumb-item::before {
    color: #b3c5da !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) h1,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) h2,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) h3 {
    color: #f3f6fb !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-section-kicker {
    color: #f1c77e !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .text-muted,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .text-body-secondary,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .form-text {
    color: #bfcee0 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-price-lg {
    color: #f2cf87 !important;
}

/* Detail tiles must not retain light backgrounds when night mode is active. */
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-detail-item {
    background: #1a283a !important;
    border: 1px solid #41556b !important;
    color: #ecf2f9 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-detail-item small {
    color: #b8cee5 !important;
    font-weight: 600;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-detail-item strong {
    color: #f4f7fc !important;
}

/* Rental form background and labels. */
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box {
    background: #172334 !important;
    border: 1px solid #40546d !important;
    color: #e9f0fa !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, .2);
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-label {
    color: #e2eaf6 !important;
    font-weight: 650;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-control,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-select {
    color-scheme: dark;
    background-color: #101c2c !important;
    border: 1px solid #49617b !important;
    color: #f2f6fd !important;
    -webkit-text-fill-color: #f2f6fd;
    opacity: 1;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-control::placeholder {
    color: #b9c7d9 !important;
    opacity: 1;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-select option {
    background-color: #172538;
    color: #f2f6fd;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-control:focus,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-select:focus {
    border-color: #e4b879 !important;
    box-shadow: 0 0 0 .2rem rgba(228, 184, 121, .23) !important;
    outline-offset: 1px;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-control:disabled,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .form-select:disabled {
    background-color: #29364b !important;
    color: #d1d9e5 !important;
    -webkit-text-fill-color: #d1d9e5;
    opacity: .9;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.2);
    opacity: .85;
}

/* Information callouts and the editable rental schedule preview. */
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .alert-info {
    background: #183b50 !important;
    border: 1px solid #34748c !important;
    color: #d7f1fa !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .alert-info strong {
    color: #f0fafe !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box .alert-light {
    background: #273142 !important;
    border-color: #536276 !important;
    color: #e6edf7 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-schedule-preview {
    background: #253044 !important;
    border: 1px dashed #6a7b92 !important;
    color: #e2ebf8 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-schedule-preview strong {
    color: #f4cf8b !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-schedule-grid > div {
    background: #1b293d !important;
    border-color: #48607a !important;
    color: #e8eef8 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-schedule-grid small {
    color: #bbccdf !important;
}

/* Availability states: preserve semantic distinctions with readable copy. */
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-availability-result {
    border: 1px solid #576579;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-availability-result.is-idle,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-availability-result.is-loading {
    background: #3a2e29 !important;
    border-color: #80654b !important;
    color: #ffe5bd !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-availability-result.is-available {
    background: #153c30 !important;
    border-color: #36795f !important;
    color: #d0f8df !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-availability-result.is-unavailable {
    background: #45252e !important;
    border-color: #975868 !important;
    color: #ffe1e4 !important;
}

/* Category-specific rental terms and totals (previously pale in night mode). */
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-heels-terms {
    background: #1b2b3b !important;
    border: 1px solid #445972 !important;
    color: #e8eff9 !important;
    box-shadow: none;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-heels-terms-list {
    color: #e0e9f7 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-heels-terms-list li::marker {
    color: #f0c785;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-heels-terms-icon {
    background: #354359 !important;
    color: #f3d4a1 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-heels-terms .btn-loovie-outline {
    color: #f3d5a4 !important;
    border-color: #b38b57 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-summary-card {
    background: #1b2b3e !important;
    border: 1px solid #455b74 !important;
    color: #e9f1fb !important;
    box-shadow: none;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-summary-card .loovie-summary-row,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-summary-card .loovie-summary-row span,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-summary-card .loovie-summary-row strong {
    color: #e6effb !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-summary-total {
    border-top-color: #607189 !important;
    color: #f2ce88 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-summary-total span,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-summary-total strong {
    color: #f2ce88 !important;
}
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-rental-box button[type="submit"]:disabled {
    color: #d7e0ed !important;
    -webkit-text-fill-color: #d7e0ed;
    opacity: .8;
}

/* Visible photo selection marker without modifying gallery interaction. */
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) img.loovie-detail-thumb.loovie-thumb-active-v7,
html[data-bs-theme="dark"] main:has(form[data-product-rental-form]) .loovie-detail-thumb img.loovie-thumb-active-v7 {
    outline-color: #e8bf77 !important;
    box-shadow: 0 0 0 1px #dfb875, 0 8px 20px rgba(0, 0, 0, .2) !important;
}
