/* Extracted styles for the TYD product card used in the booking UI */
.tyd-product-card { margin-bottom: 12px; }
.tyd-card-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(92,13,21,0.06);
  box-shadow: 0 6px 0 rgba(92,13,21,0.06);
}
.tyd-thumb { flex: 0 0 110px; }
.tyd-info { flex: 1; }
.tyd-title { margin: 0; font-size: 18px; line-height: 1.15; color: #222; }
.tyd-price { margin-top: 8px; font-weight: 700; color: #111; }
.tyd-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tyd-quantity-input { width: 64px; padding: 8px; border-radius: 8px; border: 1px solid #e6e6e6; text-align: center; }
.tyd-add-btn, .tyd-add-to-cart { background: #8b0f17; color: #fff; border: none; padding: 10px 12px; border-radius: 6px; cursor: pointer; }

/* Ensure product thumbnails fill the thumb area */
.tyd-thumb img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* Small responsive tweak */
@media (max-width: 640px) {
  .tyd-card-inner { flex-direction: column; align-items: stretch; }
  .tyd-thumb { flex: none; width: 100%; }
  .tyd-actions { flex-direction: row; justify-content: space-between; }
}

/* Utility helpers */
.tyd-hidden { display: none !important; }
.tyd-empty { text-align: center; color: #666; }
.tyd-qty-controls { display: none; align-items: center; gap: 8px; }
.tyd-qty-controls .tyd-qty-btn { padding: 6px 10px; border-radius: 6px; background: #f0f0f0; border: 1px solid #e6e6e6; cursor: pointer;margin:0; }
.tyd-qty-value { min-width: 28px; display:inline-block; text-align:center; }
/**
 * Thái Y Đường - Booking System CSS
 * Plugin version
 * @version 2.0.0
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --tyd-primary: #991b1b;
    --tyd-primary-dark: #4a0a11;
    --tyd-gold: #FFD700;
    --tyd-gold-dark: #d4af00;
    --tyd-text: #333333;
    --tyd-text-light: #333333;
    --tyd-bg: #f8f5f0;
    --tyd-bg-card: #ffffff;
    --tyd-border: #e0d5c7;
    --tyd-success: #22c55e;
    --tyd-warning: #f59e0b;
    --tyd-error: #ef4444;
    --tyd-shadow: 0 4px 20px rgba(92, 13, 21, 0.1);
    --tyd-shadow-lg: 0 10px 40px rgba(92, 13, 21, 0.15);
    --tyd-radius: 12px;
    --tyd-radius-lg: 16px;
    --tyd-transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
.tyd-booking-wrapper {
    background: var(--tyd-bg);
    min-height: 100vh;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    box-sizing: border-box;
}

.tyd-booking-wrapper *,
.tyd-booking-wrapper *::before,
.tyd-booking-wrapper *::after {
    box-sizing: border-box;
}

.tyd-booking-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================
   HERO SECTION
   ============================================ */
.tyd-booking-hero {
    text-align: center;
    margin-bottom: 40px;
}

.tyd-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--tyd-primary);
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, var(--tyd-primary), #800020);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tyd-hero-subtitle {
    font-size: 1.1rem;
    color: var(--tyd-text-light);
    margin: 0;
}

/* ============================================
   PROGRESS STEPS
   ============================================ */
.tyd-progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tyd-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: var(--tyd-transition);
}

.tyd-step.active,
.tyd-step.completed {
    opacity: 1;
}

.tyd-step.completed .tyd-step-number {
    background: var(--tyd-success);
}

.tyd-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tyd-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.tyd-step-label {
    font-size: 0.9rem;
    color: var(--tyd-text);
    font-weight: 500;
}

.tyd-step-line {
    width: 40px;
    height: 2px;
    background: var(--tyd-border);
}

/* ============================================
   BOOKING CARD
   ============================================ */
.tyd-booking-card {
    background: var(--tyd-bg-card);
    border-radius: var(--tyd-radius-lg);
    box-shadow: var(--tyd-shadow);
    overflow: hidden;
    border: 1px solid var(--tyd-border);
}

.tyd-card-header {
    background: linear-gradient(135deg, var(--tyd-primary), #800020);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.tyd-card-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
	color: hsl(43.24deg 78.17% 55.1%);
}

.tyd-card-body {
    padding: 24px;
}

/* ============================================
   BOOKING TYPE TABS
   ============================================ */
.tyd-booking-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.tyd-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--tyd-border);
    border-radius: var(--tyd-radius);
    background: white;
    cursor: pointer;
    transition: var(--tyd-transition);
    font-size: 0.95rem;
    color: var(--tyd-text);
    font-family: inherit;
}

.tyd-tab-btn:hover {
    border-color: var(--tyd-primary);
    background: #fef7f7;
}

.tyd-tab-btn.active {
    border-color: var(--tyd-primary);
    background: linear-gradient(135deg, rgba(92, 13, 21, 0.05), rgba(128, 0, 32, 0.05));
    color: var(--tyd-primary);
}

.tyd-tab-icon {
    font-size: 1.5rem;
}

/* ============================================
   DEPOSIT INFO BOX
   ============================================ */
.tyd-deposit-info {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border: 1px solid var(--tyd-gold);
    border-radius: var(--tyd-radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: var(--tyd-primary);
    font-size: 0.95rem;
}
#deposit-text{
font-weight:700;}
/* ============================================
   FORM ELEMENTS
   ============================================ */
.tyd-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tyd-form-group {
    margin-bottom: 16px;
}

.tyd-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--tyd-text);
    font-size: 0.9rem;
}

