/* ═══════════════════════════════════════════════════════════════════
   WF Horario — Shortcode Card, Blocker Overlay, Frontend Modal
   ═══════════════════════════════════════════════════════════════════ */

/* ── Paste banner (toggled by JS) ─────────────────────────────── */
.wf-h-paste-banner.show {
  display: flex !important;
}
.wf-h-copy-day.wf-h-copy-active {
  background: #c9a84c !important;
  color: #fff !important;
  border-color: #c9a84c !important;
}

/* ── Tarjeta Shortcode ────────────────────────────────────────── */

.wf-horario-card {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 520px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  color: #1f2937;
}
.wf-h-status {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.wf-h-status-open {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.wf-h-status-closed {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.wf-h-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.wf-h-table td {
  padding: 8px 4px;
  border-bottom: 1px solid #f3f4f6;
}
.wf-h-table tr:last-child td {
  border-bottom: none;
}
.wf-h-today td {
  font-weight: 600;
}
.wf-h-day {
  color: #374151;
  width: 100px;
}
.wf-h-hours {
  text-align: right;
  color: #6b7280;
}
.wf-h-closed {
  color: #ef4444;
}
.wf-h-exceptions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}
.wf-h-exceptions h4 {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.wf-h-exc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 4px 0;
  color: #6b7280;
}
.wf-h-exc-date {
  font-weight: 600;
  color: #374151;
  min-width: 90px;
}
.wf-h-exc-label {
  flex: 1;
}
.wf-h-exc-hours {
  color: #9ca3af;
}

/* ── Blocker Overlay ──────────────────────────────────────────── */

#store-blocker-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: inherit;
  animation: sbFadeIn .4s ease;
  pointer-events: none;
}
#store-blocker-box {
  pointer-events: auto;
}
@keyframes sbFadeIn {
  from { opacity:0; } to { opacity:1; }
}
#store-blocker-box {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  animation: sbSlideUp .4s ease;
}
@keyframes sbSlideUp {
  from { transform:translateY(30px); opacity:0; }
  to   { transform:translateY(0);    opacity:1; }
}
#store-blocker-icon {
  line-height: 1;
  margin-bottom: 16px;
}
#store-blocker-box h2 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  color: #1a1a1a;
  font-weight: 700;
}
#store-blocker-box p {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
}
#store-blocker-box p strong {
  color: #1a1a1a;
}
.store-blocker-sub {
  font-size: .875rem !important;
  color: #888 !important;
  margin-top: 8px !important;
  margin-bottom: 20px !important;
}
.store-blocker-close-container {
  margin-top: 25px;
}
.store-blocker-close-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all .3s ease;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(76,175,80,.3);
}
.store-blocker-close-btn:hover:not(:disabled) {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76,175,80,.4);
}
.store-blocker-close-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  opacity: .7;
}
.generar-pedido.store-blocked-btn {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
body.store-blocked {
  overflow: hidden;
}
#store-blocker-overlay,
#store-blocker-box {
  pointer-events: all;
}

/* ── Frontend editor modal ────────────────────────────────────── */

