/* ============================================================
   ORINS — ACTIVE ORDER WIDGET (Floating "Kembali ke Pesanan")
   ============================================================ */

.aow-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  font-family: var(--font-body, "Inter", sans-serif);
  animation: aow-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: 340px;
  width: calc(100% - 48px);
}

.aow-widget.aow-hidden {
  display: none !important;
}

.aow-widget.aow-minimized {
  max-width: 64px;
  width: 64px;
}

@keyframes aow-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Card */
.aow-card {
  background: linear-gradient(135deg, #4e2172 0%, #7a2e9e 50%, #ff2e93 100%);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow:
    0 8px 24px rgba(78, 33, 114, 0.35),
    0 2px 8px rgba(255, 46, 147, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.aow-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 77, 0.4), transparent 70%);
  pointer-events: none;
}

/* Icon */
.aow-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  animation: aow-pulse 2.4s ease-in-out infinite;
}

@keyframes aow-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.aow-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  stroke-width: 2.2;
  fill: none;
}

.aow-icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ffc94d;
  color: #33124d;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #7a2e9e;
  line-height: 1;
}

/* Content */
.aow-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.aow-title {
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1.2;
  margin-bottom: 2px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aow-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aow-meta b {
  color: #ffc94d;
  font-weight: 700;
}

/* Button */
.aow-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: #4e2172;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.75rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  line-height: 1;
}

.aow-btn:hover {
  background: #ffc94d;
  color: #33124d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 201, 77, 0.5);
}

.aow-btn:active {
  transform: translateY(0) scale(0.97);
}

.aow-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Close button */
.aow-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  z-index: 2;
  padding: 0;
}

.aow-close:hover {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.aow-close svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* Minimized state — hanya icon */
.aow-widget.aow-minimized .aow-card {
  padding: 10px;
  justify-content: center;
  cursor: pointer;
}

.aow-widget.aow-minimized .aow-body,
.aow-widget.aow-minimized .aow-btn,
.aow-widget.aow-minimized .aow-close {
  display: none;
}

.aow-widget.aow-minimized .aow-icon {
  width: 44px;
  height: 44px;
  animation: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .aow-widget {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }

  .aow-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .aow-icon {
    width: 40px;
    height: 40px;
  }

  .aow-title {
    font-size: 0.8rem;
  }

  .aow-meta {
    font-size: 0.65rem;
  }

  .aow-btn {
    padding: 7px 11px;
    font-size: 0.7rem;
  }

  .aow-widget.aow-minimized {
    left: auto;
    width: 64px;
  }
}
