/**
 * Menyu CRM - Frontend Styles
 * Design minimalista, elegante e moderno - Mobile-first
 */

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */

.menyu-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 99999;
  pointer-events: none;
}

.menyu-scroll-progress-bar {
  height: 100%;
  background: var(--menyu-primary);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* ============================================
   VARIABLES & RESET
   ============================================ */

:root {
  --menyu-primary: #e5850e;
  --menyu-primary-dark: #b86a0b;
  --menyu-primary-light: #fff4e6;
  --menyu-success: #00a32a;
  --menyu-success-bg: #e8f5e9;
  --menyu-error: #d63638;
  --menyu-error-bg: #ffeaea;
  --menyu-text: #23282d;
  --menyu-text-light: #666;
  --menyu-border: #ddd;
  --menyu-border-light: #f0f0f0;
  --menyu-bg: #ffffff;
  --menyu-bg-light: #f9f9f9;
  --menyu-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --menyu-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
  --menyu-radius: 8px;
  --menyu-radius-small: 4px;
  --menyu-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"],
body.dark-mode {
  --menyu-primary: #ff9a2e;
  --menyu-primary-dark: #e5850e;
  --menyu-primary-light: #3d2a0f;
  --menyu-success: #4caf50;
  --menyu-success-bg: #1b3d1f;
  --menyu-error: #f44336;
  --menyu-error-bg: #3d1f1f;
  --menyu-text: #e0e0e0;
  --menyu-text-light: #b0b0b0;
  --menyu-border: #404040;
  --menyu-border-light: #2a2a2a;
  --menyu-bg: #1a1a1a;
  --menyu-bg-light: #242424;
  --menyu-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --menyu-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Aplicar dark mode ao body e elementos principais */
[data-theme="dark"],
body.dark-mode {
  background-color: #121212;
  color: var(--menyu-text);
}

[data-theme="dark"] .menyu-frontend-wrapper,
body.dark-mode .menyu-frontend-wrapper {
  background-color: transparent;
  color: var(--menyu-text);
}

/* Garantir que todos os elementos usem as variáveis do dark mode */
[data-theme="dark"] *,
body.dark-mode * {
  border-color: var(--menyu-border);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: var(--menyu-bg);
  color: var(--menyu-text);
  border-color: var(--menyu-border);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus,
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
  background-color: var(--menyu-bg);
  color: var(--menyu-text);
}

.menyu-frontend-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  position: relative;
}

.menyu-back-link {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--menyu-text-light);
  text-decoration: none;
  border-radius: 50%;
  transition: var(--menyu-transition);
  z-index: 10;
  opacity: 0.7;
}

.menyu-back-link:hover {
  opacity: 1;
  color: var(--menyu-primary);
  background-color: var(--menyu-bg-light);
  transform: translateX(-2px);
}

.menyu-back-link svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 480px) {
  .menyu-back-link {
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
  }
  
  .menyu-back-link svg {
    width: 18px;
    height: 18px;
  }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.menyu-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--menyu-text);
  margin: 0 0 30px 0;
  text-align: center;
  letter-spacing: -0.5px;
}

@media (min-width: 768px) {
  .menyu-title {
    font-size: 32px;
    margin-bottom: 40px;
  }
}

/* ============================================
   MESSAGES
   ============================================ */

.menyu-message {
  padding: 16px 20px;
  border-radius: var(--menyu-radius);
  margin-bottom: 24px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menyu-success {
  background: var(--menyu-success-bg);
  border-left: 4px solid var(--menyu-success);
  color: #155724;
}

.menyu-success h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menyu-success-icon {
  width: 32px;
  height: 32px;
  background: var(--menyu-success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.menyu-error {
  background: var(--menyu-error-bg);
  border-left: 4px solid var(--menyu-error);
  color: #721c24;
}

.menyu-error ul {
  margin: 0;
  padding-left: 20px;
}

.menyu-error li {
  margin: 4px 0;
}

.menyu-logged-in {
  text-align: center;
  padding: 30px;
}

/* ============================================
   FORMS - BASE
   ============================================ */

.menyu-registo-form,
.menyu-login-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--menyu-bg);
  border-radius: var(--menyu-radius);
  padding: 32px 24px;
  box-shadow: var(--menyu-shadow);
  border: 1px solid var(--menyu-border-light);
}

.menyu-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--menyu-border-light);
}

