:root {
    --rendiks-orange: #f47a00;
    --rendiks-orange-dark: #c76000;
    --rendiks-dark: #17191b;
    --rendiks-panel: #222529;
    --rendiks-border: #44484d;
    --rendiks-text: #ffffff;
}

/* BRONEERINGU ÜMBRIS */

.rendiks-booking {
    box-sizing: border-box;
    width: min(920px, calc(100% - 32px));
    margin: 32px auto;
    padding: 28px;
    color: var(--rendiks-text);
    background: var(--rendiks-dark);
    border-radius: 16px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
}

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

.rendiks-booking > h2 {
    margin: 0 0 22px;
    color: #ffffff;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-transform: uppercase;
}

.rendiks-booking > h2::after {
    content: "";
    display: block;
    width: 58px;
    height: 3px;
    margin: 10px auto 0;
    background: var(--rendiks-orange);
}

/* SEADME EELVAADE */

.rendiks-preview {
    display: grid;
    grid-template-columns: minmax(260px, 42%) 1fr;
    width: 100%;
    margin: 0 0 24px;
    overflow: hidden;
    background: var(--rendiks-panel);
    border: 1px solid #35393d;
    border-radius: 12px;
}

.rendiks-preview[hidden] {
    display: none !important;
}

.rendiks-preview > img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 245px;
    max-height: 320px;
    object-fit: cover;
}

.rendiks-preview > div,
.rendiks-preview-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding: 24px;
}

.rendiks-preview h3 {
    margin: 12px 0 7px;
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1.2;
}

.rendiks-preview strong,
.rendiks-preview-price {
    display: block;
    margin: 0 0 10px;
    color: var(--rendiks-orange);
    font-size: 1.25rem;
}

.rendiks-preview p,
.rendiks-preview-description {
    margin: 0 0 12px;
    color: #d8dade;
    line-height: 1.55;
}

.rendiks-detail-link {
    color: var(--rendiks-orange);
    font-weight: 700;
    text-decoration: none;
}

.rendiks-detail-link:hover {
    text-decoration: underline;
}

/* STAATUS */

.rendiks-status {
    display: inline-block;
    padding: 6px 11px;
    color: #ffffff;
    background: #575b60;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.rendiks-status.ok {
    background: #18783a;
}

.rendiks-status.busy {
    background: #981f18;
}

/* VORMI PAIGUTUS */

.rendiks-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.rendiks-form-grid > label {
    display: flex !important;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    margin: 0;
    color: #ffffff;
    font-weight: 700;
}

.rendiks-form-grid > label.wide,
.rendiks-date-range-label,
.rendiks-transport {
    grid-column: 1 / -1;
}

/* VORMI VÄLJAD */

.rendiks-form-grid input,
.rendiks-form-grid select,
.rendiks-form-grid textarea,
.rendiks-date-range-label input {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    min-height: 46px;
    margin: 0 !important;
    padding: 11px 13px !important;
    color: #ffffff;
    background: #202327;
    border: 1px solid var(--rendiks-border);
    border-radius: 8px;
    box-shadow: none;
    font: inherit;
}

.rendiks-form-grid textarea {
    min-height: 112px;
    resize: vertical;
}

.rendiks-form-grid input:focus,
.rendiks-form-grid select:focus,
.rendiks-form-grid textarea:focus {
    outline: 2px solid var(--rendiks-orange);
    outline-offset: 1px;
    border-color: var(--rendiks-orange);
}

.rendiks-date-range-label input[name="date_range"],
.rendiks-form-grid input[name="date_range"] {
    color: #242424 !important;
    background: #ffffff !important;
    cursor: pointer;
}

/* TRANSPORT */

.rendiks-transport {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 4px 0;
}

.rendiks-transport input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px !important;
    min-height: 18px;
    height: 18px;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: var(--rendiks-orange);
}

/* SAADAVUSE TEADE */

.rendiks-check {
    min-height: 24px;
    margin: 14px 0 8px;
    color: #ffb36a;
    font-weight: 700;
}

/* HINNA KOKKUVÕTE */

.rendiks-price-summary {
    display: block !important;
    width: 100%;
    margin: 16px 0 20px !important;
    padding: 18px 20px !important;
    color: #ffffff !important;
    background: var(--rendiks-panel) !important;
    border: 1px solid #35393d;
    border-radius: 10px !important;
}

.rendiks-price-summary .price-line {
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    gap: 20px;
    padding: 8px 0;
}

.rendiks-price-summary .price-line span,
.rendiks-price-summary .price-line strong {
    color: inherit;
}

