/* =========================================
   MotoPress (MPHB) — scoped + pages
   ========================================= */

/* ---------- 1) Forms on homepage (scoped) ---------- */
.bt-mphb .mphb_sc_availability-form,
.bt-mphb .mphb_sc_search-form{
    color: var(--text);
    font-family: inherit;
}

.bt-mphb .mphb_sc_availability-form form,
.bt-mphb .mphb_sc_search-form form{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    align-items:flex-end;
}

.bt-mphb .mphb_sc_availability-form p,
.bt-mphb .mphb_sc_search-form p{
    margin:0;
    min-width: 180px;
}

.bt-mphb label{
    display:block;
    margin:0 0 8px 0;
    color: rgba(242,242,242,.85);
    font-size: 13px;
    letter-spacing: .2px;
}

.bt-mphb input[type="text"],
.bt-mphb input[type="email"],
.bt-mphb input[type="tel"],
.bt-mphb input[type="number"],
.bt-mphb select,
.bt-mphb textarea{
    width:100%;
    height:44px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.04);
    color: var(--text);
    outline: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.bt-mphb textarea{
    height:auto;
    min-height:110px;
    padding:12px;
}

.bt-mphb input::placeholder,
.bt-mphb textarea::placeholder{ color: rgba(242,242,242,.45); }

.bt-mphb input:hover,
.bt-mphb select:hover,
.bt-mphb textarea:hover{ background: rgba(255,255,255,.06); }

.bt-mphb input:focus,
.bt-mphb select:focus,
.bt-mphb textarea:focus{
    border-color: rgba(243,231,208,.65);
    box-shadow: 0 0 0 4px rgba(243,231,208,.10);
    background: rgba(255,255,255,.06);
}

