/* ══════════════════════════════════════════════════════
   cms-components.css — El Palmaret
   Pop-up Evento · Banner Aviso · Horario Especial
   Gestionados desde admin.html sin tocar el codigo
══════════════════════════════════════════════════════ */

/* ── BANNER AVISO (franja superior) ── */
#cms-banner {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10010;
  padding: 10px 48px 10px 20px;
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  color: #0f2540;
  background: #C9A84C;
  animation: cmsBannerIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  line-height: 1.4;
}
#cms-banner.visible { display: block; }
#cms-banner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#cms-banner-close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: inherit; cursor: pointer;
  padding: 4px 6px; border-radius: 4px; font-size: 1.1rem; line-height: 1;
  opacity: 0.7; transition: opacity 0.18s ease;
}
#cms-banner-close:hover { opacity: 1; }
@keyframes cmsBannerIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
body.cms-banner-on nav { top: 40px !important; }

/* ── POP-UP MODAL DE EVENTO ── */
#cms-popup-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 10020;
  background: rgba(8, 18, 36, 0.82);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 1.5rem;
}
#cms-popup-overlay.visible {
  display: flex;
  animation: cmsOverlayIn 0.35s ease forwards;
}
@keyframes cmsOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#cms-popup {
  position: relative; width: 100%; max-width: 460px;
  background: linear-gradient(155deg, #183758 0%, #0d2238 100%);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 20px; padding: 2.5rem 2rem 2rem;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,168,76,0.15);
  animation: cmsPopupIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cmsPopupIn {
  from { opacity: 0; transform: translateY(25px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#cms-popup::before {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, #C9A84C, transparent);
}
#cms-popup-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(237,232,213,0.06); border: 1px solid rgba(237,232,213,0.15);
  color: rgba(237,232,213,0.65); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
#cms-popup-close:hover {
  background: rgba(201,168,76,0.15); border-color: rgba(201,168,76,0.45); color: #C9A84C; transform: scale(1.08);
}
.cms-popup-badge {
  display: inline-block;
  background: rgba(201,168,76,0.10); border: 1px solid rgba(201,168,76,0.30);
  color: #C9A84C; font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 999px; margin-bottom: 1.2rem;
}
.cms-popup-icon-wrap {
  width: 68px; height: 68px; margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.18) 0%, rgba(201,168,76,0.04) 70%);
  border: 1px solid rgba(201,168,76,0.35);
  display: flex; align-items: center; justify-content: center;
  color: #C9A84C;
  box-shadow: 0 0 24px rgba(201,168,76,0.20);
}
.cms-popup-icon-wrap svg {
  width: 32px; height: 32px; display: block;
}
.cms-popup-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.85rem; font-weight: 600; color: #E8C97A;
  line-height: 1.2; margin-bottom: 0.75rem;
}
.cms-popup-desc {
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 0.92rem; color: rgba(237,232,213,0.72);
  line-height: 1.65; margin-bottom: 1.75rem;
}
.cms-popup-btn {
  display: inline-block; background: #C9A84C; color: #0f2540;
  padding: 0.85rem 2.2rem; border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.84rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; text-decoration: none;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  margin-bottom: 0.75rem;
}
.cms-popup-btn:hover {
  background: #E8C97A; box-shadow: 0 6px 24px rgba(201,168,76,0.4); transform: translateY(-1px);
}
.cms-popup-skip { display: block; font-size: 0.72rem; color: rgba(237,232,213,0.4); cursor: pointer; letter-spacing: 0.08em; margin-top: 0.5rem; transition: color 0.18s ease; }
.cms-popup-skip:hover { color: rgba(237,232,213,0.75); }