.menyu-section:last-of-type {
  border-bottom: none;
  margin-bottom: 24px;
}

.menyu-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--menyu-text);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--menyu-primary-light);
}

@media (min-width: 768px) {
  .menyu-registo-form,
  .menyu-login-container {
    padding: 40px;
  }
}

.menyu-form-field {
  margin-bottom: 24px;
}

.menyu-form-field label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: var(--menyu-text);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.menyu-form-field input[type="text"],
.menyu-form-field input[type="tel"],
.menyu-form-field input[type="email"],
.menyu-form-field input[type="password"],
.menyu-form-field input[type="datetime-local"],
.menyu-form-field input[type="url"],
.menyu-form-field select,
.menyu-form-field textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px; /* Previne zoom no iOS */
  font-family: inherit;
  border: 2px solid var(--menyu-border);
  border-radius: var(--menyu-radius-small);
  background: var(--menyu-bg);
  color: var(--menyu-text);
  box-sizing: border-box;
  transition: var(--menyu-transition);
  -webkit-appearance: none;
  appearance: none;
}

.menyu-form-field input:focus,
.menyu-form-field select:focus,
.menyu-form-field textarea:focus {
  outline: none;
  border-color: var(--menyu-primary);
  box-shadow: 0 0 0 3px var(--menyu-primary-light);
}

.menyu-form-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

[data-theme="dark"] .menyu-form-field select,
body.dark-mode .menyu-form-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23b0b0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.menyu-form-field textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.menyu-char-count {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--menyu-text-light);
  text-align: right;
}

.menyu-field-help {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--menyu-text-light);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.menyu-switch-field {
  margin-bottom: 20px;
}

.menyu-frontend-wrapper .menyu-switch-field {
  margin-bottom: 20px;
}

.menyu-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 16px;
  background: var(--menyu-bg-light);
  border-radius: var(--menyu-radius-small);
  border: 2px solid var(--menyu-border);
  transition: var(--menyu-transition);
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.menyu-switch:hover {
  border-color: var(--menyu-primary);
  background: var(--menyu-primary-light);
}

/* Ocultar checkbox completamente - garantir que não aparece como input text */
.menyu-switch input[type="checkbox"] {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  pointer-events: auto !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.menyu-switch-slider {
  position: relative;
  width: 48px;
  min-width: 48px;
  height: 26px;
  background: #ddd;
  border-radius: 26px;
  transition: var(--menyu-transition);
  flex-shrink: 0;
  display: block;
  cursor: pointer;
}

.menyu-switch-slider:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--menyu-transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.menyu-switch input:checked + .menyu-switch-slider {
  background: var(--menyu-primary);
}

.menyu-switch input:checked + .menyu-switch-slider:before {
  transform: translateX(22px);
}

.menyu-switch-label {
  font-weight: 500;
  color: var(--menyu-text);
  user-select: none;
  flex: 1;
  margin: 0;
  cursor: pointer;
  line-height: 1.5;
  display: block;
}

/* Garantir que não aparecem inputs de texto nos switch fields */
.menyu-switch-field input[type="text"],
.menyu-switch-field input[type="tel"],
.menyu-switch-field input[type="email"] {
  display: none !important;
}

/* ============================================
   CHECKBOX
   ============================================ */

.menyu-checkbox label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: normal;
  margin: 0;
}

.menyu-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--menyu-primary);
}

/* ============================================
   BUTTONS
   ============================================ */

.menyu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--menyu-radius-small);
  cursor: pointer;
  transition: var(--menyu-transition);
  text-decoration: none;
  box-shadow: var(--menyu-shadow);
  min-height: 48px; /* Touch-friendly */
  line-height: 1.5;
}

.menyu-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--menyu-shadow-hover);
}

.menyu-btn:active {
  transform: translateY(0);
}

.menyu-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.menyu-btn-primary {
  background: var(--menyu-primary);
  color: white;
}

.menyu-btn-primary:hover {
  background: var(--menyu-primary-dark);
}

.menyu-btn-secondary {
  background: white;
  color: var(--menyu-primary);
  border: 2px solid var(--menyu-primary);
}

