
/* JTT Operations Engine 0.5.4 — customer-visible My Trip / service checkout */

.jtt-oe-my-trip-page .entry-title,
.jtt-oe-my-trip-page .page-title {
    letter-spacing: -0.02em;
}

.jtt-oe-trip-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 28px;
    padding: 24px 26px;
    border: 1px solid rgba(21, 81, 75, 0.14);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(20, 38, 38, 0.055);
}

.jtt-oe-trip-intro h2 {
    margin: 4px 0 8px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.02;
}

.jtt-oe-trip-intro p {
    max-width: 680px;
    margin: 0;
    color: #66706f;
}

.jtt-oe-trip-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15em;
    color: #176b60;
}

.jtt-oe-trip-count-card {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    background: #eef8f4;
    color: #176b60;
    font-weight: 700;
    white-space: nowrap;
}

.jtt-oe-trip-item-actions {
    margin-top: 8px;
    font-size: 13px;
}

.jtt-oe-trip-item-actions a {
    color: #176b60;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.jtt-oe-trip-guests {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #e5eaea;
    border-radius: 999px;
    background: #f7f9f9;
    color: #444;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

/* Travel experiences are not stock units. Never expose Woo +/- as guest controls. */
.jtt-oe-my-trip-page .quantity,
.jtt-oe-my-trip-page .wc-block-components-quantity-selector {
    display: none !important;
}

.jtt-oe-cart-secondary-action {
    margin-top: 20px;
}

.jtt-oe-cart-secondary-action .button {
    border-radius: 999px !important;
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #dfe5e4 !important;
}

.jtt-oe-check-availability {
    width: 100%;
    border-radius: 999px !important;
    text-align: center;
}

/* Woo Cart Blocks are React-owned. Keep their internal text node untouched:
   direct rewrites can race React unmounts in Safari. Hide Woo's original label
   and place a real DOM sibling over the control from trip-commerce.js instead. */
.jtt-oe-my-trip-page .wc-block-cart__submit-button {
    position: relative;
}

.jtt-oe-my-trip-page .wc-block-cart__submit-button .wc-block-components-button__text {
    visibility: hidden;
}

/* Failsafe presentation if a block/theme renders stale shipping shells. The PHP
   cart-needs-shipping filters remain the source of truth. */
.jtt-oe-service-checkout .wc-block-checkout__shipping-fields,
.jtt-oe-service-checkout .wc-block-checkout__shipping-method,
.jtt-oe-service-checkout .wc-block-components-shipping-rates-control,
.jtt-oe-service-checkout .woocommerce-shipping-fields,
.jtt-oe-service-checkout .woocommerce-shipping-totals,
.jtt-oe-service-checkout tr.woocommerce-shipping-totals {
    display: none !important;
}

@media (max-width: 767px) {
    .jtt-oe-trip-intro {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
        border-radius: 16px;
    }
}

/* Checkout Blocks summary: service bookings have no shipping line. */
.jtt-oe-service-checkout .wc-block-components-totals-shipping,
.jtt-oe-my-trip-page .wc-block-components-totals-shipping {
    display: none !important;
}

/* Cart Block parity: PHP localizes the current JTT Tour rows; JS renders this
   stable edit panel instead of guessing fragile internal Woo Block row markup. */
.jtt-oe-block-trip-tools{
    display:grid;
    gap:0;
    margin:0 0 22px;
    border:1px solid rgba(21,81,75,.12);
    border-radius:16px;
    background:#fff;
    overflow:hidden;
}
.jtt-oe-block-trip-tools-title{
    padding:14px 18px 10px;
    color:#314541;
    font-size:13px;
    letter-spacing:.03em;
}
.jtt-oe-block-trip-tool-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:13px 18px;
    border-top:1px solid #eef1f0;
}
.jtt-oe-block-trip-tool-row>div{display:grid;gap:3px;min-width:0}
.jtt-oe-block-trip-tool-row>div>strong{font-size:14px;line-height:1.35;color:#2d3f3c}
.jtt-oe-block-trip-tool-row>div>span{font-size:12px;color:#707a78}
.jtt-oe-block-trip-tool-row.has-availability-change{background:#fffaf0}
.jtt-oe-block-trip-tool-row>div>.jtt-oe-trip-row-warning{
    max-width:720px;
    margin-top:5px;
    color:#8a5b11;
    font-size:12px;
    font-weight:700;
    line-height:1.45;
}
.jtt-oe-block-trip-edit{flex:0 0 auto;color:#176b60;font-size:13px;font-weight:750;text-decoration:underline;text-underline-offset:3px}
.jtt-oe-cart-secondary-action--blocks{margin-bottom:24px}

.jtt-oe-cart-availability{
    margin:0 0 22px;
    padding:20px 22px;
    border:1px solid rgba(178,128,31,.34);
    border-radius:16px;
    background:linear-gradient(135deg,#fffdf8 0%,#fffaf0 100%);
    color:#374440;
    box-shadow:0 10px 28px rgba(72,54,18,.055);
}
.jtt-oe-cart-availability h3{margin:0 0 6px;color:#65440f;font-size:20px;line-height:1.25}
.jtt-oe-cart-availability>p{margin:0;color:#68716e;font-size:14px;line-height:1.55}
.jtt-oe-cart-availability-list{display:grid;gap:10px;margin-top:15px}
.jtt-oe-cart-availability-item{
    padding:14px 15px;
    border:1px solid rgba(178,128,31,.20);
    border-radius:12px;
    background:#fff;
}
.jtt-oe-cart-availability-label{
    display:inline-flex;
    margin-bottom:5px;
    color:#986714;
    font-size:11px;
    font-weight:800;
    letter-spacing:.055em;
    text-transform:uppercase;
}
.jtt-oe-cart-availability-item h4{margin:0 0 5px;color:#263936;font-size:16px;line-height:1.35}
.jtt-oe-cart-availability-item p{margin:0;color:#5f6d69;font-size:13px;line-height:1.55}
.jtt-oe-cart-availability-item.is-available{border-color:rgba(23,107,96,.28);background:#fbfffd}
.jtt-oe-cart-availability-item.is-available .jtt-oe-cart-availability-label{color:#176b60}
.jtt-oe-cart-availability-remaining{margin-top:7px!important;color:#8a5b11!important;font-weight:700;font-variant-numeric:tabular-nums}
.jtt-oe-cart-availability-action{display:inline-flex!important;justify-content:center;max-width:100%;margin-top:11px!important;border-radius:999px!important;white-space:normal!important;text-align:center}
.jtt-oe-cart-availability-continuation{
    margin-top:14px!important;
    padding-top:12px;
    border-top:1px solid rgba(178,128,31,.18);
    color:#4c5c58!important;
    font-weight:650;
}

@media(max-width:767px){
    .jtt-oe-block-trip-tool-row{align-items:flex-start;padding:13px 15px}
    .jtt-oe-cart-availability{padding:17px 16px;border-radius:14px}
    .jtt-oe-cart-availability h3{font-size:18px}
    .jtt-oe-cart-availability-item{padding:13px}
    .jtt-oe-trip-count-card{white-space:normal;text-align:center}
}

/* 0.5.24 — fused performance/i18n/nav hardening. */
.jtt-oe-duplicate-my-trip{
    display:none !important;
}

/* Stable server-rendered labels are kept off-screen so TranslatePress can
   translate them before JS composes dynamic date/count UI. */
.jtt-oe-translatable-sources{
    position:fixed !important;
    left:-10000px !important;
    top:0 !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;
    pointer-events:none !important;
}

/* Real DOM overlay: translatable, Safari-safe, and independent of CSS content:. */
.jtt-oe-checkout-overlay-host{
    position:relative !important;
}
.jtt-oe-checkout-label-overlay{
    position:absolute;
    inset:0;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:inherit;
    box-sizing:border-box;
    color:inherit;
    font:inherit;
    line-height:inherit;
    pointer-events:none;
    text-align:center;
}

.jtt-oe-block-trip-actions{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:12px;
}
.jtt-oe-block-trip-edit,
.jtt-oe-block-trip-remove,
.jtt-oe-inline-cancel{
    appearance:none;
    border:0;
    padding:0;
    background:transparent;
    cursor:pointer;
    font:inherit;
    font-size:13px;
    font-weight:750;
    text-decoration:underline;
    text-underline-offset:3px;
}
.jtt-oe-block-trip-edit{color:#176b60}
.jtt-oe-block-trip-remove{color:#7b4a40}

.jtt-oe-inline-editor{
    grid-column:1 / -1;
    width:100%;
    display:grid;
    grid-template-columns:minmax(180px,1fr) minmax(120px,.55fr) auto;
    gap:12px;
    align-items:end;
    margin-top:12px;
    padding-top:14px;
    border-top:1px solid #e9eeec;
}
.jtt-oe-inline-editor label{
    display:grid;
    gap:6px;
    margin:0;
}
.jtt-oe-inline-editor label>span{
    color:#5f6d69;
    font-size:12px;
    font-weight:700;
}
.jtt-oe-inline-editor input,
.jtt-oe-inline-editor select{
    width:100%;
    min-height:42px;
    margin:0;
    padding:8px 10px;
    border:1px solid #dce4e1;
    border-radius:10px;
    background:#fff;
    color:#263936;
}
.jtt-oe-inline-editor-controls{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:42px;
}
.jtt-oe-inline-save{
    margin:0 !important;
    border-radius:999px !important;
    white-space:nowrap;
}
.jtt-oe-inline-message{
    grid-column:1 / -1;
    margin-top:8px;
    color:#176b60;
    font-size:12px;
    font-weight:700;
}
.jtt-oe-inline-message.is-error{color:#a33d2f}
.jtt-oe-block-trip-tool-row.is-busy{opacity:.72}

/* Allow inline editor to span the row while preserving the existing compact card. */
.jtt-oe-block-trip-tool-row{
    flex-wrap:wrap;
}
.jtt-oe-block-trip-tool-row>div:first-child{
    flex:1 1 420px;
}

.jtt-oe-dynamic-value,
.jtt-oe-meta-date,
.jtt-oe-meta-count,
.jtt-oe-meta-language,
.jtt-oe-count-number,
.jtt-oe-nav-count,
.jtt-oe-hold-time-value{
    font-variant-numeric:tabular-nums;
}

@media(max-width:767px){
    .jtt-oe-block-trip-actions{
        width:100%;
        justify-content:flex-start;
    }
    .jtt-oe-inline-editor{
        grid-template-columns:1fr;
        align-items:stretch;
    }
    .jtt-oe-inline-editor-controls{
        justify-content:flex-start;
    }
    .jtt-oe-inline-save{
        flex:1 1 auto;
    }
}

/* My Trip has one clear place for itinerary management. Woo's lower Product
   table remains the commercial/price summary, so duplicate date/guest/remove
   controls are suppressed there without touching names, thumbnails or totals. */
.jtt-oe-my-trip-page .wc-block-cart-items .wc-block-components-product-details,
.jtt-oe-my-trip-page .wc-block-cart-items .wc-block-cart-item__remove-link{
    display:none !important;
}
