/**
 * TeeTime Booking Pro — SALE Overlay Styles v2.0
 * Clover-branded: DM Sans font, #367A25 green
 *
 * This file uses design tokens from ttbp-tokens.css.
 * All colors, typography, spacing, radii, and shadows reference shared CSS variables.
 */

/* ============================================================
   OVERLAY BACKDROP
   ============================================================ */
.ttbp_sale_overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    /* Higher than WP admin bar (99999) and any theme overlay */
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: var(--ttbp-font);
    /* Prevent parent transform from breaking fixed positioning */
    transform: none;
}

body .ttbp_sale_overlay .ttbp_sale_inner,
body .ttbp_sale_inner {
    background: var(--ttbp-white);
    border-radius: var(--ttbp-radius);
    width: 98vw;
    min-width: 98vw;
    max-width: 98vw;
    height: 98vh;
    height: 98dvh;
    max-height: 98vh;
    max-height: 98dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

/* ============================================================
   HEADER
   ============================================================ */
.ttbp_sale_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ttbp-sp-3) var(--ttbp-sp-4);
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    flex-shrink: 0;
    border-bottom: 3px solid rgba(0,0,0,0.12);
    font-family: var(--ttbp-font);
    gap: var(--ttbp-sp-3);
}

.ttbp_sale_title {
    margin: 0;
    font-size: var(--ttbp-fs-lg);
    font-weight: var(--ttbp-fw-bold);
    display: flex;
    align-items: center;
    gap: var(--ttbp-sp-2);
    color: var(--ttbp-white);
    white-space: nowrap;
}

/* Customer / tab profile badge in header */
.ttbp_hdr_customer_badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: var(--ttbp-sp-2) 18px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    font-size: var(--ttbp-fs-lg);
    font-weight: var(--ttbp-fw-bold);
    color: var(--ttbp-white);
    white-space: normal;
    flex-shrink: 1;
}
.ttbp_hdr_customer_badge .ttbp_hdr_profile_link {
    display: inline-flex;
    align-items: center;
    gap: var(--ttbp-radius);
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--ttbp-radius);
    padding: 6px 14px;
    color: var(--ttbp-white);
    font-size: var(--ttbp-fs-base);
    font-weight: var(--ttbp-fw-bold);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.ttbp_hdr_customer_badge .ttbp_hdr_profile_link:hover {
    background: rgba(255,255,255,0.4);
}
.ttbp_hdr_customer_badge .ttbp_hdr_profile_link i {
    font-size: var(--ttbp-fs-lg);
}
.ttbp_hdr_customer_badge .ttbp_btn_link {
    color: rgba(255,255,255,0.6);
    font-size: var(--ttbp-fs-lg);
    padding: 0 2px;
    margin-left: auto;
    order: 99;
}
.ttbp_hdr_customer_badge .ttbp_btn_link:hover {
    color: var(--ttbp-white);
}

.ttbp_sale_context_badge {
    font-size: 13px;
    font-weight: var(--ttbp-fw-normal);
    background: rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 20px;
}

