/* v2 main CSS: import all modular styles here */
@import url('./css/normalize.css');
@import url('./css/components.css');
@import url('./css/tallycounter.css');
/* @import url('./css/faq.css'); */
/* @import url('./css/tooltip.css'); */

/* Fix welcome splash modal visibility issue */
#menu-welcome-splash,
#menu-welcome-splash * {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  z-index: -1 !important;
}

/* Mobile Modal Improvements */
@media (max-width: 768px) {
  .menu-box-modal-full {
    /* Ensure full-screen modals take full height on mobile */
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden;
  }
  
  .menu-box-modal-full .page-content {
    /* Better scroll handling for modal content */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: calc(100vh - 60px); /* Account for header */
  }
  
  .menu-box-modal-full .input-style input,
  .menu-box-modal-full .input-style textarea,
  .menu-box-modal-full .input-style select {
    /* Prevent zoom on iOS - use 16px minimum */
    font-size: 16px !important;
    border-radius: 8px;
    padding: 12px 16px;
    -webkit-appearance: none;
    appearance: none;
  }
  
  .menu-box-modal-full .input-style textarea {
    /* Better textarea handling */
    resize: vertical;
    min-height: 80px;
    font-size: 16px !important;
  }
  
  /* Ensure fixed elements work properly on mobile */
  .menu-box-modal-full .header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }
  
  .menu-box-modal-full > div[style*="position:fixed"] {
    /* Fixed bottom buttons */
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

/* Disable zoom and pinch globally */
html {
  touch-action: manipulation;
}

body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Prevent zoom on all input types */
input, textarea, select {
  font-size: 16px !important;
  -webkit-appearance: none;
  appearance: none;
}

/* Fix for iOS specifically */
input[type="text"], 
input[type="email"], 
input[type="tel"], 
input[type="number"], 
input[type="date"], 
input[type="time"], 
textarea, 
select {
  font-size: 16px !important;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.tally-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}
.tally-btn {
  font-size: 2.5rem;
  padding: 0.5em 1.2em;
  border: none;
  background: #f0f0f0;
  border-radius: 0.5em;
  cursor: pointer;
  transition: background 0.2s;
}
.tally-btn:active {
  background: #e0e0e0;
}
.tally-value {
  font-size: 3rem;
  min-width: 2.5em;
  text-align: center;
  font-family: 'Oswald', 'Ubuntu', Arial, sans-serif;
}
.tally-style-toggle {
  margin-bottom: 1.5rem;
  text-align: center;
}
.tally-style-toggle label {
  font-size: 1rem;
  font-weight: 500;
}
.tally-style-toggle select {
  font-size: 1rem;
  margin-left: 0.5em;
}
#waitlist-container {
  margin: 2rem auto;
  max-width: 500px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.5rem;
}
#waitlist-container h2 {
  margin-top: 0;
}
#add-party-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
#add-party-form input {
  flex: 1 1 120px;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#add-party-form button {
  background: #2d8cff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 1rem;
  cursor: pointer;
}
.waitlist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.waitlist-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}
.waitlist-list li:last-child {
  border-bottom: none;
}
.waitlist-list .status {
  font-size: 0.9em;
  color: #888;
}
.waitlist-list .time {
  font-size: 0.85em;
  color: #bbb;
}
.waitlist-list .remove-btn {
  margin-left: auto;
  background: #ff4d4d;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s;
}
.waitlist-list .remove-btn:hover {
  background: #d93636;
}

/* Enhanced Waitlist Action Sheet Styling */
.waitlist-party-info {
  background: rgba(var(--bg-color), 0.03);
  border: 1px solid rgba(var(--border-color), 0.1);
  border-radius: 12px;
  padding: 16px;
}