.tyd-form-label .required {
    color: var(--tyd-error);
}

.tyd-form-input,
.tyd-form-textarea {
    width: 100%;
    
    border: 1px solid var(--tyd-border);
    border-radius: var(--tyd-radius);
    font-size: 1rem;
    color: var(--tyd-text);
    background: white;
    transition: var(--tyd-transition);
    font-family: inherit;
}

.tyd-form-input:focus,
.tyd-form-textarea:focus {
    outline: none;
    border-color: var(--tyd-primary);
    box-shadow: 0 0 0 3px rgba(92, 13, 21, 0.1);
}

.tyd-form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   BUTTONS
   ============================================ */
.tyd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--tyd-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tyd-transition);
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.tyd-btn-primary {
    background: linear-gradient(135deg, var(--tyd-primary), #800020);
    color: white;
}

.tyd-btn-primary:hover {
    background: linear-gradient(135deg, var(--tyd-primary-dark), #b51220);
    transform: translateY(-2px);
    box-shadow: var(--tyd-shadow);
}

.tyd-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tyd-btn-outline {
    background: white;
    color: var(--tyd-primary);
    border: 2px solid var(--tyd-primary);
}

.tyd-btn-outline:hover {
    background: var(--tyd-primary);
    color: white;
}

.tyd-btn-block {
    width: 100%;
    margin-top: 8px;
}

.tyd-btn-back {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ============================================
   MENU TABS
   ============================================ */
.tyd-menu-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--tyd-border);
    -webkit-overflow-scrolling: touch;
}

.tyd-menu-tab {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--tyd-border);
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--tyd-transition);
    font-size: 0.9rem;
    color: var(--tyd-text);
    font-family: inherit;
}

.tyd-menu-tab:hover {
    border-color: var(--tyd-primary);
    color: var(--tyd-primary);
}

.tyd-menu-tab.active {
    background: var(--tyd-primary);
    border-color: var(--tyd-primary);
    color: white;
}

/* Badge that shows total number of selected menu items (top-right of the menu card) */
.tyd-menu-count-badge {
    background: var(--tyd-gold);
    color: var(--tyd-primary-dark);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--tyd-shadow);
    margin-left: 12px;
}
.tyd-menu-count-badge #menu-count {
    background: rgba(0,0,0,0.06);
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--tyd-primary-dark);
    font-weight: 800;
}

/* ============================================
   MENU GRID
   ============================================ */
.tyd-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.tyd-menu-item {
    background: white;
    border: 1px solid var(--tyd-border);
    border-radius: var(--tyd-radius);
    padding: 16px;
    transition: var(--tyd-transition);
}

