/* ===== ZIP PAGE ===== */
.zip-page {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 2;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.zip-page.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ZIP Status Bar */
.zip-page .status-bar .time { color: #000; }
.zip-page .cellular .bar { background: #000; }
.zip-page .battery-body { border: 1.5px solid #000; }
.zip-page .battery-body::after { background: #000; }
.zip-page .battery-fill { background: #000; }

/* ZIP Search Bar */
.zip-search-bar {
  position: relative;
  height: 60px;
  margin-top: -2px;
}
.zip-search-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 88%);
}
.zip-back-btn {
  position: absolute;
  right: 14px;
  top: 4px;
  width: 52px;
  height: 52px;
  cursor: pointer;
  z-index: 5;
}
.zip-back-btn img {
  width: 100%;
  height: 100%;
}

/* ZIP Suggestions */
.zip-suggestions {
  padding: 0 8px;
  overflow-y: auto;
  flex-shrink: 1;
  min-height: 0;
}
.zip-suggestion {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
  position: relative;
}
.zip-suggestion:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: rgba(0,0,0,0.06);
}
.zip-suggestion-icon {
  width: 24px;
  height: 37px;
  margin-right: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zip-suggestion-icon img {
  width: 24px;
  height: 37px;
}
.zip-suggestion-text {
  flex: 1;
  font-family: var(--font-ui-sans);
  font-size: 15px;
  font-weight: 500;
  color: rgba(0,0,0,0.86);
  letter-spacing: -0.016em;
  line-height: 1.333em;
}
.zip-suggestion-arrow {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  opacity: 0.4;
}
.zip-suggestion-arrow img {
  width: 100%;
  height: 100%;
}

/* ZIP Top Sites */
.zip-top-sites {
  padding: 4px 0 0 16px;
}
.zip-top-sites-row {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 16px;
  width: fit-content;
}
.zip-top-site {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 66px;
  height: 84px;
  position: relative;
}
.zip-top-site img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #F0F0F0;
  margin: 0 auto;
}
.zip-top-site span {
  font-family: var(--font-ui-sans);
  font-size: 12px;
  font-weight: 400;
  color: #242424;
  text-align: center;
  line-height: 1.333em;
  margin-top: 4px;
  width: 66px;
}

/* ZIP Spacer to push content above keyboard */
.zip-middle {
  flex: 1;
}

/* ZIP Composer */
.zip-composer {
  padding: 0 8px;
  margin-top: 4px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.zip-composer-outer {
  background: rgba(255,255,255,0.95);
  border: 1px solid #fff;
  border-radius: 32px;
  padding: 6px;
  box-shadow: 0 4px 24px rgba(224,224,224,0.65);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  position: relative;
  overflow: hidden;
}
.zip-composer-gradient {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
  opacity: 0.5;
  pointer-events: none;
}
.zip-composer-inner {
  background: rgba(255,255,255,0.85);
  border-radius: 26px;
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  position: relative;
  z-index: 1;
}
.zip-input-area {
  padding: 10px 8px;
}
.zip-input-text {
  padding: 4px 8px;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 28px;
  overflow: hidden;
  position: relative;
}
.zip-input-text span {
  font-size: 17px;
  font-weight: 400;
  color: rgba(0,0,0,0.45);
  letter-spacing: -0.025em;
  line-height: 1.294em;
  white-space: nowrap;
  flex-shrink: 0;
}
.zip-input-text.has-input span {
  visibility: hidden;
}
.zip-input-text.has-input .zip-input-cursor {
  display: none;
}
.zip-input-text.has-input .zip-hidden-input {
  padding-left: 34px;
  padding-right: 28px;
}
.zip-composer-outer.copilot-active .zip-input-text.has-input .zip-hidden-input {
  padding-left: 36px;
}
.zip-hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  color: transparent;
  letter-spacing: -0.025em;
  line-height: 1.294em;
  background: transparent;
  border: none;
  outline: none;
  padding: 4px 8px;
  caret-color: transparent;
}
.zip-hidden-input.active {
  color: rgba(0,0,0,0.86);
  caret-color: #007AFF;
}
.zip-hidden-input.active.no-caret {
  caret-color: transparent;
}
.zip-hidden-input::selection {
  background: rgba(0,120,215,0.2);
}
/* Clear button in input box */
.zip-input-clear {
  display: none;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
}
.zip-input-text.has-input .zip-input-clear {
  display: flex;
}
.zip-input-cursor {
  width: 2px;
  height: 20px;
  background: #007AFF;
  border-radius: 1px;
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.zip-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 8px 12px;
}
.zip-controls-left {
  display: flex;
  align-items: center;
  gap: 4px;
}
.zip-plus-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.zip-plus-btn svg {
  width: 20px;
  height: 20px;
}
.zip-copilot-icon {
  width: 18px;
  height: 18px;
  color: rgba(0,0,0,0.86);
}
.zip-ask-copilot {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 3px 12px;
  height: 36px;
}
.zip-ask-copilot span {
  font-family: var(--font-ui-sans);
  font-size: 13px;
  font-weight: 400;
  color: rgba(0,0,0,0.86);
  line-height: 18px;
  letter-spacing: -0.006em;
}
.zip-controls-right {
  display: flex;
  align-items: center;
}
.zip-ctrl-group {
  height: 36px;
  width: auto;
}

/* ZIP Keyboard */
.zip-keyboard {
  flex-shrink: 0;
}
.zip-keyboard img {
  width: 100%;
  height: auto;
  display: block;
}

/* === Ask Copilot Toggle ON state (warm Copilot yellow from Figma) === */
.zip-ask-copilot.toggle-on {
  background: #fef3ea;
  border-color: rgba(162,90,2,0.15);
}
.zip-ask-copilot.toggle-on span {
  color: #a25a02;
}
/* Recolor copilot icon to warm brown #A25A02 when toggle-on */
.zip-ask-copilot.toggle-on .zip-copilot-icon {
  color: #a25a02;
}

/* === Copilot-active composer visuals (flash glow) === */
.zip-composer-copilot-bg {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: rgba(254,243,234,0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
@keyframes copilotGlowFlash {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}
.zip-composer-outer.copilot-active .zip-composer-copilot-bg {
  animation: copilotGlowFlash 0.8s ease forwards;
}
.zip-composer-outer.copilot-active {
  border-color: rgba(162,90,2,0.15);
  transition: border-color 0.3s ease;
}

/* === Input icon: hidden at zero input, search when typing, copilot when chat intent === */
.zip-input-icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.zip-input-text.has-input .zip-input-icon {
  display: flex;
}
.zip-input-icon .zip-input-search-icon {
  display: block;
  width: 20px;
  height: 20px;
}
.zip-input-icon #zipInputCopilotIcon {
  display: none;
  width: 22px;
  height: 22px;
}
.zip-composer-outer.copilot-active .zip-input-icon .zip-input-search-icon {
  display: none;
}
.zip-composer-outer.copilot-active .zip-input-icon #zipInputCopilotIcon {
  display: block;
}
.zip-composer-outer.copilot-active .zip-input-icon {
  width: 22px;
  height: 22px;
}

/* === Site nav active: show globe icon instead of search icon === */
.zip-input-icon #zipInputGlobeIcon {
  display: none;
  width: 20px;
  height: 20px;
}
.zip-composer-outer.sitenav-active .zip-input-icon .zip-input-search-icon {
  display: none;
}
.zip-composer-outer.sitenav-active .zip-input-icon #zipInputGlobeIcon {
  display: block;
}

/* === + Button Menu === */
.zip-plus-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 8px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  padding: 6px 0;
  min-width: 220px;
  z-index: 10;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.zip-plus-menu.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.zip-plus-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 400;
  color: #242424;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.zip-plus-menu-item:active {
  background: rgba(0,0,0,0.04);
}
.zip-plus-menu-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.zip-plus-menu-divider {
  height: 0.5px;
  background: #e0e0e0;
  margin: 4px 16px;
}

