/* Container Box & Title */
.tff-master-table-wrapper {
  margin: 32px 0;
  padding: 24px;
  background: var(--color-surface, #ffffff);
  border: 1.5px solid var(--color-border, #E2EBE4);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.08));
}

.tff-master-table-title {
  font-family: var(--font-display), -apple-system, sans-serif;
  font-size: var(--text-2xl, 1.5rem);
  font-weight: 800;
  color: var(--color-text, #1A1F1A);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border, #E2EBE4);
}

/* Master Table Design */
.tff-master-table-scroller {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tff-master-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tff-master-table th {
  padding: 14px 16px;
  background: var(--color-bg-2, #F7F9F7);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text-2, #4A5C4E);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--color-border, #E2EBE4);
}

.tff-master-table td {
  padding: 16px;
  border-bottom: 1px solid var(--color-border, #E2EBE4);
  color: var(--color-text, #1A1F1A);
  font-size: 14px;
  vertical-align: middle;
}

/* Rounded Tiny Avatars / Emoji Fallbacks */
.tff-table-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg-3, #EEF3EE);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--color-border, #E2EBE4);
}

.tff-table-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tff-table-emoji-fallback {
  font-size: 20px;
  line-height: 1;
}

/* Inside Gutenberg Editor Controls styling */
.editor-mode .thumb-editor-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-2, #F7F9F7);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border, #E2EBE4);
}

/* Image preview & delete styling */
.editor-mode .image-preview-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-mode .tiny-avatar-preview {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--color-border, #E2EBE4);
}

.editor-mode .remove-image-btn {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  font-size: 10px !important;
  border: none !important;
  cursor: pointer !important;
  line-height: 1 !important;
}

/* Streamlined Dashed Emoji Input */
.editor-mode .emoji-inline-input {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 1px dashed var(--color-text-3, #7A917E) !important;
  background: #ffffff !important;
  border-radius: 6px;
  text-align: center;
  font-size: 18px;
  color: var(--color-text, #1A1F1A) !important;
}

.editor-mode .emoji-inline-input:focus {
  border-style: solid !important;
  border-color: var(--color-primary, #1A7F4B) !important;
  outline: none;
}

/* Streamlined Media Select Trigger */
.editor-mode .media-upload-btn {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  background: #ffffff !important;
  border: 1px solid var(--color-border, #E2EBE4) !important;
  border-radius: 6px !important;
  cursor: pointer;
}

/* Styling for Delete Column Button inside Header */
.th-header-inner-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}

.th-header-inner-wrap .delete-column-btn {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  border: none !important;
  line-height: 1 !important;
  cursor: pointer !important;
  opacity: 0.3;
  transition: opacity 0.15s ease, transform 0.15s ease !important;
}

.th-header-inner-wrap:hover .delete-column-btn {
  opacity: 1;
}

.th-header-inner-wrap .delete-column-btn:hover {
  transform: scale(1.2);
  background: #b91c1c !important;
}

.editor-mode .tff-master-table th {
  padding: 10px 12px !important;
}

/* Custom Add Button Style */
.tff-master-table .menu-item-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary, #1A7F4B);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.tff-master-table .menu-item-add:hover {
  transform: scale(1.1);
  background: var(--color-primary-dark, #145E38);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .tff-master-table, 
  .tff-master-table thead, 
  .tff-master-table tbody, 
  .tff-master-table tr, 
  .tff-master-table td {
    display: block;
  }

  .tff-master-table thead {
    display: none;
  }

  .tff-master-table tr {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--color-border, #E2EBE4);
    border-radius: var(--radius-md, 12px);
    background: var(--color-surface, #ffffff);
    position: relative;
  }

  .tff-master-table tr .td-image {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 0;
  }

  .tff-master-table tr:has(.td-image) td:not(.td-image) {
    padding-left: 64px;
  }

  .tff-master-table td {
    padding: 6px 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .tff-master-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11px;
    color: var(--color-text-3, #7A917E);
    text-transform: uppercase;
    letter-spacing: .03em;
  }

  .tff-master-table tr td[class*="td-column-0"] {
    font-weight: 800;
    font-size: 15px;
  }
}

/* ==========================================================================
   YOAST SEO FAQ BLOCK PREMIUM STYLE OVERRIDES
   ========================================================================== */
.schema-faq.wp-block-yoast-faq-block {
    margin: 40px 0 !important;
    padding: 0 !important;
}

.schema-faq .schema-faq-section {
    background: var(--color-bg-2, #F7F9F7) !important;
    border: 1.5px solid var(--color-border, #E2EBE4) !important;
    border-radius: var(--radius-md, 12px) !important;
    padding: 22px 24px !important;
    margin-bottom: 16px !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.04)) !important;
    transition: transform 0.2s ease, border-color 0.2s ease !important;
}

/* Interactive scale hover effect */
.schema-faq .schema-faq-section:hover {
    border-color: var(--color-primary, #1A7F4B) !important;
    transform: translateY(-2px) !important;
}

/* Questions Bold Typography */
.schema-faq .schema-faq-question {
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    color: var(--color-text, #1A1F1A) !important;
    display: block !important;
    margin-bottom: 10px !important;
    line-height: 1.45 !important;
}

/* Supremely clean green 'Q.' Prefix */
.schema-faq .schema-faq-question::before {
    content: "Q. " !important;
    color: var(--color-primary, #1A7F4B) !important;
    font-weight: 800 !important;
}

/* Answers — reading-serif typography */
.schema-faq .schema-faq-answer {
    font-family: var(--font-reading) !important;
    font-size: 16px !important;
    line-height: 1.65 !important;
    color: var(--color-text-2, #4A5C4E) !important;
    margin: 0 !important;
}
/* =========================================================
   PHASE 1 FIX — Gutenberg table alignment
   Browser default table styles were center-aligning th/td text.
   Force left-align + fix the emoji/image column width.
   ========================================================= */
.tff-master-table-wrapper table.tff-master-table th,
.tff-master-table-wrapper table.tff-master-table td { text-align: left !important; }
.tff-master-table-wrapper table.tff-master-table th.th-image { width: 60px !important; min-width: 60px !important; padding-left: 16px !important; padding-right: 0 !important; }

/* =========================================================
   PHASE 5 — Live Happy Hour Badge (glow badge inside menu tables)
   Injected by assets/js/tff-happy-badges.js next to the price cell
   of rows inside a "type-happy" master table, only while Happy Hour
   is currently active for that restaurant.
   ========================================================= */
.tff-master-table-wrapper .tff-happy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent, #F4A623), var(--color-accent-dark, #D4891A));
  border-radius: var(--radius-full, 9999px);
  white-space: nowrap;
  vertical-align: middle;
  animation: tffHappyBadgeGlow 1.6s ease-in-out infinite;
}
@keyframes tffHappyBadgeGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 166, 35, 0.55); }
  50%      { box-shadow: 0 0 0 5px rgba(244, 166, 35, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .tff-master-table-wrapper .tff-happy-badge { animation: none; }
}