.bt-mphb select{
    appearance: none;
    background-image:
            linear-gradient(45deg, transparent 50%, rgba(242,242,242,.65) 50%),
            linear-gradient(135deg, rgba(242,242,242,.65) 50%, transparent 50%);
    background-position:
            calc(100% - 18px) 18px,
            calc(100% - 12px) 18px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.bt-mphb .mphb_sc_availability-submit,
.bt-mphb .mphb_sc_search-submit,
.bt-mphb input[type="submit"],
.bt-mphb button,
.bt-mphb .button{
    height:44px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(243,231,208,.45);
    background: rgba(243,231,208,.10);
    color: var(--text);
    cursor:pointer;
    font-weight: 600;
    letter-spacing: .2px;
    transition: transform .06s ease, background .18s ease, border-color .18s ease;
    white-space: nowrap;
}
.bt-mphb .mphb_sc_availability-submit:hover,
.bt-mphb .mphb_sc_search-submit:hover,
.bt-mphb input[type="submit"]:hover,
.bt-mphb button:hover,
.bt-mphb .button:hover{
    background: rgba(243,231,208,.18);
    border-color: rgba(243,231,208,.65);
}
.bt-mphb .mphb_sc_availability-submit:active,
.bt-mphb .mphb_sc_search-submit:active,
.bt-mphb input[type="submit"]:active,
.bt-mphb button:active,
.bt-mphb .button:active{
    transform: translateY(1px);
}

.bt-mphb .mphb-errors-wrapper,
.bt-mphb .mphb-error{
    color: #ffd6d6;
    background: rgba(255, 88, 88, .08);
    border: 1px solid rgba(255, 88, 88, .20);
    border-radius: 12px;
    padding: 10px 12px;
}

/* ---------- 2) jQuery UI Datepicker (MPHB) ---------- */
.ui-datepicker{
    background: #0f1114;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 18px 40px rgba(0,0,0,.45);
    color: var(--text);
}
.ui-datepicker .ui-datepicker-header{ background: transparent; border: 0; color: var(--text); }
.ui-datepicker .ui-datepicker-title{ font-weight: 700; }
.ui-datepicker table{ border-collapse: collapse; }
.ui-datepicker th{
    color: rgba(242,242,242,.55);
    font-weight: 600;
    padding: 6px 0;
}
.ui-datepicker td a{
    display:block;
    padding: 8px 0;
    text-align:center;
    border-radius: 10px;
    color: rgba(242,242,242,.88);
    background: transparent;
    border: 0;
}
.ui-datepicker td a:hover{ background: rgba(255,255,255,.06); }
.ui-datepicker .ui-state-active{
    background: rgba(243,231,208,.18) !important;
    color: var(--text) !important;
}

/* ---------- 3) Search results page ---------- */
.mphb_sc_search_results-wrapper{ color: var(--text); }
.mphb_sc_search_results-wrapper p{ line-height: 1.55; }

/* ✅ ВАЖНО: cart НЕЛЬЗЯ display:none — иначе ломается Book.
   Скрываем “визуально”, но оставляем в DOM */
#mphp-reservation-cart,
.mphb-reservation-cart{
    position: absolute !important;
    left: -99999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

/* Recommended card */
.mphb-recommendation{
    background: rgba(255,255,255,.03) !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    padding: 18px !important;
    margin: 0 0 22px 0 !important;

    display:grid !important;
    grid-template-columns: 1fr 260px !important;
    gap: 18px !important;
    align-items: center !important;
}

.mphb-recommendation-details-list{
    margin: 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}
.mphb-recommendation-details-list li{ margin: 0 !important; }

.mphb-recommendation-item{
    display:flex !important;
    flex-wrap:wrap !important;
    gap: 8px !important;
    align-items: baseline !important;
}

.mphb-recommendation-item-count{ color: var(--muted) !important; }

.mphb-recommedation-item-subtotal{
    float:none !important;
    display:inline-block !important;
    margin-left: 10px !important;
    color: rgba(243,231,208,.95) !important;
    font-weight: 800 !important;
}

.mphb-recommendation-total{
    margin: 0 !important;
    text-align: right !important;
}
.mphb-recommendation-total-title{ color: var(--muted) !important; }
.mphb-recommendation-total-value .mphb-price{
    font-size: 20px !important;
    font-weight: 850 !important;
    color: rgba(243,231,208,.95) !important;
}
.mphb-recommendation-reserve-button{
    justify-self: end !important;
    margin-top: 12px !important;
}

/* Room card */
.mphb-room-type{
    background: rgba(255,255,255,.03) !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    padding: 22px !important;
    margin: 0 !important;

    display:grid !important;
    grid-template-columns: 1fr 260px !important;
    gap: 18px !important;
    align-items: start !important;

    position: relative !important; /* ✅ важно для псевдо-слоёв */
}

.mphb-room-type-title.entry-title{
    grid-column: 1 / -1 !important;
    margin: 0 0 6px 0 !important;
    font-size: 34px !important;
    letter-spacing: .2px !important;
}

.mphb-view-details-button-wrapper{
    grid-column: 2 / 3 !important;
    align-self: start !important;
    margin: 0 !important;
    display:flex !important;
    justify-content:flex-end !important;
}
.mphb-view-details-button{
    background: transparent !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 999px !important;
    height: 44px !important;
    padding: 0 18px !important;
}

/* hide stray cart text if it appears */
.mphb-empty-cart-message{ display:none !important; }

/* Search results mobile stack */
@media (max-width: 900px){
    .mphb-recommendation{ grid-template-columns: 1fr !important; }
    .mphb-recommendation-total{ text-align:left !important; }
    .mphb-recommendation-reserve-button{
        width:100% !important;
        justify-self: stretch !important;
    }

    .mphb-room-type{ grid-template-columns: 1fr !important; }
    .mphb-view-details-button-wrapper{
        grid-column: 1 / -1 !important;
        justify-content:flex-start !important;
        margin-top: 6px !important;
    }
    .mphb-view-details-button{ width:100% !important; }
}

/* ---------- 4) Checkout page ---------- */
.mphb_sc_checkout-wrapper,
.mphb_sc_checkout-wrapper *{
    font-family: inherit !important;
    color: var(--text) !important;
}

main.section > .container:has(.mphb_sc_checkout-wrapper) > .h2,
main.section > .container:has(.mphb_sc_checkout-wrapper) > .muted{ display:none !important; }

main.section > .container:has(.mphb_sc_search_results-wrapper) > .h2,
main.section > .container:has(.mphb_sc_search_results-wrapper) > .muted{ display:none !important; }

.mphb_sc_checkout-form{
    display:grid !important;
    grid-template-columns: 1fr 360px !important;
    gap: 18px !important;
    align-items:start !important;
}

.mphb-checkout-section{
    background: rgba(255,255,255,.03) !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    padding: 18px !important;
    margin: 0 0 18px 0 !important;
}

#mphb-booking-details,
#mphb-customer-details{ grid-column: 1 / 2 !important; }

#mphb-price-details{
    grid-column: 2 / 3 !important;
    position: sticky !important;
    top: 90px !important;
}

.mphb-booking-details-title,
.mphb-customer-details-title{
    margin: 0 0 12px 0 !important;
    font-size: 22px !important;
    letter-spacing: .2px !important;
}
.mphb-price-breakdown-title{
    margin: 0 0 12px 0 !important;
    font-size: 18px !important;
    color: rgba(242,242,242,.92) !important;
}

.mphb-check-in-date,
.mphb-check-out-date{ margin: 8px 0 !important; color: var(--muted) !important; }
.mphb-check-in-date span,
.mphb-check-out-date span{ color: var(--muted) !important; }
.mphb-check-in-date strong,
.mphb-check-out-date strong{ color: rgba(242,242,242,.95) !important; }

.mphb-room-details{
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255,255,255,.10) !important;
}
.mphb-room-number{
    margin: 0 0 10px 0 !important;
    font-size: 16px !important;
    color: rgba(242,242,242,.92) !important;
}
.mphb-room-type-title a{
    color: rgba(242,242,242,.95) !important;
    text-decoration: none !important;
}
.mphb-room-type-title a:hover{ text-decoration: underline !important; }