/* ── AVISO HORARIO ESPECIAL ── */
#cms-horario {
  display: none; margin: 0 2rem 2rem; max-width: 900px;
  margin-left: auto; margin-right: auto; padding: 1rem 1.5rem;
  border-radius: 8px; font-family: 'Barlow', system-ui, sans-serif;
  font-size: 0.9rem; line-height: 1.6; border: 1px solid; text-align: center;
}
#cms-horario.visible { display: block; animation: cmsFadeUp 0.5s ease forwards; }
#cms-horario[data-type="cierre"]     { background: rgba(229,115,115,0.1); border-color: rgba(229,115,115,0.3); color: #f48a8a; }
#cms-horario[data-type="vacaciones"] { background: rgba(100,181,246,0.1); border-color: rgba(100,181,246,0.3); color: #81c4f8; }
#cms-horario[data-type="horario"]    { background: rgba(201,168,76,0.10); border-color: rgba(201,168,76,0.30); color: #E8C97A; }
#cms-horario[data-type="reforma"]    { background: rgba(240,162,90,0.10); border-color: rgba(240,162,90,0.30); color: #f5b872; }
#cms-horario[data-type="fiesta"]     { background: rgba(76,175,125,0.10); border-color: rgba(76,175,125,0.30); color: #6dd4a2; }
.cms-horario-inner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.cms-horario-icon  { font-size: 1.3rem; flex-shrink: 0; }
.cms-horario-msg   { font-weight: 500; }
.cms-horario-dates { font-size: 0.78rem; opacity: 0.75; margin-top: 3px; }

@keyframes cmsFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  #cms-popup-overlay {
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
  }
  #cms-popup {
    width: 100%;
    max-width: 360px;
    padding: 2.2rem 1.5rem 1.75rem;
    border-radius: 20px;
    margin: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.8), 0 0 30px rgba(201,168,76,0.15);
  }
  .cms-popup-title { font-size: 1.45rem; line-height: 1.2; }
  .cms-popup-desc { font-size: 0.88rem; margin-bottom: 1.35rem; }
  .cms-popup-icon-wrap { width: 58px; height: 58px; margin-bottom: 1rem; }
  .cms-popup-icon-wrap svg { width: 28px; height: 28px; }
  .cms-popup-btn { width: 100%; box-sizing: border-box; padding: 0.8rem 1.5rem; }
  #cms-horario { margin: 0 1rem 1.5rem; }
}

/* ── MODAL NATIVO PARA FORMULARIOS (TALLY / EMBED) ── */
#cms-form-modal {
  display: none;
  position: fixed; inset: 0; z-index: 600;
  background: rgba(8, 18, 36, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  align-items: center; justify-content: center; padding: 1rem;
}
#cms-form-modal.visible {
  display: flex;
  animation: cmsOverlayIn 0.35s ease forwards;
}
#cms-form-container {
  position: relative; width: 100%; max-width: 680px; height: 88vh; max-height: 760px;
  background: #0f2540;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(201,168,76,0.15);
  display: flex; flex-direction: column;
}
#cms-form-close {
  position: absolute; top: 12px; right: 12px; z-index: 20;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(15, 37, 64, 0.92); border: 1px solid rgba(201, 168, 76, 0.4);
  color: #C9A84C; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; line-height: 1; transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
#cms-form-close:hover {
  background: #C9A84C; color: #0f2540; transform: scale(1.08);
}
#cms-form-iframe {
  width: 100%; height: 100%; border: none; flex: 1;
}
@media (max-width: 600px) {
  #cms-form-modal { padding: 0; align-items: flex-end; }
  #cms-form-container { height: 92vh; border-radius: 16px 16px 0 0; max-height: none; }
}