.rendiks-price-summary .price-line.final {
    margin-top: 8px;
    padding-top: 14px;
    color: var(--rendiks-orange) !important;
    border-top: 1px solid var(--rendiks-border);
    font-size: 1.12rem;
}

/* SAATMISNUPP */

.rendiks-booking button[type="submit"] {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 13px 18px;
    color: #ffffff;
    background: var(--rendiks-orange);
    border: 0;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.rendiks-booking button[type="submit"]:hover:not(:disabled) {
    background: var(--rendiks-orange-dark);
}

.rendiks-booking button[type="submit"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.rendiks-booking > small {
    display: block;
    margin-top: 10px;
    color: #c8cbd0;
    line-height: 1.4;
}

/* TEATED */

.rendiks-alert,
.rendiks-alert.ok,
.rendiks-alert.success {
    width: min(920px, calc(100% - 32px));
    margin: 14px auto;
    padding: 13px 16px;
    color: #155d2a;
    background: #dff5e5;
    border-radius: 8px;
    font-weight: 700;
}

.rendiks-alert.bad,
.rendiks-alert.error {
    color: #8a1f16;
    background: #ffe1df;
}

/* FLATPICKR KALENDER */

body .flatpickr-calendar {
    z-index: 999999 !important;
    overflow: hidden;
    color: #222222 !important;
    background: #ffffff !important;
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28) !important;
}

body .flatpickr-calendar .flatpickr-months,
body .flatpickr-calendar .flatpickr-weekdays,
body .flatpickr-calendar .flatpickr-innerContainer,
body .flatpickr-calendar .flatpickr-days {
    background: #ffffff !important;
}

body .flatpickr-calendar .flatpickr-current-month,
body .flatpickr-calendar .flatpickr-monthDropdown-months,
body .flatpickr-calendar .numInputWrapper,
body .flatpickr-calendar .flatpickr-weekday {
    color: #222222 !important;
}

/* SAADAVAL KUUPÄEV */

body .flatpickr-calendar .flatpickr-day.rendiks-day-available {
    color: #18371f !important;
    background: #e6f5e9 !important;
    border-color: #bedfc5 !important;
    opacity: 1 !important;
}

body .flatpickr-calendar .flatpickr-day.rendiks-day-available:hover {
    color: #ffffff !important;
    background: var(--rendiks-orange) !important;
    border-color: var(--rendiks-orange) !important;
}

/* BRONEERITUD KUUPÄEV */

body .flatpickr-calendar .flatpickr-day.rendiks-day-booked {
    color: #ffffff !important;
    background: #981f18 !important;
    border-color: #981f18 !important;
    opacity: 1 !important;
    font-weight: 800;
    text-decoration: line-through;
    cursor: not-allowed;
}

body .flatpickr-calendar .flatpickr-day.rendiks-day-booked:hover {
    color: #ffffff !important;
    background: #65130f !important;
    border-color: #65130f !important;
}

/* MÖÖDUNUD KUUPÄEV */

body .flatpickr-calendar .flatpickr-day.rendiks-day-past {
    color: #929292 !important;
    background: #eeeeee !important;
    border-color: #eeeeee !important;
    opacity: 0.65 !important;
}

/* VALITUD ALGUS JA LÕPP */

body .flatpickr-calendar .flatpickr-day.selected,
body .flatpickr-calendar .flatpickr-day.startRange,
body .flatpickr-calendar .flatpickr-day.endRange {
    color: #ffffff !important;
    background: var(--rendiks-orange) !important;
    border-color: var(--rendiks-orange) !important;
    text-decoration: none !important;
}

/* VALITUD VAHEMIK */

body .flatpickr-calendar .flatpickr-day.inRange:not(.rendiks-day-booked) {
    color: #402100 !important;
    background: #ffd9b3 !important;
    border-color: #ffd9b3 !important;
    box-shadow:
        -5px 0 0 #ffd9b3,
        5px 0 0 #ffd9b3 !important;
}

/* KALENDRI LEGEND */

.rendiks-calendar-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px;
    color: #333333;
    background: #ffffff;
    border-top: 1px solid #dddddd;
    font-size: 12px;
    font-weight: 700;
}

.rendiks-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rendiks-calendar-legend i {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 3px;
}

.rendiks-calendar-legend i.available {
    background: #e6f5e9;
    border: 1px solid #bedfc5;
}

.rendiks-calendar-legend i.booked {
    background: #981f18;
    border: 1px solid #65130f;
}

.rendiks-calendar-legend i.selected {
    background: var(--rendiks-orange);
    border: 1px solid var(--rendiks-orange-dark);
}