.tyd-menu-item:hover {
    border-color: var(--tyd-primary);
    box-shadow: var(--tyd-shadow);
}

.tyd-menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.tyd-menu-item-name {
    font-weight: 600;
    color: var(--tyd-text);
    font-size: 1rem;
    flex: 1;
}

.tyd-menu-item-price {
    color: var(--tyd-primary);
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    margin-left: 12px;
}

.tyd-menu-item-desc {
    color: var(--tyd-text-light);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.tyd-menu-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tyd-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--tyd-bg);
    border-radius: 8px;
    padding: 4px;
}

.tyd-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--tyd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tyd-transition);
    font-family: inherit;
}

.tyd-qty-btn:hover {
    background: var(--tyd-primary);
    color: white;
}

.tyd-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: var(--tyd-text);
}

.tyd-add-btn {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--tyd-primary), #800020);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--tyd-transition);
    font-family: inherit;
}

.tyd-add-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============================================
   CART SUMMARY
   ============================================ */
.tyd-cart-summary {
    background: var(--tyd-bg);
    border-radius: var(--tyd-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.tyd-cart-summary h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--tyd-primary);
}

.tyd-cart-items {
    margin-bottom: 16px;
}

.tyd-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--tyd-border);
}

.tyd-cart-item:last-child {
    border-bottom: none;
}

.tyd-cart-item-info {
    flex: 1;
}

.tyd-cart-item-name {
    font-weight: 500;
    color: var(--tyd-text);
}

.tyd-cart-item-qty {
    font-size: 0.85rem;
    color: var(--tyd-text-light);
}

.tyd-cart-item-price {
    font-weight: 600;
    color: var(--tyd-primary);
}

.tyd-cart-item-remove {
    background: none;
    border: none;
    color: var(--tyd-error);
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    font-size: 1.2rem;
}

.tyd-cart-totals {
    padding-top: 16px;
    border-top: 2px solid var(--tyd-border);
}

.tyd-cart-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.tyd-cart-row.tyd-cart-deposit {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tyd-primary);
    padding-top: 8px;
    border-top: 1px dashed var(--tyd-border);
    margin-top: 8px;
}

/* ============================================
   ORDER SUMMARY (Menu step)
   ============================================ */
.tyd-order-summary {
    background: linear-gradient(135deg, rgba(92,13,21,0.06), rgba(92,13,21,0.03));
    border: 1px solid rgba(255,215,0,0.15);
    padding: 18px;
    border-radius: var(--tyd-radius);
    margin-bottom: 18px;
}
.tyd-order-summary h3 {
    margin: 0 0 12px 0;
    color: var(--tyd-gold);
    font-size: 1.15rem;
}
.tyd-order-items {
    margin-bottom: 12px;
}
.tyd-order-items .tyd-order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,215,0,0.06);
}
.tyd-order-items .tyd-order-item:last-child { border-bottom: none; }
.tyd-order-divider { height: 1px; background: rgba(255,215,0,0.06); margin: 12px 0; }
.tyd-order-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 1rem;
}
.tyd-order-row span:last-child { font-weight: 700; color: var(--tyd-primary); }

/* ============================================
   PAYMENT SECTION
   ============================================ */
.tyd-payment-summary {
    margin-bottom: 24px;
}

.tyd-payment-summary h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #991b1b;
}

.tyd-detail-box {
    background: var(--tyd-bg);
    border-radius: var(--tyd-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.tyd-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--tyd-border);
    font-size: 0.9rem;
}

.tyd-detail-row:last-child {
    border-bottom: none;
}

.tyd-detail-label {
    color: var(--tyd-text-light);
}

.tyd-detail-value {
    font-weight: 500;
    color: var(--tyd-text);
}

.tyd-selected-items {
    margin-top: 16px;
}

.tyd-selected-items h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: var(--tyd-text);
}

