/* Asterisco rojo para campos obligatorios */
.required-asterisk {
  color: #e53935;
  font-weight: bold;
  margin-left: 2px;
}

/* Borde rojo en campos requeridos vacíos */

:root {
  --brand-yellow: #ffd100;
  --brand-dark: #1f2937;
  --white: #ffffff;
  --border-color: #e5e7eb;
  --brand-green: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Image upload styles */
.image-upload-box {
  display: block;
  width: 100%;
  padding: 1rem;
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.image-upload-box:hover {
  border-color: var(--brand-yellow);
  background-color: rgba(255, 209, 0, 0.05);
}

.preview-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.25rem;
  margin: 0 auto;
}

.image-placeholder {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

/* Schedule styles */
.sync-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--brand-dark);
  transition: all 0.2s ease;
}

.sync-button:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.sync-button svg {
  color: var(--brand-dark);
}

.schedule-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem;
}

.schedule-row {
  display: grid;
  grid-template-columns: 100px 100px 30px 100px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.schedule-row span {
  color: var(--brand-dark);
  font-weight: 500;
}

.schedule-row input[type="time"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.schedule-row {
  display: grid;
  grid-template-columns: 100px 100px 30px 100px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.schedule-row input[type="time"] {
  width: 100px;
  padding: 4px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.schedule-row span {
  text-align: center;
}

.schedule-container {
  display: flex;
  flex-direction: column;
  width: 100%;

  gap: 0.75rem;
  margin-top: 0.5rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  background-color: var(--white);
  padding: 0.75rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.schedule-row span {
  min-width: 85px;
  font-size: 0.95rem;
  color: var(--brand-dark);
}

.schedule-row input[type="time"] {
  width: 105px;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  font-family: inherit;
  background-color: var(--white);
}

/* Switch Toggle styles */
.switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.switch-text {
  font-size: 0.9rem;
  color: var(--brand-dark);
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.switch input:checked+.slider {
  background-color: var(--brand-green);
}

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

.switch input:focus+.slider {
  box-shadow: 0 0 1px var(--brand-yellow);
}

body {
  font-family: "Nunito", sans-serif;
  background-color: var(--brand-yellow);
  color: var(--brand-dark);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
}

.auth-screen {
  display: none;
}

.auth-screen.active {
  display: block;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 2.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--brand-dark);
  margin-bottom: 2rem;
}

.auth-button {
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.google-button {
  background-color: var(--white);
  color: var(--brand-dark);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.google-button:hover {
  background-color: #f3f4f6;
}

.dark-button {
  background-color: var(--brand-dark);
  color: var(--white);
  border: none;
}

.dark-button:hover {
  background-color: #374151;
}

.dark-button:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

.primary-button {
  background-color: var(--brand-yellow);
  color: var(--brand-dark);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.primary-button:hover {
  background-color: #e6bc00;
}

.auth-separator {
  margin: 1.5rem 0;
  font-weight: 700;
}

.back-button {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.form-group {
  text-align: left;
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
}

.image-upload-box {
  border: 2px dashed #9ca3af;
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.image-upload-box .icon {
  width: 40px;
  height: 40px;
  background-color: var(--white);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.toast-title {
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.toast-subtitle {
  font-size: 1rem;
  margin-bottom: 2rem;
}

.error-message {
  color: #dc2626;
  font-weight: 700;
  margin-top: 1rem;
}

/* Borde rojo solo si el usuario intenta registrar y falta completar */
.field-error {
  border-color: #e53935 !important;
  box-shadow: 0 0 0 1px #e5393533;
}

/* Mensaje de error debajo de cada campo obligatorio */
.field-error-message {
  color: #e53935;
  font-size: 0.95em;
  margin-top: 2px;
  display: block;
}

/* Estilos para el modal de cropper */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--brand-yellow);
  color: var(--brand-dark);
  padding: 2rem;
  border-radius: 1.5rem;
  width: 90%;
  max-width: 450px;
  position: relative;
  text-align: center;
}

/* Estilos específicos para el modal de recorte de imagen */
#cropperModal {
  z-index: 2000 !important;
  display: none;
}

#cropperModal.show {
  display: flex !important;
}

#cropperModal .modal-content {
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  text-align: center;
}

#cropperModal .modal-content h2 {
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-align: center;
}

#cropperModal .modal-content > div:last-child {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

#cropperModal .modal-content button {
  min-width: 100px;
}

#cropperModal .modal-content .primary-button {
  background-color: var(--white);
  color: var(--brand-dark);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

#cropperModal .modal-content .primary-button:hover {
  background-color: #f3f4f6;
}

#cropperModal .modal-content .primary-button.dark-button {
  background-color: var(--brand-dark);
  color: var(--white);
}

#cropperModal .modal-content .primary-button.dark-button:hover {
  background-color: #374151;
}

#cropper-container {
  max-height: 400px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#cropper-image {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  #cropperModal .modal-content {
    max-width: 95vw;
    max-height: 85vh;
    padding: 1rem;
  }
  
  #cropper-container {
    max-height: 300px;
  }
  
  #cropperModal .modal-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  #cropperModal .modal-content > div:last-child {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  #cropperModal .modal-content button {
    width: 100%;
    min-width: auto;
  }
}

