/* Edición y avisos del carrito STX */

.stx-cart-agency-cta {
    margin: 0 0 1rem;
}

.stx-cart-agency-cta .woocommerce-info {
    margin: 0;
}

.stx-cart-agency-cta .woocommerce-info a {
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
    white-space: nowrap;
}

.stx-cart-agency-cta .woocommerce-info a:hover,
.stx-cart-agency-cta .woocommerce-info a:focus {
    color: #e07b39;
}

.stx-cart-item-edit {
    margin: 0.65rem 0 0;
}

.stx-cart-item-edit__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.125rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid #1a2329;
    border-radius: 0.35rem;
    background: #fff;
    color: #1a2329;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.stx-cart-item-edit__link:hover,
.stx-cart-item-edit__link:focus {
    background: rgb(0 0 0 / 0.06);
    border-color: #e07b39;
    color: #1a2329;
    text-decoration: none;
}

.stx-cart-item-edit__icon {
    flex-shrink: 0;
    opacity: 0.85;
}

.stx-cart-item-pickup-time {
    display: grid;
    gap: 0.35rem;
    max-width: 14rem;
    margin: 0.7rem 0 0;
}

.stx-cart-item-pickup-time__label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    color: #5c6670;
}

.stx-cart-item-pickup-time__input {
    width: 100%;
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgb(26 35 41 / 0.16);
    border-radius: 0.35rem;
    background: #fff;
    color: #1a2329;
    font: inherit;
}

.stx-cart-item-pickup-time__input:focus {
    border-color: #e07b39;
    box-shadow: 0 0 0 2px rgb(224 123 57 / 0.16);
    outline: none;
}

.cart_totals .stx-cart-summary-tax th,
.cart_totals .stx-cart-summary-tax td,
.woocommerce-checkout-review-order-table .stx-cart-summary-tax th,
.woocommerce-checkout-review-order-table .stx-cart-summary-tax td {
    border-top: 1px solid #eef1f4;
}

.stx-cart-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border-radius: 0.55rem;
    border: 1px solid transparent;
}

.stx-cart-notice--success {
    background: #f3faf0;
    border-color: rgb(74 122 18 / 0.35);
    color: #1a2329;
}

.stx-cart-notice__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #4a7a12;
    color: #fff;
}

.stx-cart-notice__body {
    min-width: 0;
}

.stx-cart-notice__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
    color: #1a2329;
}

/* Términos y condiciones (política de reservaciones) */
.stx-cart-terms {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgb(26 35 41 / 0.12);
    border-radius: 0.55rem;
    background: #fafbfc;
}

.stx-cart-terms__label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 !important;
    font-size: 0.92rem;
    line-height: 1.45;
    cursor: pointer;
}

.stx-cart-terms__input {
    flex-shrink: 0;
    margin: 0.2rem 0 0 !important;
}

.stx-cart-terms__link {
    color: #e07b39;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.stx-cart-terms__link:hover,
.stx-cart-terms__link:focus {
    color: #c45f1f;
}

.stx-cart-unified-checkout .stx-cart-terms {
    margin-top: 0.5rem;
}

/* Payment Plugins PayPal: botones Smart en el método de pago del carrito unificado. */
.stx-cart-unified-checkout #place_order.wc-ppcp-hide-button,
.stx-cart-unified-checkout .button#place_order.wc-ppcp-hide-button {
    display: none !important;
}

.stx-cart-unified-checkout .wc-ppcp-checkout-container,
.stx-cart-unified-checkout .wc-ppcp-payment-method__container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
}

.stx-cart-unified-checkout .wc-ppcp-popup__container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
}

.stx-cart-unified-checkout .wc-ppcp-popup__container img {
    flex: 0 0 auto;
    width: 1.75rem !important;
    height: 1.75rem !important;
    max-width: 1.75rem !important;
    max-height: 1.75rem !important;
}

.stx-cart-unified-checkout .wc-ppcp-popup__container p {
    flex: 1 1 auto;
    margin: 0;
    text-align: left;
    font-size: 0.82rem;
    line-height: 1.45;
}

.stx-cart-unified-checkout .wc-ppcp-checkout-container .paypal-buttons,
.stx-cart-unified-checkout .wc-ppcp-payment-method__container .paypal-buttons,
.stx-cart-unified-checkout #payment .paypal-buttons {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
}

.stx-cart-unified-checkout #payment ul.payment_methods > li:not(:has(> input:checked)) .payment_box {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.woocommerce-invalid .stx-cart-terms,
.stx-cart-terms.woocommerce-invalid {
    border-color: #b42318;
    background: #fff5f5;
}

.stx-cart-checkout-form .stx-checkout-contact-notice {
    margin: 0 0 1rem;
}

.stx-cart-checkout-form .form-row.woocommerce-invalid input.input-text,
.stx-cart-checkout-form .form-row.woocommerce-invalid input[type="email"],
.stx-cart-checkout-form .form-row.woocommerce-invalid input[type="tel"],
.stx-cart-checkout-form .form-row.woocommerce-invalid select {
    border-color: #b42318;
    box-shadow: 0 0 0 1px #b42318;
}

