/*
 Theme Name:   Cococure
 Theme URI:    https://cococure.com
 Description:  Standalone Cococure theme — the Avada-child code moved onto its own minimal chassis. Header/nav renders via cococure-nav (wp_body_open), footer via the [cococure_footer] wp_footer fallback; every page template, TEC/Woo override and stylesheet carried over unchanged.
 Author:       Cococure
 Author URI:   https://cococure.com
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  cococure
*/

/* ============================================
   TRIBE TICKETS - LARGER QUANTITY BUTTONS
   Global styles for better tap targets
   ============================================ */

/* Quantity container */
.tribe-tickets__tickets-item-quantity,
.tribe-common .tribe-tickets__tickets-item-quantity,
.fusion-body .tribe-tickets__tickets-item-quantity {
    display: flex !important;
    align-items: center !important;
    background: rgba(0, 0, 0, 0.08) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

/* Plus and Minus buttons - LARGER */
.tribe-tickets__tickets-item-quantity-minus,
.tribe-tickets__tickets-item-quantity-plus,
.tribe-common .tribe-tickets__tickets-item-quantity-minus,
.tribe-common .tribe-tickets__tickets-item-quantity-plus,
.fusion-body .tribe-tickets__tickets-item-quantity-minus,
.fusion-body .tribe-tickets__tickets-item-quantity-plus,
body .tribe-tickets__tickets-item-quantity-minus,
body .tribe-tickets__tickets-item-quantity-plus,
body.fusion-body .tribe-tickets__tickets-item-quantity-minus,
body.fusion-body .tribe-tickets__tickets-item-quantity-plus {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hover state for buttons - Default (teal) */
.tribe-tickets__tickets-item-quantity-minus:hover,
.tribe-tickets__tickets-item-quantity-plus:hover,
body .tribe-tickets__tickets-item-quantity-minus:hover,
body .tribe-tickets__tickets-item-quantity-plus:hover,
.fusion-body .tribe-tickets__tickets-item-quantity-minus:hover,
.fusion-body .tribe-tickets__tickets-item-quantity-plus:hover,
body.fusion-body .tribe-tickets__tickets-item-quantity-minus:hover,
body.fusion-body .tribe-tickets__tickets-item-quantity-plus:hover {
    background: #2ec4b6 !important;
    color: #000 !important;
}

/* VENUE-SPECIFIC HOVER COLORS */

/* Cococure Haus Stratford - Refined Gold (#c9a227) */
.venue-haus .tribe-tickets__tickets-item-quantity-minus:hover,
.venue-haus .tribe-tickets__tickets-item-quantity-plus:hover,
.venue-theme-haus .tribe-tickets__tickets-item-quantity-minus:hover,
.venue-theme-haus .tribe-tickets__tickets-item-quantity-plus:hover,
body.venue-haus .tribe-tickets__tickets-item-quantity-minus:hover,
body.venue-haus .tribe-tickets__tickets-item-quantity-plus:hover {
    background: #c9a227 !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(201, 162, 39, 0.3) !important;
}

/* Cococure Cite - Teal (#00d4aa) */
.venue-cite .tribe-tickets__tickets-item-quantity-minus:hover,
.venue-cite .tribe-tickets__tickets-item-quantity-plus:hover,
.venue-theme-cite .tribe-tickets__tickets-item-quantity-minus:hover,
.venue-theme-cite .tribe-tickets__tickets-item-quantity-plus:hover,
body.venue-cite .tribe-tickets__tickets-item-quantity-minus:hover,
body.venue-cite .tribe-tickets__tickets-item-quantity-plus:hover {
    background: #00d4aa !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.3) !important;
}

/* TWNTY7 - Pink/Magenta (#ff2d55) */
.venue-twnty7 .tribe-tickets__tickets-item-quantity-minus:hover,
.venue-twnty7 .tribe-tickets__tickets-item-quantity-plus:hover,
.venue-theme-twnty7 .tribe-tickets__tickets-item-quantity-minus:hover,
.venue-theme-twnty7 .tribe-tickets__tickets-item-quantity-plus:hover,
body.venue-twnty7 .tribe-tickets__tickets-item-quantity-minus:hover,
body.venue-twnty7 .tribe-tickets__tickets-item-quantity-plus:hover {
    background: #ff2d55 !important;
    color: #fff !important;
    box-shadow: 0 0 20px rgba(255, 45, 85, 0.5) !important;
}

/* Gold theme (default event page / VIP) */
.coco-event-page .tribe-tickets__tickets-item-quantity-minus:hover,
.coco-event-page .tribe-tickets__tickets-item-quantity-plus:hover {
    background: #d4af37 !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3) !important;
}

/* Number input in the middle */
.tribe-tickets__tickets-item-quantity-number,
.tribe-common .tribe-tickets__tickets-item-quantity-number,
.fusion-body .tribe-tickets__tickets-item-quantity-number,
body .tribe-tickets__tickets-item-quantity-number,
body.fusion-body .tribe-tickets__tickets-item-quantity-number {
    width: 56px !important;
    height: 52px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    text-align: center !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Hide spinner arrows on number input */
.tribe-tickets__tickets-item-quantity-number::-webkit-outer-spin-button,
.tribe-tickets__tickets-item-quantity-number::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Mobile - Even larger touch targets */
@media (max-width: 768px) {
    .tribe-tickets__tickets-item-quantity-minus,
    .tribe-tickets__tickets-item-quantity-plus,
    body .tribe-tickets__tickets-item-quantity-minus,
    body .tribe-tickets__tickets-item-quantity-plus,
    .fusion-body .tribe-tickets__tickets-item-quantity-minus,
    .fusion-body .tribe-tickets__tickets-item-quantity-plus,
    body.fusion-body .tribe-tickets__tickets-item-quantity-minus,
    body.fusion-body .tribe-tickets__tickets-item-quantity-plus {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
        font-size: 32px !important;
    }
    
    .tribe-tickets__tickets-item-quantity-number,
    body .tribe-tickets__tickets-item-quantity-number,
    .fusion-body .tribe-tickets__tickets-item-quantity-number,
    body.fusion-body .tribe-tickets__tickets-item-quantity-number {
        width: 60px !important;
        height: 56px !important;
        font-size: 22px !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .tribe-tickets__tickets-item-quantity-minus,
    .tribe-tickets__tickets-item-quantity-plus,
    body .tribe-tickets__tickets-item-quantity-minus,
    body .tribe-tickets__tickets-item-quantity-plus,
    .fusion-body .tribe-tickets__tickets-item-quantity-minus,
    .fusion-body .tribe-tickets__tickets-item-quantity-plus,
    body.fusion-body .tribe-tickets__tickets-item-quantity-minus,
    body.fusion-body .tribe-tickets__tickets-item-quantity-plus {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        min-height: 54px !important;
        font-size: 30px !important;
    }
    
    .tribe-tickets__tickets-item-quantity-number,
    body .tribe-tickets__tickets-item-quantity-number,
    .fusion-body .tribe-tickets__tickets-item-quantity-number,
    body.fusion-body .tribe-tickets__tickets-item-quantity-number {
        width: 58px !important;
        height: 54px !important;
        font-size: 22px !important;
    }
}

/* Touch devices - largest targets */
@media (hover: none) and (pointer: coarse) {
    .tribe-tickets__tickets-item-quantity-minus,
    .tribe-tickets__tickets-item-quantity-plus,
    body .tribe-tickets__tickets-item-quantity-minus,
    body .tribe-tickets__tickets-item-quantity-plus,
    .fusion-body .tribe-tickets__tickets-item-quantity-minus,
    .fusion-body .tribe-tickets__tickets-item-quantity-plus,
    body.fusion-body .tribe-tickets__tickets-item-quantity-minus,
    body.fusion-body .tribe-tickets__tickets-item-quantity-plus {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
        font-size: 34px !important;
    }
    
    .tribe-tickets__tickets-item-quantity-number,
    body .tribe-tickets__tickets-item-quantity-number,
    .fusion-body .tribe-tickets__tickets-item-quantity-number,
    body.fusion-body .tribe-tickets__tickets-item-quantity-number {
        width: 64px !important;
        height: 60px !important;
        font-size: 24px !important;
    }
}

/* ============================================
   IOS CHROME LAYOUT FIX — TICKET QTY PANEL
   --------------------------------------------------
   Symptom: on iPhone Chrome the entire page reports
   wider than the viewport, so it scrolls horizontally
   and the right-hand side of every row (incl. the
   ticket + button) sits off-screen. Safari iOS doesn't
   scroll because it shrinks the page to fit when it
   detects overflow, while Chrome iOS doesn't.

   Fix in two parts:
     1. Hard-clip horizontal overflow at the page level.
        This is the universally-correct guard against
        any single rule on the page producing >100vw
        layout (Tribe widgets, chart embeds, fixed
        modals, etc.). Vertical scroll preserved.
     2. Keep the +/− buttons themselves at a fixed 52px
        with the modern tap defaults, but let the qty
        panel itself shrink/flex normally — DO NOT use
        min-width:max-content here, that allows a flex
        child to push the row wider than the viewport.
   ============================================ */

/* Hard horizontal-overflow lock — applied to html AND body so any
   single rule on the page that exceeds 100% (Tribe widgets, hero
   bleeds, custom ticket banners with gradient borders, etc.) gets
   clipped instead of forcing the document to scroll. iOS Safari and
   Chrome both honour overflow-x: hidden on <html>. */
html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
}
body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
}

/* Universal viewport-width cap for the entire event page.
   --------------------------------------------------
   The event single template renders dozens of sections
   (hero, strip, dine & stay, tickets, tables, share buttons,
   essential info, FAQ, final CTA, sticky footer) each with
   their own internal flex/grid layouts and inline-style
   widths. Rather than hunt for whichever single element
   is forcing the body wider than viewport on iPhone Chrome,
   this block hard-caps every container at 100% viewport and
   forces box-sizing: border-box so paddings count inside.
   Anything that wants to scroll horizontally (the quick
   info strip) does so inside its own bounds. */
#tribe-events-content,
#tribe-events-content > *,
.coco-event-page,
.coco-event-page > *,
.coco-event-page section,
.coco-event-page article,
.coco-event-page aside,
.coco-event-page .coco-card,
.coco-event-page .coco-event-main,
.coco-event-page .coco-event-left,
.coco-event-page .coco-event-right,
.coco-event-page .coco-event-hero,
.coco-event-page .coco-event-strip,
.coco-event-page .coco-event-final-cta,
.coco-event-page .coco-event-faq,
.coco-event-page .coco-event-social,
.coco-event-page .coco-tables-grid,
.coco-event-page .coco-dining-grid,
.coco-event-page .coco-payment-badges,
.coco-event-page .cococure-share-container,
.coco-event-page .tribe-tickets__cart,
.coco-event-page .tribe-tickets__cart-wrap,
.coco-event-page .tribe-tickets__form-wrap,
.coco-event-page .tribe-tickets__tickets-form,
.coco-event-page .tribe-tickets__tickets-list,
.coco-event-page .tribe-tickets__tickets-item,
.coco-event-page .ticket-section,
.coco-event-page .ticket-section-header,
.coco-event-page .tickets-section {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Containers that must not horizontally scroll the document.
   The .coco-event-strip is intentionally horizontally scrollable
   *within itself*, but only because its own overflow-x: auto
   keeps the scroll inside. Every other container clips. */
.coco-event-page,
.coco-event-page .coco-event-main,
.coco-event-page .coco-event-left,
.coco-event-page .coco-event-right,
.coco-event-page .coco-card,
.coco-event-page .tribe-tickets__cart,
.coco-event-page .tribe-tickets__form-wrap {
    overflow-x: hidden !important;
}

/* The quick info strip should scroll horizontally INTERNALLY
   only — never push the document wider. */
@media (max-width: 768px) {
    .coco-event-page .coco-event-strip {
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: auto !important;
    }
}

/* ============================================
   FIX: Join Waitlist button — fit without char-break
   --------------------------------------------------
   Sold-out rows render a "Join Waitlist" button. We
   need to:
     1. Reserve the OUTER quantity column enough width
        for the button (~110px) so the inner button
        isn't forced into a 50px column and breaking
        per-character (J O I / N / W A / I T L / I S T).
     2. Allow text wrap at word boundaries only —
        NEVER mid-word. So "JOIN WAITLIST" can render
        as either one line or two lines stacked, but
        never as letter-stack.
     3. Strip Tribe's heavy padding so it fits. */

/* Reserve column width — but the SAME .tribe-tickets__tickets-item-quantity
   wrapper is reused for sold-out rows (just a Waitlist button) AND for
   available rows ([−] [qty] [+], ~170px wide). Tribe sets data-available
   on the row, use that to differentiate so neither variant gets crushed. */
.coco-event-page .tribe-tickets__tickets-item-quantity {
    flex-shrink: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
}
/* Sold-out / waitlist rows — narrow column for "Join Waitlist". */
.coco-event-page .tribe-tickets__tickets-item[data-available="false"] .tribe-tickets__tickets-item-quantity {
    min-width: 100px !important;
    max-width: 130px !important;
}
/* Available rows — wide enough for the [−] qty [+] trio. */
.coco-event-page .tribe-tickets__tickets-item[data-available="true"] .tribe-tickets__tickets-item-quantity {
    min-width: 170px !important;
    max-width: 200px !important;
}

.coco-event-page .tribe-tickets__tickets-item-waitlist,
.tribe-tickets__tickets-item-waitlist {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.coco-event-page .tribe-tickets__tickets-item-waitlist-trigger,
.tribe-tickets__tickets-item-waitlist-trigger {
    width: 100% !important;
    max-width: 100% !important;
    /* Wrap at WORD boundaries only — never split a word. */
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    letter-spacing: 0.03em !important;
    box-sizing: border-box !important;
}
@media (max-width: 480px) {
    /* Sold-out / waitlist column can shrink slightly on very small
       screens — single button can fit narrower. */
    .coco-event-page .tribe-tickets__tickets-item[data-available="false"] .tribe-tickets__tickets-item-quantity {
        min-width: 92px !important;
        max-width: 120px !important;
    }
    /* Available column STILL needs ~160px for [−] qty [+]. */
    .coco-event-page .tribe-tickets__tickets-item[data-available="true"] .tribe-tickets__tickets-item-quantity {
        min-width: 160px !important;
        max-width: 190px !important;
    }
    .coco-event-page .tribe-tickets__tickets-item-waitlist-trigger,
    .tribe-tickets__tickets-item-waitlist-trigger {
        font-size: 11px !important;
        padding: 7px 8px !important;
        letter-spacing: 0.02em !important;
    }
}

/* Sticky cart footer on mobile — the Quantity / Total / Get Tickets
   bar should pin to the bottom of the viewport so users always see
   the running total without scrolling all the way down the cart. */
@media (max-width: 768px) {
    .coco-event-page .tribe-tickets__tickets-footer,
    .tribe-tickets__tickets-footer {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 50 !important;
        background: var(--theme-bg-secondary, #0a0a0a) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        margin-left: -1px;
        margin-right: -1px;
        padding: 14px 16px !important;
    }
}

/* ============================================
   FIX: WooCommerce duplicate qty buttons inside Tribe
   --------------------------------------------------
   The Tribe ticket quantity wrapper renders its own
   styled −/+ buttons, but WooCommerce's "quantity
   buttons_added" feature injects ANOTHER pair of
   −/+ <input>s right next to the qty number. End
   result: 5 controls per row (Tribe −, WC −, qty,
   WC +, Tribe +) which is wide enough to push the
   right side off the viewport on mobile and trigger
   horizontal scroll. Strip the WC duplicates and let
   Tribe's styled buttons drive it. */
.tribe-tickets__tickets-item-quantity .quantity.buttons_added .minus,
.tribe-tickets__tickets-item-quantity .quantity.buttons_added .plus,
.tribe-tickets__tickets-item-quantity-number .quantity.buttons_added .minus,
.tribe-tickets__tickets-item-quantity-number .quantity.buttons_added .plus {
    display: none !important;
}
.tribe-tickets__tickets-item-quantity-number .quantity.buttons_added {
    display: inline-block !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.tribe-tickets__tickets-item-quantity-number .quantity.buttons_added .qty {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    text-align: center !important;
    box-shadow: none !important;
}

/* +/− buttons — keep them at fixed size + opt-in to
   modern tap defaults so the hit target is reliable. */
.tribe-tickets__tickets-item-quantity-minus,
.tribe-tickets__tickets-item-quantity-plus,
.tribe-common .tribe-tickets__tickets-item-quantity-minus,
.tribe-common .tribe-tickets__tickets-item-quantity-plus,
.fusion-body .tribe-tickets__tickets-item-quantity-minus,
.fusion-body .tribe-tickets__tickets-item-quantity-plus,
body .tribe-tickets__tickets-item-quantity-minus,
body .tribe-tickets__tickets-item-quantity-plus,
body.fusion-body .tribe-tickets__tickets-item-quantity-minus,
body.fusion-body .tribe-tickets__tickets-item-quantity-plus {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    position: relative !important;
    z-index: 3 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.18) !important;
    pointer-events: auto !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* WhatsApp Chat Button */

/* ── Order-pay page (checkout/order-pay) — brand pass ─────────────────────
   Folabi 8 Aug: default blue links, a white payment box on the dark page,
   and stacked borders (page card + payment box + UPE iframe each drawing
   their own) read as three nested frames. One dark card, gold links. */
.woocommerce-order-pay a,
.woocommerce-order-pay a:visited { color: #C9A96E; }
.woocommerce-order-pay a:hover { color: #E0C089; }

.woocommerce-order-pay #payment,
.woocommerce-order-pay .woocommerce-checkout-payment {
	background: #161210 !important;
	border: 1px solid #2A2A2A !important;
	border-radius: 14px;
}
.woocommerce-order-pay .wc_payment_method .payment_box,
.woocommerce-order-pay .payment_box.payment_method_stripe {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #FAF7F0;
}
.woocommerce-order-pay .wc_payment_methods,
.woocommerce-order-pay .wc_payment_method {
	border: 0 !important;
	background: transparent !important;
}
/* The UPE card iframe container keeps ONE subtle border; everything else none. */
.woocommerce-order-pay .wc-upe-form,
.woocommerce-order-pay .wc-payment-form {
	border: 1px solid #3A322C !important;
	border-radius: 10px;
	padding: 14px;
	background: #0D0D0D !important;
}
.woocommerce-order-pay table.shop_table {
	background: #161210;
	border: 1px solid #2A2A2A;
	border-radius: 14px;
	color: #FAF7F0;
}
.woocommerce-order-pay table.shop_table th,
.woocommerce-order-pay table.shop_table td { border-color: #2A2A2A !important; }
.woocommerce-order-pay #place_order,
.woocommerce-order-pay button.button.alt {
	background: #C9A96E !important;
	color: #0D0D0D !important;
	border: 0 !important;
	border-radius: 10px !important;
	font-weight: 700;
}
.woocommerce-order-pay #place_order:hover { background: #E0C089 !important; }
