/* Дата: белый фон + кликабельный календарь на всё поле */

.restaurant-booking-form .wpcf7-form-control-wrap:has(input[type="date"]),
.elementor-popup-modal .wpcf7-form-control-wrap:has(input[type="date"]),
.dialog-widget .wpcf7-form-control-wrap:has(input[type="date"]),
.dialog-lightbox-widget .wpcf7-form-control-wrap:has(input[type="date"]),
form.tb-cf7-booking .wpcf7-form-control-wrap:has(input[type="date"]) {
    position: relative !important;
    z-index: 5 !important;
    display: block !important;
}

/* WoodMart/тема иногда вешает псевдоэлементы поверх — клик не доходит */
.restaurant-booking-form .wpcf7-form-control-wrap:has(input[type="date"])::before,
.restaurant-booking-form .wpcf7-form-control-wrap:has(input[type="date"])::after,
.elementor-popup-modal .wpcf7-form-control-wrap:has(input[type="date"])::before,
.elementor-popup-modal .wpcf7-form-control-wrap:has(input[type="date"])::after,
.dialog-widget .wpcf7-form-control-wrap:has(input[type="date"])::before,
.dialog-widget .wpcf7-form-control-wrap:has(input[type="date"])::after,
.dialog-lightbox-widget .wpcf7-form-control-wrap:has(input[type="date"])::before,
.dialog-lightbox-widget .wpcf7-form-control-wrap:has(input[type="date"])::after {
    content: none !important;
    display: none !important;
    background: none !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}

input.wpcf7-date,
input.restaurant-booking-form__date,
.restaurant-booking-form input[type="date"],
.restaurant-booking-form input.wpcf7-date,
.elementor-popup-modal input[type="date"],
.elementor-popup-modal input.wpcf7-date,
.dialog-widget input[type="date"],
.dialog-lightbox-widget input[type="date"],
.dialog-lightbox-widget input.wpcf7-date,
form.tb-cf7-booking input[type="date"] {
    position: relative !important;
    z-index: 6 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 42px 10px 14px !important;
    border-radius: 5px !important;
    color: #333 !important;
    cursor: text !important;
    pointer-events: auto !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23777777' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 18px 18px !important;
    -webkit-appearance: auto !important;
    appearance: auto !important;
}

/* Календарь только по иконке справа — не на всё поле */
input.wpcf7-date::-webkit-calendar-picker-indicator,
input.restaurant-booking-form__date::-webkit-calendar-picker-indicator,
.restaurant-booking-form input[type="date"]::-webkit-calendar-picker-indicator,
.elementor-popup-modal input[type="date"]::-webkit-calendar-picker-indicator,
.dialog-widget input[type="date"]::-webkit-calendar-picker-indicator,
.dialog-lightbox-widget input[type="date"]::-webkit-calendar-picker-indicator,
form.tb-cf7-booking input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute !important;
    left: auto !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 44px !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0.02 !important;
    cursor: pointer !important;
    z-index: 7 !important;
    background: transparent !important;
}

.restaurant-booking-form select.tb-date-select,
.elementor-popup-modal select.tb-date-select,
form.tb-cf7-booking select.tb-date-select {
    display: block !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 14px !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

.restaurant-booking-form input[type="date"][data-tb-mobile-select="1"],
form.tb-cf7-booking input[type="hidden"].restaurant-booking-form__date {
    display: none !important;
}

.restaurant-booking-form .restaurant-booking-form__privacy {
    margin-top: 12px;
}

.restaurant-booking-form .wpcf7-acceptance .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.restaurant-booking-form .wpcf7-acceptance input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    appearance: auto;
    -webkit-appearance: checkbox;
}

.restaurant-booking-form .wpcf7-submit,
.elementor-popup-modal .wpcf7-submit,
.dialog-widget .wpcf7-submit,
.dialog-lightbox-widget .wpcf7-submit,
form.tb-cf7-booking .wpcf7-submit {
    display: inline-flex !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 42px !important;
    align-items: center;
    justify-content: center;
    background-color: #72795C !important;
    color: #FFF7EC !important;
    border: 0 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

.restaurant-booking-form .wpcf7-submit:hover:not(:disabled),
.elementor-popup-modal .wpcf7-submit:hover:not(:disabled),
form.tb-cf7-booking .wpcf7-submit:hover:not(:disabled) {
    background-color: #5f664c !important;
}

.restaurant-booking-form .wpcf7-submit:not(:disabled),
.elementor-popup-modal .wpcf7-submit:not(:disabled),
form.tb-cf7-booking .wpcf7-submit:not(:disabled) {
    opacity: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.restaurant-booking-form .wpcf7-submit:disabled,
.elementor-popup-modal .wpcf7-submit:disabled,
form.tb-cf7-booking .wpcf7-submit:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