.stx-cart-checkout-form .form-row.woocommerce-invalid label {
    color: #b42318;
}

.stx-cart-notice__text {
    margin: 0.2rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #5c6670;
}

.stx-booking-fields__hint--edit-mode {
    margin: 0 0 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.45rem;
    background: #fff8f3;
    border: 1px solid rgb(224 123 57 / 0.35);
    color: #5c4a3a;
}

@media (max-width: 575px) {
    .stx-cart-item-edit__link {
        width: 100%;
    }
}

/* Códigos promocionales ocultos en carritos con reservas STX (stx_should_hide_promotional_codes). */
body.stx-promotional-codes-hidden .coupon,
body.stx-promotional-codes-hidden .woocommerce-form-coupon-toggle,
body.stx-promotional-codes-hidden .checkout_coupon,
body.stx-promotional-codes-hidden tr.cart-discount {
    display: none !important;
}

/* Paquetes agrupados: precios y descuento solo a nivel de paquete */
.stx-cart-package {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0 0 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e6eaee;
    border-radius: 0.7rem;
    background: #fafbfc;
}

.stx-cart-package__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stx-cart-package__media {
    flex: 0 0 auto;
}

.stx-cart-package__media a,
.stx-cart-package__media img {
    display: block;
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 0.4rem;
}

.stx-cart-package__copy {
    min-width: 0;
}

.stx-cart-package__eyebrow,
.stx-checkout-package-head__eyebrow {
    margin: 0 0 0.15rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e07b39;
}

.stx-cart-package__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    color: #1a2329;
}

.stx-cart-package__title a {
    color: inherit;
    text-decoration: none;
}

.stx-cart-package__discount,
.stx-checkout-package-head__discount {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a7a12;
}

.stx-cart-package__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e6eaee;
}

.stx-cart-package__total--head {
    margin-left: auto;
    padding-top: 0;
    border-top: none;
}

.stx-cart-package__total-label,
.stx-checkout-package-total th {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5c6670;
}

.stx-cart-package__total-value,
.stx-checkout-package-total td {
    font-size: 1rem;
    font-weight: 800;
    color: #e07b39;
}

.stx-checkout-package-head td {
    padding: 0.75rem 0 0.35rem;
}

.stx-checkout-package-head__title {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #1a2329;
}

.stx-checkout-package-total th,
.stx-checkout-package-total td {
    padding: 0.65rem 0 0.85rem;
    border-top: 1px solid #eef1f4;
}

.stx-checkout-item--package-child .product-total,
.stx-checkout-item__package-included {
    display: none;
}

.stx-cart-package__itinerary-label,
.stx-checkout-package-head__itinerary {
    margin: 0.55rem 0 0.15rem;
    padding-top: 0.55rem;
    border-top: 1px solid #eef1f4;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5c6670;
}

.stx-checkout-package-head__itinerary {
    display: block;
    margin-top: 0.7rem;
}

.stx-package-stop {
    display: grid;
    grid-template-columns: 3.35rem minmax(0, 1fr);
    gap: 0.15rem 0.75rem;
    align-items: start;
    position: relative;
}

.stx-package-stop__day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.1rem;
    position: relative;
    z-index: 1;
    padding-top: 0.1rem;
    text-align: center;
}

.stx-package-stop__day-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 2px solid #e07b39;
    border-radius: 999px;
    background: #fff;
    color: #1a2329;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

.stx-package-stop__day-text {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e07b39;
    line-height: 1.2;
}

.stx-package-stop__body {
    min-width: 0;
    padding: 0.1rem 0 0.15rem;
}

.stx-package-stop__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a2329;
}

.stx-package-stop__meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.stx-package-stop__when {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.stx-package-stop__chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e6eaee;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a2329;
}

.stx-package-stop__chip--time {
    background: rgb(224 123 57 / 0.1);
    border-color: rgb(224 123 57 / 0.28);
    color: #c45f1d;
}

.stx-package-stop__transfers {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stx-package-stop__transfer {
    display: grid;
    grid-template-columns: 4.6rem minmax(0, 1fr);
    gap: 0.35rem 0.5rem;
    align-items: baseline;
    font-size: 0.78rem;
    line-height: 1.35;
}

.stx-package-stop__transfer-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5c6670;
}

.stx-package-stop__transfer-value {
    min-width: 0;
    font-weight: 600;
    color: #1a2329;
    overflow-wrap: anywhere;
}

.stx-package-stop__notes {
    margin: 0;
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    background: #fff;
    border: 1px solid #eef1f4;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #3d4a54;
}

.stx-package-stop__notes-label {
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c6670;
}

.stx-cart-item--package-child .stx-cart-item-pickup-time {
    margin-top: 0.45rem;
    max-width: 11rem;
}

.stx-cart-package .stx-cart-item--package-child:not(:last-of-type) .stx-package-stop::before,
.stx-checkout-item--package-child:has(+ .stx-checkout-item--package-child) .stx-package-stop::before {
    content: "";
    position: absolute;
    left: 1.05rem;
    top: 2.4rem;
    bottom: -0.85rem;
    width: 2px;
    background: #e6eaee;
}
