/* ========================================
   COMPONENTS.CSS
   Complex UI patterns that need custom CSS
   (Tailwind handles most utilities)
   ======================================== */

/* ===== TABLE DIAGRAMS (decor page) ===== */
.table-diagram {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.table-row-vis {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.seat {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E8C0D8;
  border: 3px solid #CC0060;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1C1428;
}

.table-center {
  background: #E8CC60;
  border-color: #C9A227;
  border-radius: 12px;
  width: 120px;
  height: 36px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  margin: 0 auto;
}

/* ===== AI CHAT WIDGET ===== */
#ai-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
}

#ai-toggle {
  background: #2E2438;
  color: white;
  border: 2px solid #C9A227;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(46,36,56,0.4);
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ai-toggle:hover {
  transform: scale(1.08);
  background: #CC0060;
}

#ai-panel {
  display: none;
  flex-direction: column;
  width: 320px;
  height: 420px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(61,44,44,0.2);
  margin-bottom: 0.8rem;
  overflow: hidden;
  border: 2px solid #E8C0D8;
}

#ai-panel.open {
  display: flex;
}

.ai-header {
  background: linear-gradient(135deg, #CC0060, #CC0060);
  color: white;
  padding: 1rem 1.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.ai-msg {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.ai-msg.bot {
  background: #F6F2FA;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.ai-msg.user {
  background: #CC0060;
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.ai-input-row {
  display: flex;
  border-top: 1px solid #E8C0D8;
  padding: 0.6rem;
  gap: 0.4rem;
}

.ai-input-row input {
  flex: 1;
  border: 1px solid #E8C0D8;
  border-radius: 20px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  outline: none;
  font-family: 'Lato', sans-serif;
}

.ai-input-row button {
  background: #CC0060;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
}

/* ===== AI RICH RESPONSES ===== */
.ai-response {
  font-size: 0.83rem;
  line-height: 1.5;
}

.ai-resp-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  color: #CC0060;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.ai-resp-section {
  margin-bottom: 0.8rem;
}

.ai-resp-heading {
  font-weight: 700;
  font-size: 0.8rem;
  color: #1C1428;
  margin-bottom: 0.2rem;
}

.ai-resp-body {
  color: #4A3060;
}

.ai-resp-body a {
  color: #CC0060;
  font-weight: 700;
  text-decoration: none;
}

.ai-resp-body a:hover {
  text-decoration: underline;
}

.ai-msg.bot.rich {
  background: #F6F2FA;
  max-width: 95%;
}

/* ===== AI INLINE BOX ===== */
.ai-inline-box {
  max-width: 680px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(61,44,44,0.15);
  overflow: hidden;
  border: 2px solid #E8C0D8;
}

.ai-inline-header {
  background: linear-gradient(135deg, #2E2438, #CC0060);
  color: white;
  padding: 1rem 1.4rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#ai-inline-messages {
  height: 280px;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: #fdfaf7;
}

.ai-inline-input-row {
  display: flex;
  border-top: 1px solid #E8C0D8;
  padding: 0.8rem;
  gap: 0.5rem;
  background: white;
}

.ai-inline-input-row input {
  flex: 1;
  border: 2px solid #E8C0D8;
  border-radius: 25px;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  outline: none;
  font-family: 'Lato', sans-serif;
  transition: border-color 0.2s;
}

.ai-inline-input-row input:focus {
  border-color: #CC0060;
}

.ai-inline-input-row button {
  background: #CC0060;
  color: white;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s, transform 0.2s;
}

.ai-inline-input-row button:hover {
  background: #A0004A;
  transform: scale(1.05);
}

.ai-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.2rem;
}

.quick-prompt-btn {
  background: white;
  border: 2px solid #E8C0D8;
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: #1C1428;
  font-family: 'Lato', sans-serif;
  transition: all 0.2s;
}

.quick-prompt-btn:hover {
  background: #CC0060;
  border-color: #CC0060;
  color: white;
}

/* ===== BUDGET TOOL ===== */
.budget-tool {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 6px 30px rgba(28,20,40,0.14);
  max-width: 800px;
  margin: 0 auto;
}

.budget-result {
  margin-top: 2rem;
  border-top: 2px solid #E8C0D8;
  padding-top: 1.5rem;
}

.budget-total {
  font-size: 2rem;
  font-family: 'Cormorant Garamond', serif;
  color: #CC0060;
  text-align: center;
  margin-bottom: 1.5rem;
}

.budget-bar-item {
  margin-bottom: 1rem;
}

.budget-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.bar-track {
  background: #eee;
  border-radius: 10px;
  height: 14px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* ===== VENDOR BADGES ===== */
.vendor-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 0.3rem;
}

/* ===== FILTER BUTTONS ===== */
.filter-btn {
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  border: 2px solid #E8C0D8;
  background: white;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: #1C1428;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: #CC0060;
  border-color: #CC0060;
  color: white;
}

/* ===== AI HERO SECTION ===== */
.ai-hero-section {
  background: linear-gradient(135deg, #F6F2FA 0%, #EDE5F5 100%);
  padding: 4rem 1.5rem;
  text-align: center;
}

/* ===== MISC ===== */
.tag-list { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }

.theme-tag {
  background: var(--white);
  border: 1.5px solid var(--blush);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Lato', sans-serif;
}
.theme-tag:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white);
}

/* ===== THEME MODAL ===== */
.theme-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,20,40,0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.theme-modal.open { display: flex; }

.theme-modal-content {
  background: var(--white);
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 80px rgba(28,20,40,0.35);
}

.theme-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--cream);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s;
}
.theme-modal-close:hover { background: var(--blush); }

.theme-modal-swatch-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.theme-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: #1C1428;
  margin-bottom: 0.3rem;
}

.theme-modal-mood {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0e8f4;
}

.theme-modal-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.theme-modal-sec h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  margin-bottom: 0.6rem;
  font-family: 'Lato', sans-serif;
}

.theme-modal-sec ul {
  list-style: none;
  padding: 0;
}
.theme-modal-sec li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.25rem 0;
  border-bottom: 1px solid #f5f0f8;
  line-height: 1.4;
}
.theme-modal-sec li:last-child { border-bottom: none; }

.theme-palette-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.theme-color-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.theme-color-codes code {
  font-size: 0.7rem;
  background: var(--cream);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--text-light);
  font-family: monospace;
}

@media (max-width: 600px) {
  .theme-modal-sections { grid-template-columns: 1fr; }
  .theme-modal-content { padding: 1.8rem 1.4rem; }
}

.checklist {
  list-style: none;
}

.checklist li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0e8e0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checklist li::before {
  content: '–';
  font-size: 1.1rem;
  color: #CC0060;
}

.vendor-meta {
  font-size: 0.8rem;
  color: #4A3060;
  margin-bottom: 0.4rem;
}
