/* Basic, clean modal styling */
.mizu-gp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.mizu-gp-modal {
  background: #fff;
  max-width: 560px;
  width: calc(100% - 32px);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  padding: 20px 20px 12px;
  position: relative;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.mizu-gp-body { 
  color: #111; 
  font-size: 15px; 
  line-height: 1.6; 
}

.mizu-gp-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.mizu-gp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.mizu-gp-reset-timer {
  font-size: 13px;
  text-decoration: underline;
  color: #555;
}

/* Manual trigger button — [mizu_popup_button]
   Customize by overriding these variables in your theme's CSS: */
.mizu-gp-trigger {
  --mizu-gp-btn-bg: transparent;
  --mizu-gp-btn-bg-hover: #f5f5f5;
  --mizu-gp-btn-color: #333;
  --mizu-gp-btn-border: #cfcfcf;
  --mizu-gp-btn-size: 40px; /* match this to your theme's other icon buttons (e.g. cart) */

  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  vertical-align: middle;
  gap: 6px;
  margin: 0;
  width: var(--mizu-gp-btn-size);
  height: var(--mizu-gp-btn-size);
  padding: 0;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid var(--mizu-gp-btn-border);
  background: var(--mizu-gp-btn-bg);
  color: var(--mizu-gp-btn-color);
  font-family: system-ui, -apple-system, "SF Pro Text", Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

/* If you add text (icon+label), let the button grow instead of staying a fixed square */
.mizu-gp-trigger:has(.mizu-gp-trigger-text) {
  width: auto;
  padding: 0 12px;
}

.mizu-gp-trigger:hover {
  background: var(--mizu-gp-btn-bg-hover);
  border-color: #b5b5b5;
}

/* Undo WordPress auto-wrapping <p> margins around the shortcode so it doesn't
   push the button taller than the surrounding nav row */
p:has(> .mizu-gp-trigger:only-child) {
  margin: 0;
  display: inline-flex;
  vertical-align: middle;
}

.mizu-gp-trigger:active {
  background: var(--mizu-gp-btn-bg-hover);
}

.mizu-gp-trigger:focus-visible {
  outline: 2px solid #ccc;
  outline-offset: 2px;
}

.mizu-gp-trigger-icon {
  display: inline-flex;
  color: currentColor;
}

.mizu-gp-trigger-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
}

.mizu-gp-trigger-text {
  white-space: nowrap;
}

/* Filled variant: style="filled" — plain dark instead of blue, override
   --mizu-gp-btn-bg/--mizu-gp-btn-color on .mizu-gp-trigger-filled to match your brand */
.mizu-gp-trigger.mizu-gp-trigger-filled {
  --mizu-gp-btn-bg: #222;
  --mizu-gp-btn-bg-hover: #333;
  --mizu-gp-btn-color: #fff;
  --mizu-gp-btn-border: transparent;
}

/* Native variant: style="native" — wipes our own box styling (size/border/bg)
   so it inherits appearance entirely from your theme's own classes, passed via
   extra_class="..." (e.g. the same classes your cart/account icons use). Use
   this when you want a guaranteed pixel-match with existing header icons. */
.mizu-gp-trigger.mizu-gp-trigger-native {
  all: unset;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  box-sizing: border-box;
}

@media (prefers-reduced-motion:no-preference) {
  .mizu-gp-modal {
    transition: transform .2s ease, opacity .2s ease;
    transform: translateY(8px);
    opacity: 0;
  }
  .mizu-gp-overlay.mizu-gp-show .mizu-gp-modal {
    transform: translateY(0);
    opacity: 1;
  }
}
