/* ============================================
   WEB PIZZERÍA — estilos del módulo
   Reusa variables y componentes del tema de AJAX.
   ============================================ */

.pizzeria-tabs { flex-wrap: nowrap; }

.pz-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
  font-size: 14px;
}

/* ---- 403 / sin acceso ---- */
.pz-forbidden { text-align: center; padding: 36px 24px; }
.pz-forbidden-icon { font-size: 44px; margin-bottom: 12px; }
.pz-forbidden h2 { font-size: 18px; margin-bottom: 12px; }
.pz-forbidden p { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.pz-forbidden code {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
}
.pz-forbidden-email {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ---- Toolbar de cada sub-tab ---- */
.pz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pz-toolbar-actions { display: flex; gap: 8px; }
.pz-count { color: var(--text-muted); font-size: 13px; font-weight: 600; }

/* ---- Cards (promos / posts) ---- */
.pz-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.pz-card { padding: 0; overflow: hidden; margin-bottom: 0; }
.pz-card-img {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-input);
}
.pz-card-body { padding: 16px; }
.pz-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}
.pz-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 4px;
}
.pz-card-title { font-size: 16px; margin-bottom: 4px; }
.pz-card-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.pz-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pz-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pz-date { font-size: 12px; color: var(--text-muted); }

/* ---- Modales anchos / apilados ---- */
.pz-modal-wide { max-width: 720px; }
.pz-modal-stack { z-index: 2100; }

/* ---- Asistente IA ---- */
.pz-assistant { display: flex; flex-direction: column; gap: 10px; }
.pz-chat {
  height: 42vh;
  min-height: 240px;
  overflow-y: auto;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pz-chat-empty { color: var(--text-muted); font-size: 13px; text-align: center; margin: auto; }
.pz-msg { display: flex; }
.pz-msg-user { justify-content: flex-end; }
.pz-msg-ai { justify-content: flex-start; }
.pz-msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.pz-msg-user .pz-msg-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.pz-msg-ai .pz-msg-bubble { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

.pz-plan {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.pz-plan-head { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.pz-plan-body {
  background: var(--bg-input);
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.pz-chat-input { display: flex; flex-direction: column; gap: 8px; }
.pz-chat-input textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  resize: vertical;
}
.pz-chat-input textarea:focus { outline: none; border-color: var(--primary); }
.pz-chat-input-actions { display: flex; gap: 8px; justify-content: flex-end; }

.pz-chat-photos:empty { display: none; }
.pz-photos-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.pz-photos-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.pz-photo-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-input);
  position: relative;
}
.pz-photo-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

/* ---- Selector de Drive ---- */
.pz-drive-crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 13px;
}
.pz-crumb {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 4px;
}
.pz-crumb-sep { color: var(--text-muted); }
.pz-drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  margin-bottom: 12px;
}
.pz-drive-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  position: relative;
}
.pz-drive-item:hover { border-color: var(--primary); }
.pz-drive-item.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.pz-drive-folder { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pz-drive-folder-icon { font-size: 32px; }
.pz-drive-thumb {
  height: 80px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-input);
  border-radius: 6px;
  margin-bottom: 6px;
}
.pz-drive-name {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pz-drive-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Pepe — estadísticas ---- */
.pz-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.pz-stats-grid .stat { padding: 16px; margin-bottom: 0; }
.pz-insight { font-size: 14px; line-height: 1.5; }
.pz-chart-wrap { position: relative; height: 220px; }
.pz-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pz-list-title { font-size: 14px; margin-bottom: 10px; }
.pz-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pz-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 8px 10px;
  background: var(--bg-input);
  border-radius: 6px;
}
.pz-list li span:first-child { word-break: break-word; }
.pz-list-meta { color: var(--primary); font-weight: 700; white-space: nowrap; }
.pz-list-empty { color: var(--text-muted); font-size: 13px; padding: 8px 0; }
.pz-analysis { margin-top: 16px; }
.pz-analysis-text { font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
.pz-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

/* ---- Calendario ---- */
.pz-cal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}
.pz-cal-header h3 { font-size: 16px; min-width: 160px; text-align: center; }
.pz-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.pz-cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0;
}
.pz-cal-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 84px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pz-cal-empty { background: transparent; border: none; }
.pz-cal-today { border-color: var(--primary); }
.pz-cal-daynum { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.pz-cal-post {
  font-size: 10px;
  padding: 3px 5px;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}
.pz-cal-post.pz-cal-publicado { background: var(--success); }
.pz-cal-post.pz-cal-pendiente { background: var(--warning); color: #1a1a2e; }
.pz-cal-post.pz-cal-preparacion { background: var(--primary); }
.pz-cal-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}
.pz-cal-legend span { display: flex; align-items: center; gap: 6px; }
.pz-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pz-dot.pz-cal-publicado { background: var(--success); }
.pz-dot.pz-cal-pendiente { background: var(--warning); }
.pz-dot.pz-cal-preparacion { background: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .pz-two-col { grid-template-columns: 1fr; }
  .pz-cal-cell { min-height: 60px; }
  .pz-cal-post { font-size: 9px; }
}