/* ── CMS · EL PLATO DEL DÍA (SECCIÓN GASTRONÓMICA) ── */
.cms-plato-section {
  position: relative;
  padding: 3rem 1.5rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.08) 0%, rgba(10,22,40,0.98) 70%);
  border-top: 1px solid rgba(201,168,76,0.18);
  border-bottom: 1px solid rgba(201,168,76,0.18);
  overflow: hidden;
}
.cms-plato-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(201,168,76,0.12) 1px, transparent 1px);
  background-size: 32px 32px; opacity: 0.35; pointer-events: none;
}
.cms-plato-container {
  max-width: 1100px; margin: 0 auto; position: relative; z-index: 2;
}
.cms-plato-card {
  background: linear-gradient(135deg, rgba(15,37,64,0.92) 0%, rgba(8,18,36,0.96) 100%);
  border: 1px solid rgba(201,168,76,0.32);
  border-radius: 20px;
  padding: 2.2rem 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(201,168,76,0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.cms-plato-card:hover {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6), 0 0 30px rgba(201,168,76,0.12);
}
.cms-plato-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
  padding-bottom: 1.2rem; border-bottom: 1px solid rgba(201,168,76,0.15);
}
.cms-plato-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.35);
  color: #E8C97A;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px;
}
.cms-plato-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4CAF7D;
  box-shadow: 0 0 10px rgba(76,175,125,0.8);
  animation: platoPulse 2s infinite;
}
@keyframes platoPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}
.cms-plato-tag {
  font-family: 'Barlow', sans-serif;
  font-size: 0.82rem; color: #EDE8D5; opacity: 0.75;
  letter-spacing: 0.05em;
}
.cms-plato-content {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2.5rem; flex-wrap: wrap;
}
.cms-plato-main {
  flex: 1 1 500px;
}
.cms-plato-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem; font-weight: 500;
  color: #EDE8D5; line-height: 1.2; margin: 0 0 0.8rem 0;
}
.cms-plato-title em {
  font-style: italic; color: #E8C97A;
}
.cms-plato-desc {
  font-family: 'Barlow', sans-serif;
  font-size: 1rem; line-height: 1.6;
  color: #EDE8D5; opacity: 0.88; margin: 0 0 0.8rem 0;
}
.cms-plato-meta {
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem; color: #C9A84C;
  font-style: italic; opacity: 0.9;
}
.cms-plato-side {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 1.2rem; min-width: 220px;
}
.cms-plato-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem; font-weight: 600; color: #C9A84C;
  line-height: 1; text-shadow: 0 2px 10px rgba(201,168,76,0.3);
}
.cms-plato-price small {
  font-family: 'Barlow', sans-serif; font-size: 0.9rem;
  font-weight: 400; color: #EDE8D5; opacity: 0.7; margin-left: 4px;
}
.cms-plato-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.cms-plato-actions .bp {
  padding: 12px 24px; font-size: 0.82rem;
}
.cms-plato-ig-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 4px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.3);
  color: #EDE8D5; font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none;
  transition: all 0.2s ease;
}
.cms-plato-ig-btn:hover {
  background: rgba(201,168,76,0.2);
  border-color: #C9A84C; color: #E8C97A;
  transform: translateY(-2px);
}

.cms-plato-desc:empty { display: none; }
.cms-plato-meta:empty { display: none; }

@media (max-width: 768px) {
  .cms-plato-section { padding: 1.5rem 1rem; }
  .cms-plato-card { padding: 1.4rem 1.25rem 1.25rem; border-radius: 16px; }
  .cms-plato-header { margin-bottom: 0.9rem; padding-bottom: 0.75rem; }
  .cms-plato-badge { font-size: 0.72rem; padding: 4px 10px; }
  .cms-plato-tag { font-size: 0.75rem; }
  .cms-plato-title { font-size: 1.5rem; margin: 0 0 0.35rem 0; line-height: 1.25; }
  .cms-plato-desc { font-size: 0.88rem; line-height: 1.45; margin: 0 0 0.4rem 0; }
  .cms-plato-meta { font-size: 0.8rem; margin: 0 0 0.2rem 0; }
  .cms-plato-content { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .cms-plato-main { flex: 1 1 auto; width: 100%; }
  .cms-plato-side {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    margin-top: 0.4rem;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
    gap: 0.75rem;
    min-width: 0;
  }
  .cms-plato-price { font-size: 1.8rem; line-height: 1; }
  .cms-plato-price small { font-size: 0.75rem; }
  .cms-plato-actions { width: auto; flex: 0 0 auto; gap: 6px; }
  .cms-plato-actions .bp { padding: 9px 16px; font-size: 0.75rem; white-space: nowrap; }
  .cms-plato-ig-btn { padding: 8px 12px; font-size: 0.72rem; }
}