/* Ajustes para el cropper en dispositivos pequeños */
@media (max-width: 480px) {
  #cropper-container {
    max-height: 250px;
  }
  
  #cropperModal .modal-content {
    padding: 0.75rem;
  }
}

/* Borde rojo solo si el usuario intenta registrar y falta completar */
    .field-error {
      border-color: #e53935 !important;
      box-shadow: 0 0 0 1px #e5393533;
    }

    /* Mensaje de error debajo de cada campo obligatorio */
    .field-error-message {
      color: #e53935;
      font-size: 0.95em;
      margin-top: 2px;
      display: block;
    }

    /* Estilos mejorados para el registro de restaurante */
    .restaurant-header {
      position: relative;
      padding: 1rem 0 2rem 0;
      margin-bottom: 1.5rem;
    }

    .restaurant-home-link {
      position: absolute;
      top: 0;
      left: 0;
      font-size: 1.2rem;
      font-weight: 700;
      text-decoration: none;
      color: var(--brand-dark);
      transition: color 0.3s ease;
    }

    .restaurant-home-link:hover {
      color: #374151;
    }

    .restaurant-title {
      font-size: 1.8rem;
      font-weight: 800;
      color: var(--brand-dark);
      margin: 0;
      text-align: center;
      line-height: 1.2;
    }

    /* Responsive improvements */
    @media (max-width: 480px) {
      .auth-container {
        padding: 1rem;
      }
      
      .restaurant-header {
        padding: 0.5rem 0 1.5rem 0;
      }
      
      .restaurant-home-link {
        font-size: 1rem;
      }
      
      .restaurant-title {
        font-size: 1.5rem;
        margin-top: 0.5rem;
      }
      
      .schedule-container {
        max-width: 100%;
      }
      
      .schedule-row {
        padding: 0.5rem;
        gap: 0.5rem;
      }
      
      .schedule-row span {
        min-width: 70px;
        font-size: 0.85rem;
      }
      
      .schedule-row input[type="time"] {
        width: 90px;
        padding: 0.4rem;
      }
    }


    /* Ajuste personalizado para el formulario de registro de restaurante */
.restaurant-header {
  padding-bottom: 0.5rem; 
}

.restaurant-title {
  margin-bottom: 0.5rem; 
}

#register-image-upload-box {
  margin-top: 0; 
}

#new-restaurant-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem; 
}

.restaurant-header {
  padding-bottom: 0.25rem; 
  margin-bottom: 0.5rem; 
}

.restaurant-title {
  margin-bottom: 0.25rem; 
  margin-top: 30px;
}

#register-image-upload-box {
  margin-top: 0; 
}

/* Nuevos estilos para iconos junto a Almuerzos Perú */
.restaurant-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--brand-dark);
}

.icon-arrow {
  font-size: 1.4rem; 
}

.icon-food {
  font-size: 1.2rem; 
}