.menyu-btn-secondary:hover {
  background: var(--menyu-primary-light);
}

.menyu-btn-danger {
  background: var(--menyu-error);
  color: white;
}

.menyu-btn-danger:hover {
  background: #b52d20;
  color: white;
}

[data-theme="dark"] .menyu-btn-danger,
body.dark-mode .menyu-btn-danger {
  background: #f44336;
}

[data-theme="dark"] .menyu-btn-danger:hover,
body.dark-mode .menyu-btn-danger:hover {
  background: #d32f2f;
}

.menyu-btn-large {
  padding: 16px 32px;
  font-size: 18px;
  min-height: 56px;
}

.menyu-btn-block {
  width: 100%;
  display: flex;
}

.menyu-venda-fields {
  margin-top: 15px;
  padding: 15px;
  background: var(--menyu-bg-light);
  border-radius: var(--menyu-radius-small);
  border: 1px solid var(--menyu-border);
}

.menyu-btn-submit {
  margin-top: 8px;
}

.menyu-btn-loading {
  display: none;
}

.menyu-btn-loading.active {
  display: inline-block;
}

.menyu-btn-text.hidden {
  display: none;
}

/* ============================================
   ACTIONS (Frontend)
   ============================================ */

.menyu-actions-frontend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.menyu-actions-frontend .menyu-btn {
  flex: 1;
  min-width: 120px;
}

/* ============================================
   TABS (Login/Register)
   ============================================ */

.menyu-tabs {
  display: flex;
  border-bottom: 2px solid var(--menyu-border-light);
  margin-bottom: 30px;
  gap: 0;
}

.menyu-tab {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--menyu-text-light);
  cursor: pointer;
  transition: var(--menyu-transition);
  font-family: inherit;
  margin: 0;
}

.menyu-tab:hover {
  color: var(--menyu-primary);
  background: var(--menyu-bg-light);
}

.menyu-tab-active {
  color: var(--menyu-primary);
  border-bottom-color: var(--menyu-primary);
}

.menyu-tab-content {
  display: none;
}

.menyu-tab-content.menyu-tab-active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   LOADING STATE
   ============================================ */

.menyu-form-loading {
  opacity: 0.6;
  pointer-events: none;
}

.menyu-form-loading .menyu-btn {
  position: relative;
}

.menyu-form-loading .menyu-btn:after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
  .menyu-frontend-wrapper {
    padding: 12px;
  }

  .menyu-registo-form,
  .menyu-login-container {
    padding: 24px 20px;
    border-radius: var(--menyu-radius-small);
  }

  .menyu-title {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .menyu-section:first-of-type .menyu-section-title {
    padding-top: 16px;
  }

  .menyu-form-field {
    margin-bottom: 20px;
  }

  .menyu-btn-large {
    padding: 14px 24px;
    font-size: 16px;
  }
}

/* ============================================
   LISTA DE RESTAURANTES
   ============================================ */

.menyu-lista-container {
  max-width: 1000px;
  margin: 0 auto;
}

