.rp-rezervace {
    --rp-primary: #1e87f0;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.rp-rezervace *,
.rp-rezervace *::before,
.rp-rezervace *::after {
    box-sizing: border-box;
}

.rp-calendar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.rp-calendar-main-title {
    margin: 0 0 7px;
    font-size: 30px;
    line-height: 1.2;
}

.rp-calendar-description {
    margin: 0;
    color: #666;
}

.rp-calendar-navigation {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.rp-theme-vlastni .rp-calendar-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        opacity 0.2s ease;
}

.rp-theme-vlastni .rp-calendar-arrow:hover:not(:disabled) {
    background: #f2f2f2;
    border-color: #aaa;
}

.rp-calendar-arrow:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.rp-calendar-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.rp-calendars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.rp-calendar-month {
    overflow: hidden;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.rp-calendar-month-title {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #f7f7f7;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.rp-calendar-weekdays,
.rp-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.rp-calendar-weekday {
    padding: 13px 4px 10px;
    color: #777;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
}

.rp-calendar-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 55px;
    margin: 2px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #222;
    font: inherit;
    cursor: default;
}

.rp-calendar-day-number {
    position: relative;
    z-index: 1;
}

.rp-calendar-day.is-today {
    border-color: #222;
    font-weight: 700;
}

.rp-calendar-day.is-past {
    background: #f3f3f3;
    color: #aaa;
    text-decoration: line-through;
}

.rp-calendar-day.is-weekend:not(.is-past) {
    background: #fafafa;
}

.rp-calendar-day.is-too-far {
    background: #f7f7f7;
    color: #b5b5b5;
    opacity: 0.72;
}

.rp-calendar-empty {
    min-height: 55px;
    margin: 2px;
}

.rp-calendar-day:not(:disabled) {
    cursor: pointer;
}

.rp-calendar-day:not(:disabled):hover {
    border-color: var(--rp-primary);
    background: #edf6ff;
}

.rp-calendar-day:focus-visible {
    z-index: 2;
    outline: 2px solid var(--rp-primary);
    outline-offset: 1px;
}

.rp-calendar-day:disabled {
    cursor: not-allowed;
}

.rp-calendar-day.is-selected-start,
.rp-calendar-day.is-selected-end {
    border-color: var(--rp-primary);
    background: var(--rp-primary);
    color: var(--rp-primary-contrast, #fff);
    font-weight: 700;
}

.rp-calendar-day.is-selected-start:hover,
.rp-calendar-day.is-selected-end:hover {
    background: #156fbf;
    color: #fff;
}

.rp-calendar-day.is-in-range {
    border-radius: 2px;
    background: #dceeff;
    color: #153b5c;
}

.rp-selection-panel {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #f8f8f8;
}

.rp-selection-instruction {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 600;
}

.rp-selection-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.rp-selection-value {
    padding: 15px;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #fff;
}

.rp-selection-value span {
    display: block;
    margin-bottom: 5px;
    color: #777;
    font-size: 13px;
}

.rp-selection-value strong {
    display: block;
    color: #222;
    font-size: 16px;
}

.rp-theme-vlastni .rp-clear-selection {
    margin-top: 18px;
    padding: 10px 17px;
    border: 1px solid #b8b8b8;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font: inherit;
    cursor: pointer;
}

.rp-theme-vlastni .rp-clear-selection:hover:not(:disabled) {
    border-color: #777;
    background: #f2f2f2;
}

.rp-clear-selection:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.rp-booking-form {
    position: relative;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #fff;
}

.rp-form-title {
    margin: 0 0 20px;
}

.rp-theme-vlastni .rp-form-title {
    font-size: 22px;
}

.rp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.rp-form-field {
    min-width: 0;
}

.rp-form-field-full {
    grid-column: 1 / -1;
}

.rp-form-field label {
    display: block;
    margin-bottom: 7px;
}

.rp-theme-vlastni .rp-form-field label {
    color: #333;
    font-weight: 600;
}

.rp-theme-vlastni .rp-form-field input,
.rp-theme-vlastni .rp-form-field textarea {
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font: inherit;
}

.rp-theme-vlastni .rp-form-field textarea {
    min-height: 110px;
    resize: vertical;
}

.rp-theme-vlastni .rp-form-field input:focus,
.rp-theme-vlastni .rp-form-field textarea:focus {
    border-color: var(--rp-primary);
    outline: 2px solid rgba(30, 135, 240, 0.18);
    outline-offset: 0;
}

.rp-theme-vlastni .rp-submit-booking {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 20px;
    padding: 11px 20px;
    border: 1px solid var(--rp-primary);
    border-radius: 5px;
    background: var(--rp-primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.rp-theme-vlastni .rp-submit-booking:hover:not(:disabled) {
    border-color: #156fbf;
    background: #156fbf;
}

.rp-submit-booking:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.rp-calendar-message,
.rp-form-message {
    margin-top: 18px;
    padding: 13px 15px;
    border-radius: 5px;
}

.rp-calendar-message.is-success,
.rp-form-message.is-success {
    border: 1px solid #76b889;
    background: #eef8f0;
    color: #225c31;
}

.rp-calendar-message.is-error,
.rp-form-message.is-error {
    border: 1px solid #d59a9a;
    background: #fff1f1;
    color: #842525;
}

.rp-calendar-message {
    margin-top: 18px;
    margin-bottom: 0;
}


.rp-gdpr-consent {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #dedede;
    border-radius: 6px;
    background: #fafafa;
}

.rp-gdpr-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.rp-gdpr-consent input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 3px;
}

.rp-gdpr-consent a {
    text-decoration: underline;
}

.rp-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.rp-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    color: #555;
    font-size: 14px;
}

.rp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-legend-box {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

.rp-legend-today {
    border: 1px solid #222;
    background: #fff;
}

.rp-legend-unavailable {
    border: 1px solid #e4e4e4;
    background: #f3f3f3;
}

@media (max-width: 767px) {
    .rp-calendar-header {
        align-items: center;
    }

    .rp-calendar-main-title {
        font-size: 25px;
    }

    .rp-calendars {
        grid-template-columns: 1fr;
    }

    .rp-calendar-day,
    .rp-calendar-empty {
        min-height: 44px;
    }

    .rp-selection-values,
    .rp-form-grid {
        grid-template-columns: 1fr;
    }

    .rp-selection-panel,
    .rp-booking-form {
        padding: 17px;
    }

    .rp-form-field-full {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .rp-calendar-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .rp-calendar-navigation {
        align-self: flex-end;
    }

    .rp-calendar-month-title {
        padding: 15px;
        font-size: 18px;
    }

    .rp-calendar-day {
        margin: 1px;
        font-size: 14px;
    }

    .rp-submit-booking {
        width: 100%;
    }
}

/* Verze 0.6.0 – načítání a obsazené termíny */

.rp-calendar-loading {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #f8f8f8;
    text-align: center;
}

.rp-calendar-day.is-loading {
    opacity: 0.55;
}

.rp-calendar-day.is-occupied:not(.is-selected-end) {
    border-color: #e2b4b4;
    background:
        repeating-linear-gradient(
            -45deg,
            #f8dddd,
            #f8dddd 6px,
            #fff0f0 6px,
            #fff0f0 12px
        );
    color: #8a3030;
    font-weight: 600;
}

.rp-calendar-day.is-occupied:not(.is-selected-end):hover {
    border-color: #c96a6a;
    background:
        repeating-linear-gradient(
            -45deg,
            #f5cece,
            #f5cece 6px,
            #ffe9e9 6px,
            #ffe9e9 12px
        );
}

.rp-calendar-day.is-selected-end {
    border-color: var(--rp-primary);
    background: var(--rp-primary);
    color: var(--rp-primary-contrast, #fff);
}

.rp-legend-occupied {
    border: 1px solid #e2b4b4;
    background:
        repeating-linear-gradient(
            -45deg,
            #f8dddd,
            #f8dddd 5px,
            #fff0f0 5px,
            #fff0f0 10px
        );
}

/* Verze 0.9.2 – nastavitelné rozměry rozhraní */
.rp-rezervace {
    max-width: var(--rp-max-width, 1100px);
}

/* Kompaktní varianta */
.rp-rezervace.rp-size-kompaktni .rp-calendar-header {
    gap: 14px;
    margin-bottom: 16px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-main-title {
    margin-bottom: 5px;
    font-size: 24px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-description {
    font-size: 14px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-navigation {
    gap: 6px;
}

.rp-rezervace.rp-theme-vlastni.rp-size-kompaktni .rp-calendar-arrow {
    width: 36px;
    height: 36px;
    font-size: 18px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendars {
    gap: 14px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-month-title {
    padding: 12px 14px;
    font-size: 17px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-weekday {
    padding: 8px 3px 6px;
    font-size: 10px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-day,
.rp-rezervace.rp-size-kompaktni .rp-calendar-empty {
    min-height: 38px;
    margin: 1px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-day {
    border-radius: 4px;
    font-size: 13px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-message,
.rp-rezervace.rp-size-kompaktni .rp-form-message {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 14px;
}

.rp-rezervace.rp-size-kompaktni .rp-selection-panel {
    margin-top: 14px;
    padding: 14px;
}

.rp-rezervace.rp-size-kompaktni .rp-selection-instruction {
    margin-bottom: 11px;
    font-size: 15px;
}

.rp-rezervace.rp-size-kompaktni .rp-selection-values {
    gap: 9px;
}

.rp-rezervace.rp-size-kompaktni .rp-selection-value {
    padding: 9px 10px;
}

.rp-rezervace.rp-size-kompaktni .rp-selection-value span {
    margin-bottom: 3px;
    font-size: 11px;
}

.rp-rezervace.rp-size-kompaktni .rp-selection-value strong {
    font-size: 14px;
}

.rp-rezervace.rp-theme-vlastni.rp-size-kompaktni .rp-clear-selection {
    margin-top: 11px;
    padding: 7px 12px;
    font-size: 13px;
}

.rp-rezervace.rp-size-kompaktni .rp-booking-form {
    margin-top: 14px;
    padding: 14px;
}

.rp-rezervace.rp-size-kompaktni .rp-form-title {
    margin-bottom: 13px;
}

.rp-rezervace.rp-theme-vlastni.rp-size-kompaktni .rp-form-title {
    font-size: 18px;
}

.rp-rezervace.rp-size-kompaktni .rp-form-grid {
    gap: 11px 12px;
}

.rp-rezervace.rp-size-kompaktni .rp-form-field label {
    margin-bottom: 4px;
    font-size: 13px;
}

.rp-rezervace.rp-theme-vlastni.rp-size-kompaktni .rp-form-field input,
.rp-rezervace.rp-theme-vlastni.rp-size-kompaktni .rp-form-field textarea {
    padding: 7px 9px;
    border-radius: 4px;
    font-size: 14px;
}

.rp-rezervace.rp-theme-vlastni.rp-size-kompaktni .rp-form-field textarea {
    min-height: 72px;
}

.rp-rezervace.rp-size-kompaktni .rp-gdpr-consent {
    margin-top: 12px;
    padding: 9px 11px;
    font-size: 13px;
}

.rp-rezervace.rp-theme-vlastni.rp-size-kompaktni .rp-submit-booking {
    min-height: 38px;
    margin-top: 13px;
    padding: 8px 15px;
    font-size: 14px;
}

.rp-rezervace.rp-size-kompaktni .rp-calendar-legend {
    gap: 14px;
    margin-top: 13px;
    font-size: 12px;
}

.rp-rezervace.rp-size-kompaktni .rp-legend-item {
    gap: 6px;
}

.rp-rezervace.rp-size-kompaktni .rp-legend-box {
    width: 17px;
    height: 17px;
}

/* Větší varianta */
.rp-rezervace.rp-size-vetsi .rp-calendar-main-title {
    font-size: 34px;
}

.rp-rezervace.rp-theme-vlastni.rp-size-vetsi .rp-calendar-arrow {
    width: 50px;
    height: 50px;
}

.rp-rezervace.rp-size-vetsi .rp-calendars {
    gap: 28px;
}

.rp-rezervace.rp-size-vetsi .rp-calendar-month-title {
    padding: 21px 22px;
    font-size: 22px;
}

.rp-rezervace.rp-size-vetsi .rp-calendar-day,
.rp-rezervace.rp-size-vetsi .rp-calendar-empty {
    min-height: 63px;
}

.rp-rezervace.rp-size-vetsi .rp-selection-panel,
.rp-rezervace.rp-size-vetsi .rp-booking-form {
    padding: 28px;
}

.rp-rezervace.rp-theme-vlastni.rp-size-vetsi .rp-form-field input,
.rp-rezervace.rp-theme-vlastni.rp-size-vetsi .rp-form-field textarea {
    padding: 13px 14px;
}

@media (max-width: 767px) {
    .rp-rezervace.rp-size-kompaktni .rp-calendar-day,
    .rp-rezervace.rp-size-kompaktni .rp-calendar-empty {
        min-height: 38px;
    }

    .rp-rezervace.rp-size-kompaktni .rp-selection-panel,
    .rp-rezervace.rp-size-kompaktni .rp-booking-form {
        padding: 13px;
    }
}


/* Verze 0.9.3 – napojení na YOOtheme / UIkit */
.rp-calendar-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.rp-theme-probe {
    position: absolute !important;
    left: -10000px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.rp-theme-yootheme {
    font-family: inherit;
    color: inherit;
    --rp-primary-contrast: #fff;
}

.rp-theme-yootheme .rp-calendar-month {
    border-color: rgba(127, 127, 127, 0.24);
    background: transparent;
    box-shadow: none;
}

.rp-theme-yootheme .rp-calendar-month-title {
    border-bottom-color: rgba(127, 127, 127, 0.2);
    background: transparent;
    color: inherit;
    font-family: inherit;
}

.rp-theme-yootheme .rp-calendar-weekday {
    color: inherit;
    opacity: 0.62;
}

.rp-theme-yootheme .rp-calendar-day {
    color: inherit;
    font-family: inherit;
    border-radius: var(--rp-control-radius, 4px);
}

.rp-theme-yootheme .rp-calendar-day.is-weekend:not(.is-past):not(.is-selected-start):not(.is-selected-end) {
    background: rgba(127, 127, 127, 0.055);
}

.rp-theme-yootheme .rp-calendar-day.is-past,
.rp-theme-yootheme .rp-calendar-day.is-too-far {
    background: rgba(127, 127, 127, 0.08);
    color: inherit;
    opacity: 0.36;
}

.rp-theme-yootheme .rp-calendar-day.is-today {
    border-color: currentColor;
}

.rp-theme-yootheme .rp-calendar-day:not(:disabled):hover {
    border-color: var(--rp-primary);
    background: color-mix(in srgb, var(--rp-primary) 12%, transparent);
}

.rp-theme-yootheme .rp-calendar-day.is-selected-start,
.rp-theme-yootheme .rp-calendar-day.is-selected-end {
    border-color: var(--rp-primary);
    background: var(--rp-primary);
    color: var(--rp-primary-contrast, #fff);
}

.rp-theme-yootheme .rp-calendar-day.is-selected-start:hover,
.rp-theme-yootheme .rp-calendar-day.is-selected-end:hover {
    background: var(--rp-primary);
    color: var(--rp-primary-contrast, #fff);
    filter: brightness(0.94);
}

.rp-theme-yootheme .rp-calendar-day.is-in-range {
    background: color-mix(in srgb, var(--rp-primary) 15%, transparent);
    color: inherit;
}

.rp-theme-yootheme .rp-selection-panel,
.rp-theme-yootheme .rp-booking-form {
    border-color: rgba(127, 127, 127, 0.24);
    background: transparent;
    color: inherit;
}

.rp-theme-yootheme .rp-selection-value {
    border-color: rgba(127, 127, 127, 0.2);
    background: transparent;
}

.rp-theme-yootheme .rp-selection-value span {
    color: inherit;
    opacity: 0.62;
}

.rp-theme-yootheme .rp-selection-value strong,
.rp-theme-yootheme .rp-form-field label {
    color: inherit;
}

.rp-theme-yootheme .rp-form-field input,
.rp-theme-yootheme .rp-form-field textarea {
    width: 100%;
    font-family: inherit;
}

.rp-theme-yootheme .rp-gdpr-consent {
    border-color: rgba(127, 127, 127, 0.2);
    background: transparent;
    color: inherit;
}

.rp-theme-yootheme .rp-calendar-legend {
    color: inherit;
}

.rp-theme-yootheme .rp-calendar-loading {
    border-color: rgba(127, 127, 127, 0.2);
    background: transparent;
    color: inherit;
}

.rp-theme-yootheme .rp-legend-today {
    border-color: currentColor;
    background: transparent;
}

.rp-theme-yootheme .rp-legend-unavailable {
    border-color: rgba(127, 127, 127, 0.22);
    background: rgba(127, 127, 127, 0.08);
}

.rp-theme-yootheme .rp-calendar-arrow,
.rp-theme-yootheme .rp-clear-selection,
.rp-theme-yootheme .rp-submit-booking {
    font-family: inherit;
}

.rp-theme-yootheme .rp-clear-selection {
    margin-top: 18px;
}

.rp-theme-yootheme .rp-submit-booking {
    margin-top: 20px;
}

.rp-theme-yootheme.rp-size-kompaktni .rp-clear-selection {
    margin-top: 11px;
}

.rp-theme-yootheme.rp-size-kompaktni .rp-submit-booking {
    margin-top: 13px;
}


.rp-theme-yootheme .rp-submit-booking:disabled,
.rp-theme-yootheme .rp-clear-selection:disabled,
.rp-theme-yootheme .rp-calendar-arrow:disabled {
    opacity: 0.45;
}

.rp-theme-yootheme .rp-form-field textarea {
    resize: vertical;
    min-height: 110px;
}

.rp-theme-yootheme.rp-size-kompaktni .rp-form-field textarea {
    min-height: 72px;
}

.rp-theme-yootheme.rp-size-vetsi .rp-form-field textarea {
    min-height: 140px;
}


.rp-theme-yootheme.rp-size-kompaktni .rp-calendar-toolbar {
    margin-bottom: 9px;
}

.rp-theme-yootheme.rp-size-vetsi .rp-calendar-toolbar {
    margin-bottom: 18px;
}

@supports not (background: color-mix(in srgb, red 10%, transparent)) {
    .rp-theme-yootheme .rp-calendar-day:not(:disabled):hover,
    .rp-theme-yootheme .rp-calendar-day.is-in-range {
        background: transparent;
    }
}