.mphb_sc_checkout-form p{ margin: 0 0 12px 0 !important; }

.mphb_sc_checkout-form label{
    display:block !important;
    margin: 0 0 8px 0 !important;
    font-size: 13px !important;
    color: rgba(242,242,242,.85) !important;
}

.mphb_sc_checkout-form input[type="text"],
.mphb_sc_checkout-form input[type="email"],
.mphb_sc_checkout-form input[type="tel"],
.mphb_sc_checkout-form input[type="number"],
.mphb_sc_checkout-form select,
.mphb_sc_checkout-form textarea{
    width: 100% !important;
    height: 44px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid var(--line) !important;
    background: rgba(255,255,255,.04) !important;
    color: var(--text) !important;
    outline: none !important;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease !important;
}
.mphb_sc_checkout-form textarea{
    height: auto !important;
    min-height: 120px !important;
    padding: 12px !important;
}
.mphb_sc_checkout-form input:focus,
.mphb_sc_checkout-form select:focus,
.mphb_sc_checkout-form textarea:focus{
    border-color: rgba(243,231,208,.65) !important;
    box-shadow: 0 0 0 4px rgba(243,231,208,.10) !important;
    background: rgba(255,255,255,.06) !important;
}

.mphb-price-breakdown{
    width: 100% !important;
    border-collapse: collapse !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
}
.mphb-price-breakdown td,
.mphb-price-breakdown th{
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    font-size: 14px !important;
}
.mphb-price-breakdown .mphb-table-price-column{ text-align: right !important; }
.mphb-price-breakdown-total th{ font-size: 15px !important; font-weight: 800 !important; }
.mphb-price-breakdown-total .mphb-price{
    color: rgba(243,231,208,.95) !important;
    font-weight: 900 !important;
}
.mphb-price-breakdown-expand{
    text-decoration: none !important;
    color: rgba(242,242,242,.92) !important;
}
.mphb-price-breakdown-expand:hover{ text-decoration: underline !important; }