.tyd-payment-amount {
    background: linear-gradient(135deg, var(--tyd-gold), var(--tyd-gold-dark));
    color: var(--tyd-primary);
    padding: 16px 20px;
    border-radius: var(--tyd-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.tyd-payment-amount strong {
    font-size: 1.4rem;
}

/* ============================================
   QR CODE SECTION
   ============================================ */
.tyd-qr-section {
    text-align: center;
    margin-bottom: 24px;
}

.tyd-qr-section h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--tyd-text);
}

.tyd-qr-container {
    background: white;
    padding: 20px;
    border-radius: var(--tyd-radius);
    display: inline-block;
    box-shadow: var(--tyd-shadow);
    border: 2px solid var(--tyd-border);
}

.tyd-qr-container img {
    width: 200px;
    height: 200px;
    display: block;
}

.tyd-qr-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--tyd-text-light);
}

/* ============================================
   BANK INFO
   ============================================ */
.tyd-bank-info {
    background: var(--tyd-bg);
    border-radius: var(--tyd-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.tyd-bank-info h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--tyd-text);
}

.tyd-bank-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--tyd-border);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 8px;
}

.tyd-bank-row:last-child {
    border-bottom: none;
}

.tyd-bank-row span:first-child {
    color: var(--tyd-text-light);
    min-width: 120px;
}

.tyd-bank-row strong {
    flex: 1;
    color: var(--tyd-text);
    word-break: break-all;
}

.tyd-copy-btn {
    background: white;
    border: 1px solid var(--tyd-border);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--tyd-transition);
    font-family: inherit;
}

.tyd-copy-btn:hover {
    background: var(--tyd-primary);
    border-color: var(--tyd-primary);
    color: white;
}

/* ============================================
   WARNING BOX
   ============================================ */
.tyd-warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--tyd-warning);
    border-radius: var(--tyd-radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #92400e;
    font-size: 0.9rem;
}

/* ============================================
   SUCCESS CARD
   ============================================ */
.tyd-success-card {
    text-align: center;
    padding: 40px 24px;
}

.tyd-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--tyd-success), #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
}

.tyd-success-title {
    font-size: 1.8rem;
    color: var(--tyd-success);
    margin: 0 0 8px 0;
}

.tyd-success-message {
    color: var(--tyd-text-light);
    margin-bottom: 24px;
}

.tyd-booking-code {
    background: linear-gradient(135deg, var(--tyd-gold), var(--tyd-gold-dark));
    color: var(--tyd-primary);
    padding: 16px 24px;
    border-radius: var(--tyd-radius);
    display: inline-block;
    margin-bottom: 24px;
}

.tyd-booking-code span {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.tyd-booking-code strong {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.tyd-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
    margin-bottom: 24px;
}

.tyd-contact-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--tyd-border);
    color: var(--tyd-text-light);
    font-size: 0.9rem;
}

.tyd-contact-info p {
    margin: 4px 0;
}

/* ============================================
   STEP VISIBILITY
   ============================================ */
.tyd-step-content {
    display: none;
}

.tyd-step-content.active {
    display: block;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.tyd-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--tyd-primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--tyd-radius);
    box-shadow: var(--tyd-shadow-lg);
    z-index: 99999;
    animation: tydSlideIn 0.3s ease;
}

.tyd-toast.success {
    background: var(--tyd-success);
}

.tyd-toast.error {
    background: var(--tyd-error);
}

@keyframes tydSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .tyd-booking-wrapper {
        padding: 20px 16px;
    }
    
    .tyd-hero-title {
        font-size: 1.8rem;
    }
    
    .tyd-hero-subtitle {
        font-size: 1rem;
    }
    
    .tyd-progress-steps {
        gap: 4px;
    }
    
    .tyd-step-label {
        display: none;
    }
    
    .tyd-step-line {
        width: 20px;
    }
    
    .tyd-form-grid {
        grid-template-columns: 1fr;
    }
    
    .tyd-booking-tabs {
        grid-template-columns: 1fr;
    }
    
    .tyd-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tyd-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .tyd-payment-amount {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .tyd-bank-row span:first-child {
        min-width: 100%;
    }
    
    .tyd-action-buttons {
        flex-direction: column;
    }
    
    .tyd-action-buttons .tyd-btn {
        width: 100%;
    }
}