.waitlist-party-info .badge {
  font-size: 0.7em;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.actions-btn {
  background: transparent;
  border: none;
  color: #666;
  font-size: 1.2em;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  margin-left: auto;
  transition: all 0.2s ease;
}

.actions-btn:hover {
  background: rgba(0,0,0,0.05);
  color: #333;
}

.actions-btn:active {
  background: rgba(0,0,0,0.1);
  transform: scale(0.95);
}

.waitlist-party {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
  transition: background 0.2s ease;
}

.waitlist-party:hover {
  background: rgba(0,0,0,0.02);
}

.waitlist-party:focus {
  outline: 2px solid var(--highlight);
  outline-offset: -2px;
  background: rgba(var(--highlight-rgb), 0.05);
}

/* Snackbar styling for notifications */
.snackbar {
  position: fixed;
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 10000;
  transform: translateY(-100px);
  transition: all 0.3s ease;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
}

.snackbar-top {
  top: 20px;
}

.snackbar-success {
  background: #28a745;
}

.snackbar-show {
  transform: translateX(-50%) translateY(0);
}

/* Button State Improvements */
.btn-state-valid {
  background-color: #28a745 !important;
  color: white !important;
  font-weight: bold !important;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
  transition: all 0.3s ease !important;
}

.btn-state-invalid {
  background-color: #6c757d !important;
  color: white !important;
  font-weight: normal !important;
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transition: all 0.3s ease !important;
}

/* Simple header icon styling */
#close-add-entry {
  background-color: #dc3545 !important;
  color: white !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

#close-add-entry i {
  color: white !important;
  font-size: 18px !important;
}

#submit-entry-header {
  background-color: #28a745 !important;
  color: white !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

#submit-entry-header i {
  color: white !important;
  font-size: 18px !important;
}

#save-settings-btn-header {
  background-color: #28a745 !important;
  color: white !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

#save-settings-btn-header i {
  color: white !important;
  font-size: 18px !important;
}

/* Ensure header icons are always visible */
.header-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.header-icon i {
  display: inline-block !important;
  visibility: visible !important;
  font-size: 18px !important;
}

/* Form validation feedback */
.input-style.has-borders.valid input,
.input-style.has-borders.valid textarea,
.input-style.has-borders.valid select {
  border-color: #28a745 !important;
}

.input-style.has-borders.invalid input,
.input-style.has-borders.invalid textarea,
.input-style.has-borders.invalid select {
  border-color: #dc3545 !important;
}

/* Better mobile form handling */
@media (max-width: 768px) {
  .menu-box-modal-full .btn {
    font-size: 16px !important; /* Prevent iOS zoom */
    padding: 12px 20px !important;
  }
  
  .menu-box-modal-full .header-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 18px !important;
  }
}

/* Fix textarea font size consistency */
#setting-added-message, 
#setting-ready-message {
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-family: inherit !important;
}

/* Fix business type select overflow */
#business-type-select {
  font-size: 14px !important;
  padding: 12px 16px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* Ensure labels and text are consistent */
.input-style label {
  font-size: 12px !important;
  font-weight: 600 !important;
}

.input-style small {
  font-size: 11px !important;
}

/* Ensure header icons are always visible */
.header-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.header-icon i {
  display: inline-block !important;
  visibility: visible !important;
  font-size: 18px !important;
}

/* Ensure FontAwesome icons are never hidden */
.fa, .fas, .far, .fal, .fab {
  display: inline-block !important;
  visibility: visible !important;
}

/* Debug: Add a border to see if buttons are there */
.header-icon-1, .header-icon-2 {
  min-width: 44px !important;
  min-height: 44px !important;
}

/* Fix header button positioning */
.header-fixed .header-icon {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.header-fixed .header-icon-1 {
  left: 15px !important;
}

.header-fixed .header-icon-2 {
  right: 15px !important;
}

/* Better business type select styling */
.input-style select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
}

/* Modal overlay fixes */
.menu.menu-active {
  z-index: 9999 !important;
}

/* Prevent multiple overlays */
.menu:not(.menu-active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Settings modal specific fixes */
#menu-settings {
  background: #fff !important;
  z-index: 10000 !important;
}

#menu-settings.menu-active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Fix for darkout overlay issues */
body.menu-active {
  overflow: hidden;
}

/* Prevent settings modal from showing content on main page */
#menu-settings:not(.menu-active) {
  transform: translateY(-100vh) !important;
  position: fixed !important;
  top: -100vh !important;
}