.mphb-total-price{
    grid-column: 2 / 3 !important;
    margin: 0 !important;
    background: rgba(255,255,255,.03) !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    padding: 16px 18px !important;
}
.mphb-total-price-field .mphb-price{
    color: rgba(243,231,208,.95) !important;
    font-weight: 900 !important;
    font-size: 20px !important;
}
.mphb-errors-wrapper{
    grid-column: 1 / -1 !important;
    margin: 0 0 14px 0 !important;
    color: #ffd6d6 !important;
    background: rgba(255, 88, 88, .08) !important;
    border: 1px solid rgba(255, 88, 88, .20) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
}
.mphb_sc_checkout-submit-wrapper{
    grid-column: 2 / 3 !important;
    margin: 0 !important;
}
.mphb_sc_checkout-submit-wrapper input[type="submit"].button{
    width: 100% !important;
    height: 48px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(243,231,208,.55) !important;
    background: rgba(243,231,208,.14) !important;
    color: var(--text) !important;
    font-weight: 750 !important;
    cursor: pointer !important;
    transition: transform .06s ease, background .18s ease, border-color .18s ease !important;
}
.mphb_sc_checkout-submit-wrapper input[type="submit"].button:hover{
    background: rgba(243,231,208,.20) !important;
    border-color: rgba(243,231,208,.75) !important;
}
.mphb_sc_checkout-submit-wrapper input[type="submit"].button:active{ transform: translateY(1px) !important; }

@media (max-width: 980px){
    .mphb_sc_checkout-form{ grid-template-columns: 1fr !important; }
    #mphb-price-details{
        position: static !important;
        top:auto !important;
        grid-column: 1 / -1 !important;
    }
    .mphb-total-price,
    .mphb_sc_checkout-submit-wrapper{ grid-column: 1 / -1 !important; }
}

/* ---------- 5) Confirmation ---------- */
.mphb_sc_checkout-wrapper .mphb-reservation-submitted-title{
    background: rgba(255,255,255,.03) !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    padding: 18px !important;
    margin: 0 0 14px 0 !important;

    font-size: 26px !important;
    letter-spacing: .2px !important;
    color: rgba(242,242,242,.95) !important;
}
.mphb_sc_checkout-wrapper .mphb_sc_checkout-success-reservation-message{
    background: rgba(255,255,255,.02) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 18px !important;
    padding: 16px 18px !important;
    margin: 0 !important;

    color: var(--muted) !important;
    line-height: 1.6 !important;
    font-size: 15px !important;
}
.mphb_sc_checkout-wrapper a{
    color: rgba(242,242,242,.92) !important;
    text-decoration: underline !important;
}
.mphb_sc_checkout-wrapper a:hover{ opacity: .9 !important; }

/* =========================================================
   CRITICAL CLICK FIX (на всякий случай)
   Псевдо-слои не ловят клики + кнопки выше слоёв
========================================================= */

.mphb-room-type::before,
.mphb-room-type::after{
    pointer-events: none !important;
}

.mphb-reserve-room-section,
.mphb-view-details-button-wrapper,
.mphb-book-button,
.mphb-view-details-button{
    position: relative !important;
    z-index: 10 !important;
}

/* =========================================
   MPHB button (base)
   ========================================= */
.mphb-button,
button.mphb-button,
a.mphb-button{
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 48px;
    padding: 0 18px;
    border-radius: 999px;

    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.04);
    color: var(--text);

    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1;
    text-decoration: none;

    cursor: pointer;
    transition: transform .08s ease, background .18s ease, border-color .18s ease, filter .18s ease;
}

.mphb-button:hover,
button.mphb-button:hover,
a.mphb-button:hover{
    background: rgba(255,255,255,.07);
    border-color: rgba(243,231,208,.55);
    transform: translateY(-1px);
}

.mphb-button:active,
button.mphb-button:active,
a.mphb-button:active{
    transform: translateY(0);
}

/* Focus */
.mphb-button:focus-visible,
button.mphb-button:focus-visible,
a.mphb-button:focus-visible{
    outline: none;
    box-shadow: 0 0 0 4px rgba(243,231,208,.10);
    border-color: rgba(243,231,208,.65);
}

/* Disabled */
.mphb-button[disabled],
button.mphb-button[disabled],
a.mphb-button[aria-disabled="true"]{
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   MPHB button (primary look) — если нужен "solid"
   Добавляй класс .is-primary рядом: mphb-button is-primary
   ========================================= */
.mphb-button.is-primary,
button.mphb-button.is-primary,
a.mphb-button.is-primary{
    background: var(--accent);
    border-color: transparent;
    color: #0b0c0e;
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(0,0,0,.35);
}

.mphb-button.is-primary:hover,
button.mphb-button.is-primary:hover,
a.mphb-button.is-primary:hover{
    filter: brightness(1.03);
}