.wf-h-fe-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999999999;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.wf-h-fe-modal.open {
  display: flex;
}
.wf-h-fe-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 820px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
  animation: sbSlideUp .3s ease;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.wf-h-fe-modal-content * {
  color: #111827 !important;
}
.wf-h-fe-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.wf-h-fe-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wf-h-fe-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280 !important;
  transition: all .15s;
}
.wf-h-fe-modal-close:hover {
  background: #ef4444;
  color: #fff !important;
}
.wf-h-fe-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  align-items: center;
}
.wf-h-fe-modal-actions button {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wf-h-fe-save {
  background: #c9a84c;
  color: #fff !important;
}
.wf-h-fe-save:hover {
  background: #b8942e;
}
.wf-h-fe-cancel {
  background: #f3f4f6;
  color: #374151 !important;
}
.wf-h-fe-cancel:hover {
  background: #e5e7eb;
}
.wf-h-fe-msg {
  font-size: 12px;
  color: #6b7280 !important;
  margin-left: 8px;
}
.wf-h-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.wf-h-edit-btn:hover {
  border-color: #c9a84c;
  color: #c9a84c;
  background: #fffbeb;
}

/* ── Days table hover ─────────────────────────────────────────── */
.wf-h-days-table .wf-h-day-row:hover td {
  background: #fafaf9;
}
.wf-h-days-table .wf-h-day-row.is-today td {
  background: #fffbeb;
}

/* ── Exceptions closed toggle ─────────────────────────────────── */
.wf-h-exc-custom[style*="display:none"] {
  display: none !important;
}

/* ── Dynamic editor elements (inserted by JS) ────────────────── */

.wf-h-slot {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}
.wf-h-slot-open,
.wf-h-slot-close {
  width: 80px;
  padding: 2px 4px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
  color: #111827 !important;
  font-family: inherit;
}
.wf-h-slot-open:focus,
.wf-h-slot-close:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 2px rgba(201,168,76,.15);
}
.wf-h-slot-sep {
  font-size: 11px;
  color: #9ca3af !important;
  user-select: none;
}
.wf-h-remove-slot {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: #ef4444 !important;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  transition: background .15s;
}
.wf-h-remove-slot:hover {
  background: #fef2f2;
}
.wf-h-add-slot-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  border-style: dashed;
  padding: 4px 10px;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  background: transparent;
  color: #6b7280 !important;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  line-height: 1;
}
.wf-h-add-slot-btn:hover {
  border-color: #c9a84c;
  color: #c9a84c !important;
  background: #fffbeb;
}
.wf-h-day-closed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #9ca3af !important;
  cursor: pointer;
  user-select: none;
}
.wf-h-closed-check {
  accent-color: #c9a84c;
}

/* ── Copy day button ──────────────────────────────────────────── */
.wf-h-copy-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #6b7280 !important;
  padding: 0;
  transition: all .15s;
}
.wf-h-copy-day:hover {
  border-color: #c9a84c;
  color: #c9a84c !important;
  background: #fffbeb;
}

/* ── Import selector row ──────────────────────────────────────── */
.wf-h-import-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.wf-h-import-row select {
  max-width: 260px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  color: #111827 !important;
}

/* ── Card style overrides for today highlight ─────────────────── */
.wf-h-today {
  border-left: 3px solid #c9a84c;
}

/* ── Customizer Panel ─────────────────────────────────────────── */

.wf-h-customizer-wrap {
  margin-top: 8px;
}
.wf-h-customizer-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.wf-h-customizer-controls {
  flex: 0 0 360px;
  max-width: 360px;
}
.wf-h-customizer-preview {
  flex: 1;
  min-width: 280px;
}
.wf-h-customizer-preview .wf-h-cs-title {
  margin-bottom: 12px;
}
#wf-h-preview-card {
  position: sticky;
  top: 50px;
}
#wf-h-preview-card .wf-horario-card {
  margin: 0;
  max-width: 420px;
}

.wf-h-cs-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.wf-h-cs-title {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.wf-h-cs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}
.wf-h-cs-row label {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  flex-shrink: 0;
}
.wf-h-cs-input {
  width: 120px;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  font-size: 12px;
  background: #fff;
  color: #111827;
}
.wf-h-cs-input.wf-h-cs-small {
  width: 72px;
}
.wf-h-cs-color {
  width: 36px;
  height: 28px;
  padding: 1px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  background: none;
}
.wf-h-cs-color::-webkit-color-swatch-wrapper {
  padding: 0;
}
.wf-h-cs-color::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}
.wf-h-cs-checkbox {
  accent-color: #c9a84c;
}
.wf-h-cs-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wf-h-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.wf-h-preset-btn:hover {
  border-color: #c9a84c;
  color: #c9a84c;
  background: #fffbeb;
}
.wf-h-preset-btn.active {
  border-color: #c9a84c;
  background: #c9a84c;
  color: #fff;
}
.wf-h-cs-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.wf-h-cs-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

@media (max-width: 900px) {
  .wf-h-customizer-layout {
    flex-direction: column;
  }
  .wf-h-customizer-controls {
    flex: 1;
    max-width: 100%;
  }
  #wf-h-preview-card .wf-horario-card {
    max-width: 100%;
  }
}

/* ── Reactive card refresh animation ──────────────────────────── */
.wf-horario-card-wrap {
  transition: opacity .3s ease;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  #store-blocker-box { padding: 32px 20px; }
  .wf-horario-card { padding: 16px; }
}