.rendiks-calendar-legend i.past {
    background: #eeeeee;
    border: 1px solid #cccccc;
}

/* TAHVEL */

@media (max-width: 800px) {
    .rendiks-preview {
        grid-template-columns: 1fr;
    }

    .rendiks-preview > img {
        height: 280px;
        min-height: 0;
    }
}

/* MOBIIL */

@media (max-width: 620px) {
    .rendiks-booking {
        width: 100%;
        margin: 20px 0;
        padding: 18px 14px;
        border-radius: 0;
    }

    .rendiks-form-grid {
        grid-template-columns: 1fr;
    }

    .rendiks-form-grid > label.wide,
    .rendiks-date-range-label,
    .rendiks-transport {
        grid-column: auto;
    }

    .rendiks-preview > img {
        height: 220px;
    }

    .rendiks-preview > div,
    .rendiks-preview-content {
        padding: 18px;
    }

    .rendiks-price-summary .price-line {
        align-items: flex-start;
    }

    body .flatpickr-calendar {
        width: 310px !important;
        max-width: calc(100vw - 16px) !important;
    }
}
/* v5.0.5: populaarsed seadmed kasutavad sama lisainfo mustrit */
.rendiks-equipment-info-toggle{display:block;width:100%;margin:14px 0 0;padding:11px 14px;border:0;border-radius:7px;background:#f47a00;color:#fff;font:inherit;font-weight:800;cursor:pointer;text-align:center}.rendiks-equipment-info-toggle:hover{filter:brightness(.94)}.rendiks-equipment-info-toggle .rendiks-info-hide{display:none}.rendiks-equipment-info-toggle[aria-expanded="true"] .rendiks-info-show{display:none}.rendiks-equipment-info-toggle[aria-expanded="true"] .rendiks-info-hide{display:inline}.rendiks-equipment-info-panel{margin-top:10px;border:1px solid #ddd;border-radius:7px;overflow:hidden;background:#fff}.rendiks-equipment-info-panel[hidden]{display:none!important}.rendiks-equipment-info-panel table{width:100%;border-collapse:collapse;margin:0}.rendiks-equipment-info-panel th,.rendiks-equipment-info-panel td{padding:9px 10px;border-bottom:1px solid #e7e7e7;text-align:left;vertical-align:top;font-size:.92rem;line-height:1.35}.rendiks-equipment-info-panel th{width:46%;font-weight:700}.rendiks-equipment-info-panel tr:last-child th,.rendiks-equipment-info-panel tr:last-child td{border-bottom:0}

/* v5.0.6: info nupu olekud peidetakse robustselt ka teema CSS-i vastu */
.rendiks-equipment-info-toggle .rendiks-info-show{display:inline!important}.rendiks-equipment-info-toggle .rendiks-info-hide{display:none!important}.rendiks-equipment-info-toggle[aria-expanded="true"] .rendiks-info-show{display:none!important}.rendiks-equipment-info-toggle[aria-expanded="true"] .rendiks-info-hide{display:inline!important}

/* v5.0.9: kaardi jarjekord on nimi -> hind -> luhinfo -> rohkem infot */
.rendiks-equipment-card .rendiks-equipment-description{margin:10px 0 0;line-height:1.4}.rendiks-equipment-card .rendiks-equipment-description + .rendiks-equipment-info-toggle{margin-top:10px}

/* v5.1.0 mobile containment */
@media (max-width:767px){
  html,body{width:100%;max-width:100%;overflow-x:hidden!important}
  .rendiks-equipment,.rendiks-equipment-card,.rendiks-equipment-card>div{min-width:0!important;max-width:100%;box-sizing:border-box}
  .rendiks-equipment-card img{width:100%!important;max-width:100%!important;height:190px!important;object-fit:cover!important}
  .rendiks-equipment-card .rendiks-equipment-description{overflow-wrap:anywhere;word-break:normal}
  .rendiks-equipment-info-panel{width:100%;max-width:100%;overflow:hidden}
  .rendiks-equipment-info-panel table{table-layout:fixed;width:100%!important}
  .rendiks-equipment-info-panel th{width:38%!important}
  .rendiks-equipment-info-panel th,.rendiks-equipment-info-panel td{min-width:0!important;overflow-wrap:anywhere;word-break:normal;hyphens:auto;padding:8px!important;font-size:14px!important}
}

/* v5.2.0 keskne hinnastus */
.rendiks-card-price{display:flex!important;flex-direction:column;gap:2px}.rendiks-price-net{display:block}.rendiks-price-gross{display:block;font-size:.78em;font-weight:600;color:#555}