.ttbp_sale_close_btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--ttbp-white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: var(--ttbp-fs-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.ttbp_sale_close_btn:hover { background: rgba(255,255,255,0.25); }

/* ============================================================
   BODY: 3-ZONE LAYOUT
   ============================================================ */
.ttbp_sale_body {
    display: grid;
    grid-template-columns: clamp(180px, 18vw, 280px) 1fr 380px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

/* ============================================================
   ZONE 1: LEFT SIDEBAR (categories + tabs)
   ============================================================ */
.ttbp_sale_sidebar {
    display: flex;
    flex-direction: column;
    background: #f0f5f2;
    border-right: 1px solid #d4eadc;
    overflow: hidden;
    min-width: 0;
}

/* Categories: content-sized, can push tabs down up to 70% then scroll */
.ttbp_sale_categories {
    flex: 1 1 auto;
    max-height: 70%;
    padding: 6px 6px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

.ttbp_sale_cats_label {
    font-size: 9px;
    font-weight: var(--ttbp-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    padding: 2px 6px var(--ttbp-sp-1);
}

.ttbp_cat_btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    text-align: left;
    padding: var(--ttbp-sp-2) var(--ttbp-sp-2);
    border: none;
    border-left: 3px solid transparent;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: var(--ttbp-fw-bold);
    color: var(--ttbp-gray-700);
    transition: background 0.15s, color 0.15s;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}
.ttbp_cat_btn:hover  { background: var(--cat-light, #d4eadc); color: var(--cat-accent, var(--ttbp-primary)); }
.ttbp_cat_btn.active { background: var(--cat-accent, var(--ttbp-primary)); color: var(--ttbp-white); font-weight: var(--ttbp-fw-bold); }


/* Hot Items tab — always at top, not draggable */
.ttbp_hot_items_wrap {
    margin-bottom: 4px;
}
.ttbp_hot_items_wrap .ttbp_cat_btn {
    font-weight: 600;
}
.ttbp_hot_items_wrap .ttbp_cat_btn.active {
    background: #fff3e0;
    border-color: #ff6d00;
    color: #ff6d00;
}

.ttbp_cat_btn_wrap {
    display: flex;
    align-items: center;
    margin-bottom: 1px;
    border-radius: 5px;
    position: relative;
    cursor: grab;
    transition: opacity 0.15s, outline 0.1s;
}

/* Hidden category */
.ttbp_cat_btn_wrap.ttbp_cat_hidden {
    display: none;
}
.ttbp_cat_btn_wrap:active { cursor: grabbing; }
.ttbp_cat_btn_wrap.ttbp_cat_dragging { opacity: 0.35; }
.ttbp_cat_btn_wrap.ttbp_cat_drop_over {
    outline: 2px dashed var(--cat-accent, var(--ttbp-primary));
    outline-offset: 1px;
}

/* Drag grip handle */
.ttbp_drag_handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    flex-shrink: 0;
    color: #c0c8d0;
    font-size: var(--ttbp-fs-xs);
    cursor: grab;
    padding: 0 2px;
    transition: color 0.15s;
}
.ttbp_cat_btn_wrap:hover .ttbp_drag_handle { color: #94a3b8; }

.ttbp_cat_btn_wrap .ttbp_cat_btn {
    flex: 1;
    min-width: 0;
    width: auto;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    /* Color coded per category via CSS vars set inline */
    background: var(--cat-bg, transparent);
    border-left: 3px solid var(--cat-accent, transparent);
    overflow: hidden;
}
.ttbp_cat_btn_wrap .ttbp_cat_btn:hover {
    background: var(--cat-light, #d4eadc);
    color: var(--cat-accent, var(--ttbp-primary));
}
.ttbp_cat_btn_wrap .ttbp_cat_btn.active {
    background: var(--cat-accent, var(--ttbp-primary));
    color: var(--ttbp-white);
}
.ttbp_cat_btn_wrap .ttbp_cat_btn.active .ttbp_cat_icon {
    color: rgba(255,255,255,0.85);
}

/* Category icon */
.ttbp_cat_icon {
    font-size: var(--ttbp-fs-sm);
    width: 14px;
    text-align: center;
    flex-shrink: 0;
    color: var(--cat-accent, #555);
    transition: color 0.15s;
}
.ttbp_cat_name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* HOT ITEMS section */
.ttbp_hot_items_section {
    border-top: 2px solid var(--ttbp-gray-200);
    padding: var(--ttbp-sp-3) var(--ttbp-sp-2);
    background: #fefef0;
    flex-shrink: 0;
}

.ttbp_hot_items_label {
    font-size: 10px;
    font-weight: var(--ttbp-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e05c00;
    padding: 0 var(--ttbp-sp-1) var(--ttbp-sp-2);
    display: flex;
    align-items: center;
    gap: 5px;
}

#ttbp_hot_items_grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hot_tile {
    border-left: 3px solid #e05c00;
}

/* ============================================================
   ZONE 2: ITEM GRID
   ============================================================ */
.ttbp_sale_grid_zone {
    overflow-y: auto;
    padding: var(--ttbp-sp-4);
    background: #f5f7fa;
}

.ttbp_item_grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    align-content: start;
}

.ttbp_item_tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--tile-accent, #94a3b8);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    gap: 6px;
    transition: all 0.15s;
    min-height: 90px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.ttbp_item_tile:hover {
    background: #f0fdf4;
    border-color: var(--ttbp-primary);
    border-left-color: var(--ttbp-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transform: translateY(-1px);
}
.ttbp_item_tile.tile_tapped { transform: scale(0.96); background: #dcfce7; }

.tile_img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.tile_name {
    font-size: 13px;
    font-weight: var(--ttbp-fw-semibold);
    color: var(--ttbp-gray-900);
    line-height: 1.3;
    word-break: break-word;
    font-family: var(--ttbp-font);
}
.tile_price {
    font-size: 15px;
    font-weight: var(--ttbp-fw-bold);
    color: var(--ttbp-success);
}

/* Taxable item badge — shown on tiles with WC tax_status = taxable */
.tile_tax_badge {
    display: inline-block;
    font-size: 9px;
    font-weight: var(--ttbp-fw-bold);
    letter-spacing: 0.04em;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 3px;
    padding: 1px var(--ttbp-sp-1);
    margin-bottom: 2px;
    align-self: flex-start;
}

/* ============================================================
   ZONE 3: ORDER SUMMARY
   ============================================================ */
.ttbp_sale_order_zone {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--ttbp-gray-200);
    background: #fafafa;
    overflow: hidden;
}

.ttbp_order_summary_header {
    padding: var(--ttbp-sp-2) 14px;
    font-weight: var(--ttbp-fw-bold);
    font-size: 13px;
    border-bottom: 1px solid var(--ttbp-gray-200);
    background: #f0f2f5;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: .04em;
}

#ttbp_order_lines {
    flex: 1;
    overflow-y: auto;
    padding: var(--ttbp-sp-2) 0;
}

.ttbp_order_empty {
    padding: var(--ttbp-sp-5) var(--ttbp-sp-4);
    color: #aaa;
    font-size: 13px;
    text-align: center;
}

.ttbp_order_line {
    display: flex;
    align-items: center;
    padding: var(--ttbp-sp-2) 14px;
    border-bottom: 1px solid #eee;
    gap: 6px;
}
.ttbp_order_line:hover { background: var(--ttbp-gray-50); }
.ol_name  { flex: 1; font-size: 13px; line-height: 1.4; color: #222; }
.ol_price { font-size: 13px; font-weight: var(--ttbp-fw-semibold); color: var(--ttbp-success); white-space: nowrap; }
.ol_remove_btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ttbp-danger);
    padding: 2px 6px;
    font-size: var(--ttbp-fs-xl);
    font-weight: 900;
    line-height: 1;
    border-radius: var(--ttbp-radius-sm);
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.ol_remove_btn .ol_minus {
    font-weight: 900;
    font-size: var(--ttbp-fs-xl);
    line-height: 1;
}
.ol_remove_btn:hover { background: #fde8e8; color: #b91c1c; }

/* Order footer */
.ttbp_order_footer {
    border-top: 2px solid var(--ttbp-gray-200);
    padding: var(--ttbp-sp-2) 14px;
    background: var(--ttbp-white);
    flex-shrink: 0;
}

.ttbp_order_tax_line,
.ttbp_order_total_line {
    display: flex;
    justify-content: space-between;
    font-size: var(--ttbp-fs-base);
    padding: 3px 0;
    color: #555;
}
.ttbp_order_total_line {
    font-size: var(--ttbp-fs-xl);
    font-weight: var(--ttbp-fw-bold);
    color: var(--ttbp-gray-900);
    padding: 6px 0 var(--ttbp-sp-3);
    border-top: 1px solid var(--ttbp-gray-200);
    margin-top: var(--ttbp-sp-1);
    font-family: var(--ttbp-font);
}

/* Payment status box */
.ttbp_payment_status_box {
    background: #f0f7ff;
    border: 1px solid #c5daf7;
    border-radius: var(--ttbp-radius-lg);
    padding: var(--ttbp-sp-3) 14px;
    margin-bottom: var(--ttbp-sp-3);
    font-size: var(--ttbp-fs-base);
}
.ttbp_payment_waiting { display: flex; align-items: center; gap: var(--ttbp-sp-2); color: #1565c0; }
.ttbp_payment_success { color: var(--ttbp-success); font-weight: var(--ttbp-fw-semibold); display: flex; align-items: center; gap: var(--ttbp-sp-2); }
.ttbp_payment_error   { color: #c62828; display: flex; align-items: center; gap: var(--ttbp-sp-2); }

/* Checkout option buttons — New Tab / Bill COF */
.ttbp_checkout_options {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}
.ttbp_checkout_opt_btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: var(--ttbp-fw-semibold);
    border-radius: var(--ttbp-radius);
    border: 1px solid var(--ttbp-gray-300);
    background: var(--ttbp-gray-100);
    color: var(--ttbp-gray-500);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.ttbp_checkout_opt_btn:not(:disabled):hover {
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    border-color: var(--ttbp-primary);
}
.ttbp_checkout_opt_btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
#ttbp_sale_cash_btn:not(:disabled) {
    background: #dcfce7;
    color: #16a34a;
    border-color: #86efac;
}
#ttbp_sale_cash_btn:not(:disabled):hover {
    background: #16a34a;
    color: #fff;
}
#ttbp_sale_split_btn:not(:disabled) {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}
#ttbp_sale_split_btn:not(:disabled):hover {
    background: #f59e0b;
    color: #fff;
}

/* Action buttons — all same height as Send to Terminal */
.ttbp_order_actions {
    display: flex;
    gap: var(--ttbp-sp-2);
    align-items: stretch;
}
.ttbp_order_actions .ttbp_button {
    padding: var(--ttbp-sp-3);
    font-size: 15px;
    font-weight: var(--ttbp-fw-bold);
    border-radius: var(--ttbp-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ttbp_sale_send_btn {
    flex: 1;
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    font-size: 15px;
    font-weight: var(--ttbp-fw-bold);
    padding: var(--ttbp-sp-3);
    border-radius: var(--ttbp-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ttbp-sp-2);
}
.ttbp_sale_send_btn:disabled {
    background: var(--ttbp-gray-300);
    cursor: not-allowed;
}
.ttbp_sale_send_btn:not(:disabled):hover { background: var(--ttbp-primary-hover); }

.ttbp_btn_secondary {
    background: #f0f0f0;
    color: var(--ttbp-gray-700);
    border: 1px solid var(--ttbp-gray-300);
}
.ttbp_btn_secondary:hover { background: var(--ttbp-gray-200); }

/* SALE button in calendar header */
.ttbp_sale_button {
    background: #e05c00;
    color: var(--ttbp-white);
    font-weight: var(--ttbp-fw-bold);
}
.ttbp_sale_button:hover { background: #b84a00; }

/* Loaders */
.ttbp-loader-sm {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--ttbp-gray-300);
    border-top-color: var(--ttbp-primary);
    border-radius: 50%;
    animation: ttbp-spin 0.7s linear infinite;
}
@keyframes ttbp-spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE: tablet (single column below 900px)
   ============================================================ */
@media (max-width: 900px) {
    .ttbp_sale_body {
        grid-template-columns: clamp(120px, 20vw, 160px) 1fr;
        grid-template-rows: 1fr auto;
    }
    .ttbp_sale_order_zone {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 2px solid var(--ttbp-gray-200);
        max-height: 280px;
    }
}

/* ============================================================
   OPEN TABS SECTION (sidebar)
   ============================================================ */
/* Open Tabs: fills remaining sidebar space, scrolls internally */
.ttbp_open_tabs_section {
    border-top: 2px solid #d4eadc;
    padding: 8px 6px 6px;
    background: #eaf0f6;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.ttbp_open_tabs_list_scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.ttbp_open_tabs_label {
    font-size: 10px;
    font-weight: var(--ttbp-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ttbp-primary);
    padding: 0 var(--ttbp-sp-1) var(--ttbp-sp-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.ttbp_refresh_tabs_btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ttbp-primary);
    font-size: var(--ttbp-fs-sm);
    padding: 2px var(--ttbp-sp-1);
    border-radius: var(--ttbp-radius-sm);
    transition: background 0.15s;
}
.ttbp_refresh_tabs_btn:hover { background: var(--ttbp-primary-light); }

.ttbp_tab_row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--ttbp-sp-1);
}
.ttbp_tab_btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    text-align: left;
    padding: var(--ttbp-sp-2) 10px;
    border: 1.5px solid #c8d8f5;
    border-radius: 7px;
    background: var(--ttbp-white);
    cursor: pointer;
    font-size: var(--ttbp-fs-sm);
    color: var(--ttbp-primary);
    gap: 6px;
    transition: background 0.15s, border-color 0.15s;
}
.ttbp_tab_btn:hover { background: var(--ttbp-primary-light); border-color: var(--ttbp-primary); }
.ttbp_tab_del_btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 12px;
    line-height: 1;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}
.ttbp_tab_del_btn:hover { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.tab_name { flex: 1; font-weight: var(--ttbp-fw-semibold); line-height: 1.3; }
.tab_name small { font-weight: var(--ttbp-fw-normal); color: #666; display: block; font-size: var(--ttbp-fs-xs); }
.tab_total { font-weight: var(--ttbp-fw-bold); color: #1a7a1a; white-space: nowrap; }
.ttbp_no_tabs { font-size: var(--ttbp-fs-sm); color: #999; padding: 6px var(--ttbp-sp-1); text-align: center; }
.ttbp_tabs_loading { text-align: center; padding: var(--ttbp-sp-2); }

/* ============================================================
   DISCOUNT ROW + PICKER
   ============================================================ */
.ttbp_discount_row {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    border-bottom: 1px solid #eee;
    gap: 6px;
    background: #fffbe6;
    font-size: 13px;
    color: #7a5a00;
}
.ttbp_discount_amount {
    font-weight: var(--ttbp-fw-bold);
    color: #c0392b;
    margin-left: auto;
    white-space: nowrap;
}

.ttbp_add_discount_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    text-align: center;
    padding: var(--ttbp-sp-3) 14px;
    margin-bottom: 6px;
    background: none;
    border: 1.5px dashed #aaa;
    border-radius: var(--ttbp-radius-lg);
    cursor: pointer;
    font-size: 13px;
    font-weight: var(--ttbp-fw-semibold);
    color: #555;
    transition: border-color 0.15s, color 0.15s;
}
.ttbp_add_discount_btn:hover {
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    border-color: var(--ttbp-primary);
}

/* Discount + action buttons row when customer is loaded */
.ttbp_footer_actions_row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 6px;
}

.ttbp_discount_picker {
    background: var(--ttbp-white);
    border: 1.5px solid #dde3ea;
    border-radius: 10px;
    padding: 10px var(--ttbp-sp-3);
    margin-bottom: 10px;
    box-shadow: var(--ttbp-shadow);
}
.ttbp_discount_picker_hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--ttbp-fs-sm);
    font-weight: var(--ttbp-fw-bold);
    color: var(--ttbp-gray-700);
    margin-bottom: var(--ttbp-sp-2);
}
.ttbp_btn_link {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: var(--ttbp-fs-base);
    padding: 2px;
}
.ttbp_btn_link:hover { color: #c0392b; }

.ttbp_coupon_list { max-height: 140px; overflow-y: auto; margin-bottom: var(--ttbp-sp-2); }
.ttbp_coupon_btn {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 7px var(--ttbp-sp-2);
    background: #f8fafc;
    border: 1px solid #e0e6ee;
    border-radius: var(--ttbp-radius);
    margin-bottom: var(--ttbp-sp-1);
    cursor: pointer;
    font-size: var(--ttbp-fs-sm);
    transition: background 0.15s;
}
.ttbp_coupon_btn:hover { background: #e0edff; }
.cpn_label { font-weight: var(--ttbp-fw-semibold); color: #222; }
.cpn_desc  { color: #c0392b; font-weight: var(--ttbp-fw-semibold); }

.ttbp_discount_manual_row {
    display: flex;
    gap: 6px;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: var(--ttbp-sp-2);
}
.ttbp_discount_manual_row input[type="text"] { flex: 1; padding: 5px var(--ttbp-sp-2); border: 1px solid var(--ttbp-gray-300); border-radius: 5px; font-size: var(--ttbp-fs-sm); }
.ttbp_discount_manual_row input[type="number"] { width: 60px; padding: 5px 6px; border: 1px solid var(--ttbp-gray-300); border-radius: 5px; font-size: var(--ttbp-fs-sm); }
.ttbp_button.ttbp_btn_sm { padding: 5px 10px; font-size: var(--ttbp-fs-sm); border-radius: 5px; }

/* ============================================================
   CUSTOMER CREDIT PANEL
   ============================================================ */
.ttbp_customer_credit_panel {
    background: #f0fff4;
    border-bottom: 1.5px solid #a8e6bf;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}
.ttbp_credit_name { font-weight: var(--ttbp-fw-bold); color: var(--ttbp-primary); flex: 1; min-width: 80px; }
.ttbp_credit_balance { color: var(--ttbp-success); display: flex; align-items: center; gap: 5px; }
.ttbp_apply_credit_btn {
    padding: 5px var(--ttbp-sp-3);
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    border: none;
    border-radius: var(--ttbp-radius);
    cursor: pointer;
    font-size: var(--ttbp-fs-sm);
    font-weight: var(--ttbp-fw-semibold);
    transition: background 0.15s;
}
.ttbp_apply_credit_btn:hover:not(:disabled) { background: var(--ttbp-primary-dark); }
.ttbp_apply_credit_btn:disabled { background: #aaa; cursor: not-allowed; }

/* ============================================================
   COACH PIN SCREEN
   ============================================================ */
.ttbp_coach_pin_screen {
    position: fixed;
    inset: 0;
    background: var(--ttbp-primary-dark);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ttbp_coach_pin_inner {
    background: var(--ttbp-white);
    border-radius: var(--ttbp-radius-xl);
    padding: 40px var(--ttbp-sp-8);
    width: 320px;
    text-align: center;
    box-shadow: var(--ttbp-shadow-xl);
}
.ttbp_coach_pin_logo {
    font-size: 32px;
    color: var(--ttbp-primary);
    margin-bottom: var(--ttbp-sp-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.ttbp_coach_pin_logo span { font-size: var(--ttbp-fs-2xl); font-weight: var(--ttbp-fw-bold); color: var(--ttbp-gray-900); }
.ttbp_coach_pin_title { font-size: 15px; color: #555; margin-bottom: var(--ttbp-sp-6); }
.ttbp_coach_pin_dots {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}
.ttbp_coach_pin_dots span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid #bbb;
    background: transparent;
    transition: background 0.15s, border-color 0.15s;
}
.ttbp_coach_pin_dots span.filled { background: var(--ttbp-primary); border-color: var(--ttbp-primary); }
.ttbp_coach_pin_pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: var(--ttbp-sp-4);
}
.ttbp_pin_key {
    padding: var(--ttbp-sp-4);
    font-size: var(--ttbp-fs-2xl);
    font-weight: var(--ttbp-fw-bold);
    background: #f0f4ff;
    border: 1.5px solid #c8d8f5;
    border-radius: 10px;
    cursor: pointer;
    color: var(--ttbp-primary);
    transition: background 0.15s;
}
.ttbp_pin_key:hover:not(:disabled) { background: var(--ttbp-primary-light); }
.ttbp_pin_key:disabled { background: transparent; border-color: transparent; cursor: default; }
.ttbp_pin_error { color: #c0392b; font-size: 13px; font-weight: var(--ttbp-fw-semibold); margin-top: var(--ttbp-sp-2); }
.ttbp_pin_checking { color: #555; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: var(--ttbp-sp-2); margin-top: var(--ttbp-sp-2); }

/* ============================================================
   SALE HEADER ENHANCEMENTS
   ============================================================ */
.ttbp_sale_hdr_actions { display: flex; align-items: center; gap: 10px; }
.ttbp_sale_hdr_btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: var(--ttbp-white);
    width: 36px;
    height: 36px;
    border-radius: var(--ttbp-radius-lg);
    cursor: pointer;
    font-size: var(--ttbp-fs-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.ttbp_sale_hdr_btn:hover { background: rgba(255,255,255,0.25); }

/* Sync inventory button — slightly wider to show spinner */
#ttbp_sale_sync_btn {
    width: auto;
    padding: 0 var(--ttbp-sp-3);
    gap: 6px;
    font-size: 13px;
    font-weight: var(--ttbp-fw-semibold);
    white-space: nowrap;
}
#ttbp_sale_sync_btn.syncing {
    background: rgba(255,255,255,0.08);
    cursor: wait;
    pointer-events: none;
}
#ttbp_sale_sync_btn .ttbp-loader-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}
.ttbp_sync_toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: var(--ttbp-fw-semibold);
    z-index: 999999;
    box-shadow: var(--ttbp-shadow-lg);
    opacity: 1;
    transition: opacity 0.4s;
}
.ttbp_sync_toast.success { background: var(--ttbp-primary); }
.ttbp_sync_toast.error   { background: #c62828; }
.ttbp_sync_toast.fade-out { opacity: 0; }
.ttbp_coach_badge {
    font-size: 13px;
    background: rgba(74,144,217,0.25);
    border: 1px solid rgba(74,144,217,0.4);
    color: #c5e0ff;
    padding: var(--ttbp-sp-1) var(--ttbp-sp-3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   SALES HISTORY MODAL
   ============================================================ */
.ttbp_modal_backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ttbp-sp-5);
}
.ttbp_modal_panel {
    background: var(--ttbp-white);
    border-radius: var(--ttbp-radius-xl);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.ttbp_history_panel { max-width: 760px; }
.ttbp_modal_hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--ttbp-sp-4);
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    flex-shrink: 0;
}
.ttbp_modal_hdr h3 { margin: 0; font-size: var(--ttbp-fs-xl); font-weight: var(--ttbp-fw-bold); display: flex; align-items: center; gap: var(--ttbp-sp-2); color: var(--ttbp-white); }
.ttbp_modal_close_btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--ttbp-white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: var(--ttbp-fs-lg);
}
.ttbp_modal_close_btn:hover { background: rgba(255,255,255,0.25); }

.ttbp_history_search_bar {
    display: flex;
    gap: var(--ttbp-sp-2);
    padding: 14px var(--ttbp-sp-4);
    background: var(--ttbp-gray-100);
    border-bottom: 1px solid var(--ttbp-gray-200);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.ttbp_history_search_bar input[type="text"],
.ttbp_history_search_bar input[type="date"] {
    flex: 1;
    min-width: 120px;
    padding: var(--ttbp-sp-2) 10px;
    border: 1px solid var(--ttbp-gray-300);
    border-radius: 7px;
    font-size: var(--ttbp-fs-base);
}

.ttbp_history_results { flex: 1; overflow-y: auto; padding: var(--ttbp-sp-2) 0; }
.ttbp_history_placeholder, .ttbp_no_results {
    text-align: center;
    color: #aaa;
    padding: var(--ttbp-sp-6) var(--ttbp-sp-4);
    font-size: var(--ttbp-fs-base);
}
.ttbp_history_row {
    display: flex;
    align-items: center;
    padding: 10px var(--ttbp-sp-4);
    border-bottom: 1px solid #eee;
    gap: 10px;
    font-size: 13px;
}
.ttbp_history_row:hover { background: var(--ttbp-gray-50); }
.hr_name { flex: 1; font-weight: var(--ttbp-fw-semibold); color: var(--ttbp-primary); }
.hr_meta { color: #888; font-size: var(--ttbp-fs-sm); white-space: nowrap; }
.hr_total { font-weight: var(--ttbp-fw-bold); color: var(--ttbp-success); white-space: nowrap; min-width: 60px; text-align: right; }

/* Receipt view */
.ttbp_receipt_view { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.ttbp_receipt_hdr {
    display: flex;
    align-items: center;
    gap: var(--ttbp-sp-3);
    padding: var(--ttbp-sp-3) var(--ttbp-sp-4);
    background: var(--ttbp-gray-100);
    border-bottom: 1px solid var(--ttbp-gray-200);
    flex-shrink: 0;
    font-weight: var(--ttbp-fw-bold);
    font-size: var(--ttbp-fs-base);
}
.ttbp_receipt_lines { flex: 1; overflow-y: auto; padding: var(--ttbp-sp-2) 0; }
.ttbp_receipt_line {
    display: flex;
    align-items: center;
    padding: var(--ttbp-sp-2) var(--ttbp-sp-4);
    border-bottom: 1px solid #eee;
    gap: var(--ttbp-sp-2);
    font-size: 13px;
}
.ttbp_receipt_line.refunded { opacity: 0.5; text-decoration: line-through; }
.rl_name { flex: 1; color: #222; }
.rl_price { font-weight: var(--ttbp-fw-semibold); color: var(--ttbp-success); }
.rl_refund_tag { font-size: var(--ttbp-fs-xs); color: #c0392b; background: #fde8e8; padding: 2px 6px; border-radius: var(--ttbp-radius-sm); }
.ttbp_receipt_footer { padding: 10px var(--ttbp-sp-4); border-top: 2px solid var(--ttbp-gray-200); flex-shrink: 0; }
.ttbp_receipt_total { font-weight: var(--ttbp-fw-bold); font-size: var(--ttbp-fs-lg); margin-bottom: var(--ttbp-sp-1); }
.ttbp_receipt_method { font-size: 13px; color: #666; }

/* Refund section */
.ttbp_refund_section {
    border-top: 2px solid var(--ttbp-gray-200);
    padding: 14px var(--ttbp-sp-4);
    background: #fff8f8;
    flex-shrink: 0;
}
.ttbp_refund_hdr { font-weight: var(--ttbp-fw-bold); font-size: var(--ttbp-fs-base); color: #c0392b; margin-bottom: 10px; }
.ttbp_refund_controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ttbp_refund_controls label { font-size: 13px; display: flex; align-items: center; gap: 5px; }
.ttbp_refund_controls select { padding: 5px var(--ttbp-sp-2); border: 1px solid var(--ttbp-gray-300); border-radius: 5px; font-size: 13px; }
.ttbp_refund_controls input[type="number"] { width: 100px; padding: 5px var(--ttbp-sp-2); border: 1px solid var(--ttbp-gray-300); border-radius: 5px; font-size: 13px; }
.ttbp_button.ttbp_btn_danger { background: var(--ttbp-danger); color: var(--ttbp-white); }
.ttbp_button.ttbp_btn_danger:hover { background: #962d22; }
.ttbp_refund_status {
    margin-top: 10px;
    padding: var(--ttbp-sp-2) var(--ttbp-sp-3);
    border-radius: 7px;
    font-size: 13px;
    font-weight: var(--ttbp-fw-semibold);
}
.ttbp_refund_status.success { background: #e8f5e9; color: var(--ttbp-success); }
.ttbp_refund_status.error   { background: #fde8e8; color: #c0392b; }

/* ============================================================
   OPEN SALE BUTTON — calendar header (green, 2x size)
   ============================================================ */
.ttbp_sale_open_btn {
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    border: none;
    border-radius: 10px;
    width: 116px;
    height: 58px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,166,81,0.45);
    transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
    flex-shrink: 0;
}
.ttbp_sale_open_btn i {
    font-size: 26px;
    line-height: 1;
    pointer-events: none;
}
.ttbp_sale_open_btn:hover {
    background: var(--ttbp-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,166,81,0.5);
}
.ttbp_sale_open_btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,166,81,0.35);
}

/* ============================================================
   ITEM TILE — HEART PIN BUTTON
   ============================================================ */
.tile_heart {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--ttbp-gray-300);
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, transform 0.15s;
    border-radius: 50%;
    transition: color 0.18s, transform 0.15s;
    z-index: 2;
    cursor: pointer;
}
.tile_heart:hover {
    color: #f59e0b;
    transform: scale(1.25);
}
.tile_heart.pinned {
    color: #f59e0b;
}
.tile_heart.pinned:hover {
    color: #d97706;
}

/* Tile needs relative positioning for the absolute heart */
.ttbp_item_tile {
    position: relative;
}

/* Body scroll lock while POS overlay is open */
body.ttbp-pos-open {
    overflow: hidden;
}

/* ── Walk-up Tee Time Builder panel ──────────────────────────────────── */
#ttbp_walkup_teetime_panel {
    background: #f0f9f4;
    border: 1px solid #86efac;
    border-radius: var(--ttbp-radius);
    padding: 0;
    margin-bottom: var(--ttbp-sp-2);
    overflow: hidden;
}
.ttbp_walkup_header {
    font-size: var(--ttbp-fs-xs);
    font-weight: var(--ttbp-fw-bold);
    color: var(--ttbp-primary-dark);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background .12s;
    margin: 0;
}
.ttbp_walkup_header:hover { background: rgba(22,163,74,.08); }
.ttbp_walkup_rates_btn {
    margin-left: auto;
    background: none;
    border: 1px solid #bbf7d0;
    border-radius: var(--ttbp-radius-sm);
    cursor: pointer;
    color: var(--ttbp-primary-dark);
    font-size: 10px;
    font-weight: var(--ttbp-fw-semibold);
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 2px var(--ttbp-sp-2);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: background .15s;
}
.ttbp_walkup_rates_btn:hover { background: #dcfce7; }
.ttbp_walkup_header .ttbp_walkup_toggle_icon {
    font-size: 10px;
    color: var(--ttbp-gray-500);
    transition: transform .2s;
}
#ttbp_walkup_teetime_panel.ttbp_walkup_expanded .ttbp_walkup_toggle_icon {
    transform: rotate(180deg);
}
.ttbp_walkup_body {
    display: none;
    padding: 6px 10px 10px;
}
#ttbp_walkup_teetime_panel.ttbp_walkup_expanded .ttbp_walkup_body {
    display: block;
}
.ttbp_walkup_fields {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-end;
}
.ttbp_walkup_field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 55px;
}
.ttbp_walkup_field-price {
    flex: 1 1 80px;
}
.ttbp_walkup_label {
    font-size: 10px;
    font-weight: var(--ttbp-fw-semibold);
    color: var(--ttbp-primary-dark);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ttbp_walkup_select {
    padding: 5px 6px;
    border: 1px solid #bbf7d0;
    border-radius: var(--ttbp-radius-sm);
    background: var(--ttbp-white);
    font-size: var(--ttbp-fs-sm);
    color: var(--ttbp-gray-900);
    width: 100%;
    cursor: pointer;
}
.ttbp_walkup_select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: var(--ttbp-input-focus);
}
.ttbp_walkup_add_btn {
    padding: 5px var(--ttbp-sp-3);
    background: #16a34a;
    color: var(--ttbp-white);
    border: none;
    border-radius: var(--ttbp-radius-sm);
    font-size: var(--ttbp-fs-sm);
    font-weight: var(--ttbp-fw-semibold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ttbp-sp-1);
    transition: background .15s;
    white-space: nowrap;
    flex-shrink: 0;
    height: 28px;
}
.ttbp_walkup_add_btn:hover {
    background: var(--ttbp-primary-dark);
}

/* ── Center zone hot items section — single row ──────────────────────────── */
.ttbp_center_hot_section {
    padding: var(--ttbp-sp-1) 10px 0;
}
.ttbp_center_hot_label {
    font-size: 9px;
    font-weight: var(--ttbp-fw-bold);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #e65c00;
    padding: 2px 0 var(--ttbp-sp-1);
}
.ttbp_center_hot_grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 6px;
}
.ttbp_center_hot_grid > .ttbp_item_tile {
    background: #fffbeb;
    border-color: #fcd34d;
    border-left: 4px solid #f59e0b;
}

/* ── Subcategory headers ─────────────────────────────────────────────────── */
.ttbp_subcat_header {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #1e293b;
    padding: 6px 10px;
    border-radius: 4px;
    margin: 6px 0 2px;
}
.ttbp_subcat_header:first-child { margin-top: 0; }

/* ── Modifier badge on tiles ────────────────────────────────────────────── */
.tile_mod_badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 9px;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 1px 8px;
    line-height: 1.5;
    letter-spacing: .02em;
    white-space: nowrap;
}
.tile_mod_badge i {
    font-size: 8px;
    margin-right: 2px;
}

/* ── Tab confirm popup ──────────────────────────────────────────────────── */
.ttbp_tab_confirm_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ttbp_tab_confirm_popup {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    text-align: center;
}
.ttbp_tab_confirm_msg {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 18px;
    line-height: 1.5;
}
.ttbp_tab_confirm_actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ttbp_tab_confirm_yes {
    padding: 10px 16px;
    background: #0369a1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.ttbp_tab_confirm_yes:hover { background: #0284c7; }
.ttbp_tab_confirm_no {
    padding: 10px 16px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.ttbp_tab_confirm_no:hover { background: #e2e8f0; }

/* ── Modifier popup overlay ─────────────────────────────────────────────── */
.ttbp_mod_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999999;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: var(--ttbp-font);
}
.ttbp_mod_popup {
    background: #fff;
    border-radius: 12px;
    width: 380px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,.3);
    overflow: hidden;
}
.ttbp_mod_header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}
.ttbp_mod_title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    flex: 1;
}
.ttbp_mod_base_price {
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
}
.ttbp_mod_close {
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.ttbp_mod_close:hover { color: #334155; }
.ttbp_mod_body {
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
}
.ttbp_mod_group {
    margin-bottom: 14px;
}
.ttbp_mod_group:last-child { margin-bottom: 0; }
.ttbp_mod_group_label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ttbp_mod_req {
    font-size: 9px;
    font-weight: 700;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 3px;
    padding: 1px 5px;
    text-transform: uppercase;
}
.ttbp_mod_max {
    font-size: 9px;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
    border-radius: 3px;
    padding: 1px 5px;
}
.ttbp_mod_option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .1s;
    font-size: 14px;
    color: #334155;
}
.ttbp_mod_option:hover { background: #f1f5f9; }
.ttbp_mod_option input {
    accent-color: var(--ttbp-primary, #367A25);
    width: 16px;
    height: 16px;
    margin: 0;
}
.ttbp_mod_opt_name { flex: 1; }
.ttbp_mod_opt_price {
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
}
.ttbp_mod_footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}
.ttbp_mod_add_btn {
    width: 100%;
    padding: 10px;
    background: var(--ttbp-primary, #367A25);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.ttbp_mod_add_btn:hover { background: #009145; }
.ttbp_mod_group_error {
    background: #fef2f2;
    border-radius: 6px;
    padding: 4px;
}
.ttbp_mod_group_error .ttbp_mod_group_label { color: #dc2626; }

/* ── Item search bar — compact, left-aligned ────────────────────────────── */
.ttbp_item_search_bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px var(--ttbp-sp-1);
    border-bottom: 1px solid #e8f5ea;
    max-width: 25%;
}
.ttbp_item_search_bar i {
    color: #94a3b8;
    font-size: var(--ttbp-fs-sm);
    flex-shrink: 0;
}
.ttbp_item_search_bar input {
    flex: 1;
    height: 26px;
    padding: 0 var(--ttbp-sp-2);
    border: 1px solid var(--ttbp-gray-300);
    border-radius: 5px;
    font-size: var(--ttbp-fs-sm);
    background: var(--ttbp-white);
    outline: none;
}
.ttbp_item_search_bar input:focus {
    border-color: var(--ttbp-primary);
}

/* ── Add Item button — bottom of category sidebar ──────────────────────────── */
.ttbp_cat_add_item_btn {
    display: block;
    width: calc(100% - 8px);
    margin: auto var(--ttbp-sp-1) var(--ttbp-sp-1);
    padding: 6px var(--ttbp-sp-2);
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: var(--ttbp-fs-sm);
    font-weight: var(--ttbp-fw-semibold);
    text-align: center;
    transition: background 0.15s;
    font-family: var(--ttbp-font);
    flex-shrink: 0;
}
.ttbp_cat_add_item_btn:hover { background: var(--ttbp-primary-hover); }

/* ── Staff layout toggle ──────────────────────────────────────────────── */
.ttbp_layout_toggle_section {
    padding: 6px 6px 4px;
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    border-top: 1px solid #d4eadc;
}
.ttbp_layout_toggle_btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    background: #fff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    font-family: var(--ttbp-font);
    transition: all .15s;
    white-space: nowrap;
}
.ttbp_layout_toggle_btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.ttbp_layout_toggle_btn.ttbp_layout_active {
    background: #0369a1;
    color: #fff;
    border-color: #0369a1;
}
.ttbp_layout_toggle_btn.ttbp_layout_active:hover { background: #0284c7; }
.ttbp_layout_save_icon_btn {
    flex: 0 0 auto;
    padding: 5px 8px;
    background: #f0fdf4;
    color: #1a5018;
    border: 1px solid #86efac;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-family: var(--ttbp-font);
    transition: all .15s;
    line-height: 1;
}
.ttbp_layout_save_icon_btn:hover { background: #dcfce7; border-color: #4ade80; }

/* ── Category hide/show toggle ──────────────────────────────────────────── */
.ttbp_cat_hide_btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #c0c8d0;
    font-size: 10px;
    padding: 2px 3px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.ttbp_cat_btn_wrap:hover .ttbp_cat_hide_btn { color: #94a3b8; }
.ttbp_cat_hide_btn:hover { color: #ef4444; }

/* Show hidden categories toggle — compact single line */
.ttbp_show_hidden_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 3px 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    font-weight: var(--ttbp-fw-semibold);
    color: var(--ttbp-gray-400);
    text-align: center;
    margin-top: 2px;
    transition: color 0.15s;
    line-height: 1;
}
.ttbp_show_hidden_btn:hover { color: var(--ttbp-primary); }

/* ── Item tile drag handle ───────────────────────────────────────────────── */
.tile_drag_handle {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 10px;
    color: #d0d5dd;
    cursor: grab;
    z-index: 2;
    line-height: 1;
    padding: 2px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.ttbp_item_tile:hover .tile_drag_handle,
.ttbp_item_tile:hover .tile_heart,
.ttbp_item_tile:hover .tile_mod_badge { opacity: 1; }
.tile_heart.pinned { opacity: 1; }
.ttbp_item_tile:hover .tile_drag_handle { color: #94a3b8; }
.tile_drag_handle:active { cursor: grabbing; }

/* Item tile drag states */
.ttbp_item_tile.ttbp_tile_dragging { opacity: 0.35; }
.ttbp_item_tile.ttbp_tile_drop_over {
    outline: 2px dashed var(--ttbp-primary);
    outline-offset: 2px;
    background: var(--ttbp-primary-light);
}

/* ── Editable price input for $0 order lines ────────────────────────────── */
.ol_price_input {
    width: 64px;
    height: 24px;
    padding: 0 var(--ttbp-sp-1);
    border: 1px solid #fcd34d;
    border-radius: var(--ttbp-radius-sm);
    font-size: var(--ttbp-fs-sm);
    font-weight: var(--ttbp-fw-semibold);
    background: #fffbeb;
    color: #92400e;
    text-align: right;
}
.ol_price_input:focus {
    border-color: #f59e0b;
    outline: none;
    background: var(--ttbp-white);
}

/* ── (Add Tax as Item button removed) ───────────────────────────────────── */
.ttbp_add_tax_item_btn {
    display: none; /* removed */
    margin-left: auto;
    padding: 3px 9px;
    background: #f0fdf4;
    color: var(--ttbp-primary-dark);
    border: 1px solid #86efac;
    border-radius: 5px;
    font-size: var(--ttbp-fs-xs);
    font-weight: var(--ttbp-fw-semibold);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s;
    font-family: var(--ttbp-font);
    line-height: 1.4;
}
.ttbp_add_tax_item_btn:hover {
    background: #dcfce7;
    border-color: #4ade80;
}

/* ============================================================
   CREATE ITEM MODAL PANEL
   ============================================================ */
.ttbp_create_item_panel {
    background: var(--ttbp-white);
    border-radius: var(--ttbp-radius-xl);
    padding: 26px 28px;
    width: 440px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    max-height: 90vh;
    overflow-y: auto;
}
.ttbp_cip_hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--ttbp-sp-4);
}
.ttbp_cip_hdr h3 {
    margin: 0;
    font-size: var(--ttbp-fs-lg);
    font-weight: var(--ttbp-fw-bold);
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: var(--ttbp-sp-2);
}
.ttbp_cip_close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}
.ttbp_cip_close:hover { color: var(--ttbp-gray-700); }
.ttbp_cip_row {
    margin-bottom: 14px;
}
.ttbp_cip_label {
    display: block;
    font-size: var(--ttbp-fs-xs);
    font-weight: var(--ttbp-fw-bold);
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ttbp_req { color: #c00; }
.ttbp_cip_select,
.ttbp_cip_input {
    width: 100%;
    padding: 9px 11px;
    border: 1.5px solid #dde3ea;
    border-radius: 7px;
    font-size: 13px;
    box-sizing: border-box;
    background: var(--ttbp-white);
    color: #1a1a2e;
}
.ttbp_cip_select:focus,
.ttbp_cip_input:focus { border-color: var(--ttbp-primary); outline: none; }
.ttbp_cip_row_2col {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}
.ttbp_cip_row_2col > div { flex: 1; }
.ttbp_cip_cart_check_wrap {
    display: flex;
    align-items: flex-end;
    padding-bottom: 2px;
}
.ttbp_cip_check_label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #1a1a2e;
}
.ttbp_cip_cart_icon { color: var(--ttbp-primary); font-size: var(--ttbp-fs-base); }
.ttbp_cip_price_wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #dde3ea;
    border-radius: 7px;
    overflow: hidden;
}
.ttbp_cip_price_sym {
    padding: 9px 11px;
    background: #f4f5f7;
    font-size: var(--ttbp-fs-base);
    font-weight: var(--ttbp-fw-semibold);
    color: #555;
    border-right: 1px solid #dde3ea;
    flex-shrink: 0;
}
.ttbp_cip_price_input {
    flex: 1;
    padding: 9px 11px;
    border: none;
    outline: none;
    font-size: var(--ttbp-fs-base);
    background: var(--ttbp-white);
}
.ttbp_cip_calc_box {
    margin-top: 10px;
    padding: 10px 13px;
    background: #f0fdf4;
    border-radius: 7px;
    border: 1px solid #bbf7d0;
    font-size: var(--ttbp-fs-sm);
}
.ttbp_cip_calc_row {
    display: flex;
    justify-content: space-between;
    color: var(--ttbp-primary-dark);
    padding: 2px 0;
}
.ttbp_cip_calc_base {
    border-top: 1px solid #bbf7d0;
    margin-top: 5px;
    padding-top: 5px;
    font-weight: var(--ttbp-fw-bold);
}
.ttbp_cip_error {
    color: #c00;
    font-size: 13px;
    margin-bottom: 10px;
}
.ttbp_cip_success {
    color: var(--ttbp-success);
    font-size: 13px;
    margin-bottom: 10px;
}
.ttbp_cip_actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
}
.ttbp_cip_hint {
    margin: 14px 0 0;
    font-size: var(--ttbp-fs-xs);
    color: #999;
    line-height: 1.5;
}

/* ── Danger button ───────────────────────────────────────────────────────── */
.ttbp_btn_danger {
    background: var(--ttbp-danger);
    color: var(--ttbp-white);
    border-color: var(--ttbp-danger);
}
.ttbp_btn_danger:hover { background: #b71c1c; }

/* ── Search clear (x) button ─────────────────────────────────────────────── */
.ttbp_search_clear_btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 13px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.12s;
}
.ttbp_search_clear_btn:hover { color: var(--ttbp-gray-700); }

/* ── Tile delete button — hidden until hover ────────────────────────────── */
.tile_delete_btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    display: none;
    background: rgba(220,38,38,.08);
    border: 1px solid rgba(220,38,38,.25);
    border-radius: var(--ttbp-radius-sm);
    color: var(--ttbp-danger);
    font-size: 10px;
    padding: 2px 5px;
    cursor: pointer;
    z-index: 3;
    line-height: 1.4;
    transition: background 0.12s;
}
.ttbp_item_tile:hover .tile_delete_btn { display: block; }
.tile_delete_btn:hover { background: rgba(220,38,38,.18); }

/* ── Delete item modal panel ─────────────────────────────────────────────── */
.ttbp_delete_item_panel {
    background: var(--ttbp-white);
    border-radius: var(--ttbp-radius-xl);
    padding: var(--ttbp-sp-6) 28px;
    width: 360px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.ttbp_delete_item_name {
    font-size: 15px;
    font-weight: var(--ttbp-fw-bold);
    color: #1a1a2e;
    margin: 0 0 6px;
}
.ttbp_delete_item_warn {
    font-size: var(--ttbp-fs-sm);
    color: var(--ttbp-gray-500);
    margin: 0 0 var(--ttbp-sp-4);
    line-height: 1.5;
}

/* ============================================================
   PLAYER PICKER MODAL (multi-pay Tab/COF)
   ============================================================ */
.ttbp_player_picker_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ttbp_player_picker_box {
    background: var(--ttbp-white);
    border-radius: var(--ttbp-radius-xl);
    padding: 24px 28px;
    width: 360px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.ttbp_player_picker_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: var(--ttbp-fw-bold);
    color: #1a1a2e;
}
.ttbp_player_picker_x {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}
.ttbp_player_picker_x:hover { color: var(--ttbp-gray-700); }
.ttbp_player_picker_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ttbp_player_pick_btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--ttbp-font);
    color: #1a1a2e;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, border-color 0.12s;
}
.ttbp_player_pick_btn:hover {
    background: #f0fdf4;
    border-color: var(--ttbp-primary);
}

/* ============================================================
   CALENDAR LOCK OVERLAY
   Covers the calendar nav + time grid until a staff PIN is entered.
   The Register button in the header remains above this overlay.
   ============================================================ */
.ttbp-calendar-body {
    position: relative;
}
.ttbp-calendar-lock {
    position: absolute;
    inset: 0;
    background: rgba(8, 24, 8, 0.78);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 var(--ttbp-radius-lg) var(--ttbp-radius-lg);
    min-height: 180px;
}
.ttbp-calendar-lock-inner {
    text-align: center;
    color: var(--ttbp-white);
    padding: var(--ttbp-sp-8) var(--ttbp-sp-6);
    pointer-events: none;
}
.ttbp-calendar-lock-inner i {
    font-size: 54px;
    display: block;
    margin-bottom: 14px;
    opacity: 0.85;
}
.ttbp-calendar-lock-inner p {
    font-size: var(--ttbp-fs-lg);
    margin: 0;
    opacity: 0.9;
    line-height: 1.5;
}
.ttbp-calendar-lock-inner strong {
    color: #4ade80;
}
/* Dim and disable header nav buttons when calendar is locked */
.ttbp-header-locked .ttbp_button:not(#ttbp_sale_btn):not(#ttbp_quick_golf_btn) {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}
.ttbp-header-locked a {
    pointer-events: none;
}

/* ============================================================
   GIFT CARD UI
   ============================================================ */
.ttbp_giftcard_btn {
    border-color: #3d7a2e;
    color: #2d6b1e;
}
.ttbp_giftcard_btn:hover {
    background: var(--ttbp-primary);
    color: var(--ttbp-white);
    border-color: var(--ttbp-primary);
}
.ttbp_giftcard_btn.ttbp_gc_applied {
    background: #e6f9e6;
    border-color: #4ade80;
    color: #1a5018;
    border-style: solid;
}

.ttbp_giftcard_applied_row {
    background: #ecfdf5;
    color: #1a5018;
}
.ttbp_giftcard_applied_row .ttbp_discount_amount {
    color: #1a5018;
    font-weight: var(--ttbp-fw-bold);
}

.ttbp_giftcard_entry {
    background: var(--ttbp-white);
    border: 1.5px solid #3d7a2e;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: var(--ttbp-shadow);
}
.ttbp_giftcard_entry_hdr {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: var(--ttbp-fw-bold);
    color: #2d6b1e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.ttbp_giftcard_entry_dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
}
.ttbp_giftcard_input_row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.ttbp_giftcard_dollar_wrap {
    position: relative;
    flex: 1;
}
.ttbp_giftcard_symbol {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: var(--ttbp-fw-bold);
    color: #2d6b1e;
    pointer-events: none;
}
.ttbp_giftcard_amount_input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #ccc;
    border-radius: var(--ttbp-radius);
    padding: 10px 12px 10px 26px;
    font-size: 20px;
    font-weight: var(--ttbp-fw-semibold);
    color: #222;
    outline: none;
    transition: border-color 0.15s;
}
.ttbp_giftcard_amount_input:focus {
    border-color: #4ade80;
}
.ttbp_giftcard_apply_btn {
    background: #2d6b1e;
    color: #fff;
    border: none;
    padding: 10px 16px;
    white-space: nowrap;
}
.ttbp_giftcard_apply_btn:hover {
    background: #3d8a2a;
}
.ttbp_giftcard_apply_btn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}
.ttbp_giftcard_cap_note {
    font-size: 11px;
    color: #888;
    font-style: italic;
    margin-bottom: 8px;
}
.ttbp_giftcard_cap_note.ttbp_gc_warning {
    color: #f59e0b;
}

/* Numpad */
.ttbp_giftcard_numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}
.ttbp_giftcard_numkey {
    background: #f1f5f9;
    border: 1px solid #dde3ea;
    border-radius: var(--ttbp-radius);
    padding: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: var(--ttbp-fw-semibold);
    color: #333;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}
.ttbp_giftcard_numkey:hover { background: #e2e8f0; }
.ttbp_giftcard_numkey:active { background: #cbd5e1; }
.ttbp_giftcard_numkey_zero { grid-column: span 2; }
.ttbp_giftcard_numkey_back { font-size: 14px; color: #888; }