.menyu-filters-frontend {
  background: var(--menyu-bg);
  border-radius: var(--menyu-radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--menyu-shadow);
  border: 1px solid var(--menyu-border-light);
  display: none; /* Oculto por padrão */
  position: fixed;
  bottom: 90px;
  left: 20px;
  right: 20px;
  z-index: 9998;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.menyu-filters-frontend.active {
  display: block;
}

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

.menyu-filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .menyu-filter-row {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .menyu-filters-frontend {
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: calc(100% - 40px);
  }
  
  .menyu-filters-frontend.active {
    transform: translateX(-50%) translateY(0);
  }
}

.menyu-filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.menyu-filter-actions .menyu-btn {
  flex: 1;
  min-width: 100px;
  padding: 6px 16px;
  font-size: 13px;
  min-height: 32px;
  font-weight: 500;
}

.menyu-filter-form-field {
  margin-bottom: 12px;
}

.menyu-filter-form-field label {
  display: block;
  font-weight: 500;
  font-size: 13px;
  color: var(--menyu-text);
  margin-bottom: 6px;
}

.menyu-filter-form-field select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 2px solid var(--menyu-border);
  border-radius: var(--menyu-radius-small);
  background: var(--menyu-bg);
  color: var(--menyu-text);
  box-sizing: border-box;
  transition: var(--menyu-transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

[data-theme="dark"] .menyu-filter-form-field select,
body.dark-mode .menyu-filter-form-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23b0b0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.menyu-filter-form-field select:focus {
  outline: none;
  border-color: var(--menyu-primary);
  box-shadow: 0 0 0 3px var(--menyu-primary-light);
}

/* Botão flutuante para adicionar registo */
.menyu-add-registo-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  background: var(--menyu-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(229, 133, 14, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--menyu-transition);
  text-decoration: none;
}

.menyu-add-registo-btn:hover {
  background: var(--menyu-primary-dark);
  box-shadow: 0 6px 16px rgba(229, 133, 14, 0.5);
  transform: scale(1.05);
  color: white;
}

.menyu-add-registo-btn:active {
  transform: scale(0.95);
}

.menyu-add-registo-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* Botão flutuante de filtro */
.menyu-filter-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: var(--menyu-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(229, 133, 14, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--menyu-transition);
  font-size: 24px;
  line-height: 1;
}

.menyu-filter-toggle-btn:hover {
  background: var(--menyu-primary-dark);
  box-shadow: 0 6px 16px rgba(229, 133, 14, 0.5);
  transform: scale(1.05);
}

.menyu-filter-toggle-btn:active {
  transform: scale(0.95);
}

.menyu-filter-toggle-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Overlay para fechar filtros ao clicar fora */
.menyu-filter-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9997;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.menyu-filter-overlay.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@media (min-width: 768px) {
  .menyu-filter-overlay {
    background: rgba(0, 0, 0, 0.2);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.menyu-lista-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menyu-lista-item {
  background: var(--menyu-bg);
  border-radius: var(--menyu-radius);
  padding: 20px;
  box-shadow: var(--menyu-shadow);
  border: 1px solid var(--menyu-border-light);
  transition: var(--menyu-transition);
}

.menyu-lista-item:hover {
  box-shadow: var(--menyu-shadow-hover);
  transform: translateY(-2px);
}

.menyu-lista-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--menyu-border-light);
  flex-wrap: wrap;
  gap: 12px;
}

.menyu-lista-item-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--menyu-text);
  margin: 0;
  flex: 1;
}

.menyu-lista-item-estado {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--menyu-radius-small);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--menyu-primary-light);
  color: var(--menyu-primary-dark);
}

.menyu-lista-item-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menyu-lista-item-detail {
  font-size: 14px;
  color: var(--menyu-text);
  line-height: 1.6;
}

.menyu-lista-item-detail strong {
  color: var(--menyu-text);
  font-weight: 600;
  margin-right: 8px;
}

.menyu-lista-item-link {
  color: var(--menyu-primary);
  text-decoration: none;
  margin-left: 12px;
  font-weight: 500;
  transition: var(--menyu-transition);
}

.menyu-lista-item-link:hover {
  color: var(--menyu-primary-dark);
  text-decoration: underline;
}

.menyu-lista-item-link.menyu-whatsapp {
  color: #25d366;
}

.menyu-lista-item-link.menyu-whatsapp:hover {
  color: #128c7e;
}