/* === Opt-out Toast === */
.uc-opt-out-toast {
  position: absolute;
  bottom: 80px;
  left: 16px;
  right: 16px;
  background: #323232;
  border-radius: 12px;
  padding: 12px 16px;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 30;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.uc-opt-out-toast.visible {
  display: flex;
}
.uc-opt-out-toast-text {
  flex: 1;
  font-size: 13px;
  color: #fff;
  line-height: 1.3;
}
.uc-opt-out-toast .toast-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  border-radius: 8px;
}
.uc-opt-out-toast .toast-btn-turnoff {
  color: #fff;
  background: rgba(255,255,255,0.15);
}
.uc-opt-out-toast .toast-btn-settings {
  color: #A388EE;
}

/* === Copilot Suggestion Row === */
.zip-suggestion.copilot-suggestion {
  background: transparent;
}
.zip-suggestion.copilot-suggestion .zip-suggestion-icon svg {
  width: 20px;
  height: 20px;
}
.zip-suggestion.copilot-suggestion .zip-suggestion-subtitle {
  font-size: 12px;
  color: rgba(0,0,0,0.45);
  margin-top: 1px;
}

/* === Site Navigation Suggestion Row === */
.zip-suggestion.site-nav-suggestion .zip-suggestion-icon svg {
  width: 24px;
  height: 24px;
}
.zip-suggestion.site-nav-suggestion .zip-suggestion-text {
  font-weight: 500;
}
.zip-suggestion.site-nav-suggestion .zip-suggestion-subtitle {
  font-size: 12px;
  color: rgba(36,36,36,0.56);
  margin-top: 1px;
}

/* ZIP Home Indicator */
.zip-page .home-indicator-bar { background: #1a1a1a; }

/* Hidden input for keyboard capture */

