/* ===== Seat selection section (Phase) ===== */
.flyup-ftbs-fe-seat{margin-top:18px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;}
.flyup-ftbs-fe-seat__head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #f1f5f9;}
.flyup-ftbs-fe-seat__title{font-size:16px;font-weight:600;}
.flyup-ftbs-fe-seat__meta{font-size:12px;opacity:.75;display:flex;gap:10px;flex-wrap:wrap;}
.flyup-ftbs-fe-seat__close{border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:6px 10px;cursor:pointer;}
.flyup-ftbs-fe-seat__back{display:none;}
.flyup-ftbs-fe-seat__trip{padding:10px 14px;font-size:13px;}
.flyup-ftbs-fe-scratch .ftbs-seat-timer{margin-top:6px;font-size:12px;color:#6b7280;display:flex;gap:8px;align-items:center;}
.flyup-ftbs-fe-scratch .ftbs-seat-timer__value{font-weight:800;color:#111827;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:999px;padding:2px 8px;}
.flyup-ftbs-fe-scratch .ftbs-fe-print-btn{border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:7px 14px;cursor:pointer;font-size:13px;font-weight:700;}
.flyup-ftbs-fe-scratch .ftbs-fe-print-btn:hover{background:#f9fafb;}

/* Download button (added later) + ensure Print text always visible */
.flyup-ftbs-fe-scratch .ftbs-fe-print-btn,
.flyup-ftbs-fe-scratch .ftbs-fe-download-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  line-height:1;
  color:#111;
  text-decoration:none;
  white-space:nowrap;
}

.flyup-ftbs-fe-scratch .ftbs-fe-download-btn{
  margin-left:0;
  border:1px solid #0f172a;
  background:#0f172a;
  color:#fff;
  border-radius:10px;
  padding:7px 14px;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
}
.flyup-ftbs-fe-scratch .ftbs-fe-download-btn:hover{opacity:.92;}

/* Ticket action buttons line */
.flyup-ftbs-fe-scratch .ftbs-fe-ticket-actions{margin-top:10px;display:flex;flex-wrap:wrap;gap:10px;}

/* Legend number badges */
.flyup-ftbs-fe-scratch .ftbs-legend-count{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:20px;padding:0 8px;border-radius:999px;background:#f1f5f9;border:1px solid #e5e7eb;font-size:12px;font-weight:800;color:#0f172a;margin-left:10px;}

/* Summary lines */
.flyup-ftbs-fe-scratch .ftbs-sum-main{font-weight:800;}
.flyup-ftbs-fe-scratch .ftbs-sum-counts{margin-top:6px;font-size:12px;color:#374151;line-height:1.2;}
.flyup-ftbs-fe-seat__legend{padding:0 14px 10px 14px;display:flex;gap:10px;flex-wrap:wrap;}
.flyup-ftbs-fe-scratch .ftbs-seat-legend{font-size:12px;}

.flyup-ftbs-seatmap-wrap{padding:14px;display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap;}
.flyup-ftbs-seatmap{border:1px solid #e5e7eb;border-radius:12px;padding:12px;min-width:280px;}
.flyup-ftbs-seatmap__labels{display:flex;justify-content:space-between;font-size:12px;opacity:.7;margin-bottom:8px;}
.flyup-ftbs-seatmap__grid{display:grid;gap:6px;}

.flyup-ftbs-fe-scratch .ftbs-seat{width:36px;height:34px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:12px;line-height:34px;text-align:center;}
.flyup-ftbs-fe-scratch .ftbs-seat.is-aisle{background:transparent;border:0;cursor:default;}
.flyup-ftbs-fe-scratch .ftbs-seat.is-booked{background:#f8d7da;border-color:#f5c2c7;cursor:not-allowed;}
.flyup-ftbs-fe-scratch .ftbs-seat.is-locked{background:#fff3cd;border-color:#ffecb5;cursor:not-allowed;}
.flyup-ftbs-fe-scratch .ftbs-seat.is-selected{background:#d1e7dd;border-color:#badbcc;}

.flyup-ftbs-seat-side{display:flex;flex-direction:column;gap:10px;min-width:260px;}
.flyup-ftbs-seat-summary{border:1px solid #e5e7eb;border-radius:12px;padding:12px;}
.flyup-ftbs-seat-summary__row{display:flex;justify-content:space-between;font-size:13px;padding:4px 0;}
.flyup-ftbs-passenger{border:1px solid #e5e7eb;border-radius:12px;padding:12px;}
.flyup-ftbs-passenger label{display:block;font-size:12px;margin-top:8px;}
.flyup-ftbs-passenger input{width:100%;padding:7px 10px;border:1px solid #e5e7eb;border-radius:10px;margin-top:4px;font-size:13px;}
.flyup-ftbs-passenger button{margin-top:10px;width:100%;padding:9px 12px;border:0;border-radius:12px;background:#111827;color:#fff;cursor:pointer;font-weight:800;}
.flyup-ftbs-passenger .ftbs-msg{font-size:12px;margin-top:8px;}

/* ===== Seat buttons used by app.js ===== */
.flyup-ftbs-fe-scratch .ftbs-seat-grid{display:grid;grid-template-columns:repeat(var(--ftbs-cols,5), minmax(32px, 40px));gap:8px;align-items:center;}
.flyup-ftbs-fe-scratch .ftbs-seat-cell{display:flex;align-items:center;justify-content:center;min-height:38px;}
.flyup-ftbs-fe-scratch .ftbs-seat-space{visibility:hidden;}
.flyup-ftbs-fe-scratch .ftbs-seat-aisle{background:transparent;}
.flyup-ftbs-fe-scratch .ftbs-seat-door{font-size:11px;opacity:.6;}

.flyup-ftbs-fe-scratch .ftbs-seat-btn{width:42px;height:36px;border-radius:12px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:12px;font-weight:800;line-height:1;display:flex;align-items:center;justify-content:center;text-align:center;overflow:hidden;}
.flyup-ftbs-fe-scratch .ftbs-seat-btn:disabled{opacity:.85;cursor:not-allowed;}

/* Colors (as requested)
   - Available: Green
   - Booked: Red
   - Not Available: Brown
   - Reserved: Gray
*/
.flyup-ftbs-fe-scratch .ftbs-seat-available{background:#d1fae5;border-color:#34d399;color:#065f46;}
.flyup-ftbs-fe-scratch .ftbs-seat-selected{background:#111827;border-color:#111827;color:#fff;}
.flyup-ftbs-fe-scratch .ftbs-seat-locked{background:#fff3cd;border-color:#ffecb5;color:#92400e;}
.flyup-ftbs-fe-scratch .ftbs-seat-booked{background:#fecaca;border-color:#f87171;color:#991b1b;}
.flyup-ftbs-fe-scratch .ftbs-seat-na{background:#8b5a2b;border-color:#8b5a2b;color:#fff;}
.flyup-ftbs-fe-scratch .ftbs-seat-reserved{background:#e5e7eb;border-color:#9ca3af;color:#374151;}


/* ===== Seat Map Structure (Cabin + A/PASSAGE/B + Last Bench) ===== */
.flyup-ftbs-fe-scratch .ftbs-seat-map{display:flex;flex-direction:column;gap:18px;}
.flyup-ftbs-fe-scratch .ftbs-seat-front{display:flex;gap:14px;align-items:stretch;}
.flyup-ftbs-fe-scratch .ftbs-seat-cabin{flex:1;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;background:#fff;}
.flyup-ftbs-fe-scratch .ftbs-seat-driver{width:160px;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;}
.flyup-ftbs-fe-scratch .ftbs-seat-section-title{font-size:12px;color:#6b7280;margin-bottom:8px;display:flex;align-items:center;gap:8px;}
.flyup-ftbs-fe-scratch .ftbs-seat-cabin-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.flyup-ftbs-fe-scratch .ftbs-driver-icon{width:54px;height:54px;border-radius:14px;border:2px solid #cbd5e1;background:linear-gradient(180deg,#ffffff,#f3f4f6);position:relative;}
.flyup-ftbs-fe-scratch .ftbs-driver-icon:before{content:'';position:absolute;left:8px;right:8px;top:14px;height:20px;border-radius:10px;background:#e5e7eb;}
.flyup-ftbs-fe-scratch .ftbs-driver-icon:after{content:'';position:absolute;left:12px;right:12px;bottom:10px;height:10px;border-radius:8px;background:#d1d5db;}

.flyup-ftbs-fe-scratch .ftbs-seat-main{display:flex;flex-direction:column;gap:10px;}
.flyup-ftbs-fe-scratch .ftbs-seat-sides-labels{display:flex;justify-content:space-between;padding:0 6px;}
.flyup-ftbs-fe-scratch .ftbs-side-badge{width:34px;height:34px;border-radius:999px;border:1px solid #e5e7eb;background:#f3f4f6;color:#111827;display:flex;align-items:center;justify-content:center;font-weight:700;}
.flyup-ftbs-fe-scratch .ftbs-seat-main-rows{display:flex;flex-direction:column;gap:10px;}
.flyup-ftbs-fe-scratch .ftbs-seat-row{display:flex;align-items:center;gap:18px;}
.flyup-ftbs-fe-scratch .ftbs-seat-side{display:flex;gap:10px;min-width:120px;}
.flyup-ftbs-fe-scratch .ftbs-seat-side-left{justify-content:flex-start;}
.flyup-ftbs-fe-scratch .ftbs-seat-side-right{justify-content:flex-end;}
.flyup-ftbs-fe-scratch .ftbs-seat-passage{flex:.45;min-width:70px;min-height:34px;border-left:2px dashed #e5e7eb;border-right:2px dashed #e5e7eb;opacity:.55;}
.flyup-ftbs-fe-scratch .ftbs-seat-empty{display:inline-block;width:46px;height:40px;visibility:hidden;}

.flyup-ftbs-fe-scratch .ftbs-seat-last{border:1px solid #e5e7eb;border-radius:12px;padding:12px;background:#fff;}
.flyup-ftbs-fe-scratch .ftbs-seat-last-row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;align-items:center;}
.flyup-ftbs-fe-scratch .ftbs-seat-last-title{text-align:center;margin-top:8px;font-size:12px;color:#6b7280;}

/* Seat look polishing */
.flyup-ftbs-fe-scratch .ftbs-seat-btn{position:relative;box-shadow:0 1px 0 rgba(0,0,0,.04);} 
.flyup-ftbs-fe-scratch .ftbs-seat-btn:before{content:'';position:absolute;left:6px;right:6px;top:5px;height:7px;border-radius:8px;background:rgba(255,255,255,.55);z-index:0;pointer-events:none;} 
.flyup-ftbs-fe-scratch .ftbs-seat-btn{z-index:1;}
.flyup-ftbs-fe-scratch .ftbs-seat-btn.ftbs-seat-selected:before{background:rgba(255,255,255,.15);}

/* Brown structure seats (Cabin/Last disabled) */
.flyup-ftbs-fe-scratch .ftbs-seat-struct{background:#8b5a2b !important;border-color:#8b5a2b !important;color:#fff !important;cursor:not-allowed !important;}
.flyup-ftbs-fe-scratch .ftbs-seat-struct:before{background:rgba(255,255,255,.18);}

/* Responsive tweak */
@media (max-width: 640px){
  .ftbs-seat-front{flex-direction:column;}
  .ftbs-seat-driver{width:100%;}
  .ftbs-seat-row{gap:12px;}
  .ftbs-seat-passage{min-height:24px;}
}

/* Hide "Drive side" label on desktop/tablet, keep on mobile */
@media (min-width: 769px){
  .flyup-ftbs-fe-scratch .ftbs-drive-side-label{
    display:none !important;
  }
}