@media (max-width: 480px) {
  .menyu-lista-item {
    padding: 16px;
  }

  .menyu-lista-item-title {
    font-size: 18px;
  }

  .menyu-filters-frontend {
    padding: 16px;
    left: 12px;
    right: 12px;
    bottom: 80px;
  }
  
  .menyu-add-registo-btn {
    bottom: 16px;
    left: 16px;
    width: 52px;
    height: 52px;
  }
  
  .menyu-add-registo-btn svg {
    width: 22px;
    height: 22px;
  }
  
  .menyu-filter-toggle-btn {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
  
  .menyu-filter-toggle-btn svg {
    width: 22px;
    height: 22px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.menyu-form-field input:focus,
.menyu-form-field select:focus,
.menyu-form-field textarea:focus,
.menyu-btn:focus,
.menyu-switch:focus-within {
  outline: 3px solid var(--menyu-primary);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */

.menyu-dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: var(--menyu-bg);
  border: 2px solid var(--menyu-border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  box-shadow: var(--menyu-shadow);
  transition: var(--menyu-transition);
  color: var(--menyu-text);
}

.menyu-dark-mode-toggle:hover {
  background: var(--menyu-bg-light);
  border-color: var(--menyu-primary);
  transform: scale(1.05);
  box-shadow: var(--menyu-shadow-hover);
}

.menyu-dark-mode-toggle:active {
  transform: scale(0.95);
}

.menyu-dark-mode-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: var(--menyu-transition);
}

.menyu-dark-mode-toggle .menyu-icon-sun {
  display: block;
}

.menyu-dark-mode-toggle .menyu-icon-moon {
  display: none;
}

[data-theme="dark"] .menyu-dark-mode-toggle .menyu-icon-sun,
body.dark-mode .menyu-dark-mode-toggle .menyu-icon-sun {
  display: none;
}

[data-theme="dark"] .menyu-dark-mode-toggle .menyu-icon-moon,
body.dark-mode .menyu-dark-mode-toggle .menyu-icon-moon {
  display: block;
}

@media (max-width: 480px) {
  .menyu-dark-mode-toggle {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
  
  .menyu-dark-mode-toggle svg {
    width: 18px;
    height: 18px;
  }
  
  /* Ajustar posição do botão de filtro quando dark mode toggle está visível */
  .menyu-filter-toggle-btn {
    bottom: 80px;
  }
}

@media (min-width: 481px) {
  .menyu-filter-toggle-btn {
    bottom: 20px;
  }
}

/* ============================================
   DARK MODE SPECIFIC ADJUSTMENTS
   ============================================ */

[data-theme="dark"] .menyu-lista-item-link.menyu-whatsapp,
body.dark-mode .menyu-lista-item-link.menyu-whatsapp {
  color: #4ade80;
}

[data-theme="dark"] .menyu-lista-item-link.menyu-whatsapp:hover,
body.dark-mode .menyu-lista-item-link.menyu-whatsapp:hover {
  color: #22c55e;
}

[data-theme="dark"] .menyu-filter-overlay,
body.dark-mode .menyu-filter-overlay {
  background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .menyu-scroll-progress,
body.dark-mode .menyu-scroll-progress {
  background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   MODAL DE EDIÇÃO
   ============================================ */

.menyu-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.menyu-modal-content {
  background: var(--menyu-bg);
  border-radius: var(--menyu-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.3s ease-out;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.menyu-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--menyu-border-light);
  flex-shrink: 0;
}

.menyu-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--menyu-text);
}

.menyu-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--menyu-text-light);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--menyu-transition);
  line-height: 1;
}

.menyu-modal-close:hover {
  background: var(--menyu-bg-light);
  color: var(--menyu-text);
}

.menyu-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.menyu-modal-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--menyu-border-light);
}

.menyu-modal-section:last-of-type {
  border-bottom: none;
  margin-bottom: 24px;
}

.menyu-modal-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--menyu-border-light);
  flex-shrink: 0;
}

.menyu-modal-actions .menyu-btn {
  min-width: 120px;
}

.menyu-btn-small {
  padding: 10px 16px;
  font-size: 14px;
  min-height: 40px;
  min-width: auto;
}


@media (max-width: 768px) {
  .menyu-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  
  .menyu-modal-content {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--menyu-radius) var(--menyu-radius) 0 0;
  }
  
  .menyu-modal-header {
    padding: 16px 20px;
  }
  
  .menyu-modal-header h2 {
    font-size: 20px;
  }
  
  .menyu-modal-body {
    padding: 20px;
  }
  
  .menyu-modal-actions {
    flex-direction: column;
  }
  
  .menyu-modal-actions .menyu-btn {
    width: 100%;
  }
}

[data-theme="dark"] .menyu-modal-overlay,
body.dark-mode .menyu-modal-overlay {
  background: rgba(0, 0, 0, 0.8);
}

/* Hover effect para itens clicáveis */
.menyu-lista-item {
  transition: var(--menyu-transition);
}

.menyu-lista-item:hover {
  background: var(--menyu-bg-light);
  transform: translateY(-2px);
  box-shadow: var(--menyu-shadow-hover);
}
