/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@keyframes task-slide-out-right {
  from  { transform: translateX(0); opacity: 1; background-color: white; }
  25%   { transform: translateX(0); opacity: 1; background-color: #bbf7d0; }
  70%   { transform: translateX(110%); opacity: 0; background-color: #bbf7d0; }
  to    { transform: translateX(110%); opacity: 0; background-color: #bbf7d0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
}
@keyframes task-slide-out-left {
  from { transform: translateX(0); opacity: 1; }
  70%  { transform: translateX(-110%); opacity: 0; }
  to   { transform: translateX(-110%); opacity: 0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
}
.task-exit-right {
  animation: task-slide-out-right 1s ease-in forwards;
  overflow: hidden;
  pointer-events: none;
}
.task-exit-left {
  animation: task-slide-out-left 1s ease-in forwards;
  overflow: hidden;
  pointer-events: none;
}
@keyframes float {
  0%, 100% { transform: translateY(0px);  box-shadow: 0 0 20px 6px rgba(79, 70, 229, 0.45); }
  50%       { transform: translateY(-6px); box-shadow: 0 0 36px 10px rgba(79, 70, 229, 0.25); }
}
.card-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes item-expand {
  0%   { max-height: 0;   opacity: 0; transform: translateY(var(--item-from-y, -20px)); }
  35%  { max-height: 80px; }
  100% { max-height: 80px; opacity: 1; transform: translateY(0); }
}
.item-expand {
  animation: item-expand 0.4s ease-out forwards;
  overflow: hidden;
}

@keyframes grocery-item-exit {
  0%   { opacity: 1; max-height: 80px; }
  55%  { opacity: 0; max-height: 80px; }
  100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; }
}
.grocery-item-exit {
  animation: grocery-item-exit 0.35s ease-in forwards;
  overflow: hidden;
  pointer-events: none;
}
.item-expand-delayed {
  animation: item-expand 0.4s ease-out 0.3s forwards;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.wishlist-prompt {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Safe area for home indicator (34px on iPhone) — prevents content sliding under it in PWA mode */
body {
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* iOS PWA: tighten vertical spacing to recover usable height vs Samsung */
html[data-platform="ios"] header {
  padding-top: 8px;
  padding-bottom: 8px;
}

html[data-platform="ios"] main {
  padding-top: 8px;
}

/* iOS PWA: inputs below 16px trigger Safari's auto-zoom on focus, which often
   doesn't reset after blur — especially in standalone PWA mode. Force 16px on
   iOS only so Android keeps the original text-sm (14px) design. */
html[data-platform="ios"] input,
html[data-platform="ios"] textarea,
html[data-platform="ios"] select {
  font-size: 16px !important;
}
