/* ============================================================
   D.S AIRLINES — Dynamic Island Notification Styles
   Mimics iPhone 14 Pro Dynamic Island with spring animations
   ============================================================ */

/* ── Base Island ── */
.dynamic-island {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  font-family: 'Inter', -apple-system, sans-serif;
  --di-accent: #c9a84c;
  pointer-events: none;
}
.dynamic-island.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.8);
  transition: all 0.4s ease;
}

/* ── Compact State ── */
.dynamic-island.compact {
  width: 200px;
  height: 36px;
  background: #1a1a1a;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.08);
  animation: diCompactEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  pointer-events: all;
  cursor: pointer;
}
.dynamic-island.compact .di-expanded { display: none; }
.dynamic-island.compact .di-compact { display: flex; }

@keyframes diCompactEnter {
  0% { width: 120px; height: 28px; opacity: 0; transform: translateX(-50%) scale(0.8); }
  60% { width: 220px; }
  100% { width: 200px; opacity: 1; transform: translateX(-50%) scale(1); }
}

.di-compact {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  width: 100%;
}
.di-compact-dot {
  width: 6px; height: 6px;
  background: var(--di-accent);
  border-radius: 50%;
  animation: diDotPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes diDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--di-accent); }
  50% { opacity: 0.5; box-shadow: 0 0 8px var(--di-accent); }
}
.di-compact-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Expanded State ── */
.dynamic-island.expanded {
  width: min(380px, 92vw);
  min-height: 120px;
  background: #1a1a1a;
  border-radius: 28px;
  padding: 16px 18px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 60px rgba(var(--di-accent-rgb, 201, 168, 76), 0.08);
  animation: diExpandEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: all;
}
.dynamic-island.expanded .di-expanded { display: block; }
.dynamic-island.expanded .di-compact { display: none; }

@keyframes diExpandEnter {
  0% { width: 200px; min-height: 36px; border-radius: 24px; opacity: 0.8; padding: 0; }
  40% { width: min(400px, 95vw); }
  100% { width: min(380px, 92vw); min-height: 120px; border-radius: 28px; opacity: 1; }
}

/* ── Expanded Content ── */
.di-expanded-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.di-icon {
  font-size: 1.2rem;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
}
.di-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--di-accent);
}
.di-dismiss {
  margin-left: auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.di-dismiss:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.di-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}
.di-body {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 10px;
}
.di-actions {
  display: flex;
  gap: 8px;
}
.di-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--di-accent);
  border-radius: 10px;
  color: var(--di-accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.di-action-btn:hover {
  background: rgba(201, 168, 76, 0.1);
}

/* ── Safe Area ── */
@supports (padding-top: env(safe-area-inset-top)) {
  .dynamic-island {
    top: calc(env(safe-area-inset-top) + 80px);
  }
}

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
  .dynamic-island.expanded {
    width: calc(100vw - 16px);
    left: 8px;
    transform: none;
    border-radius: 24px;
  }
  .dynamic-island.compact {
    width: 180px;
  }
  @keyframes diExpandEnter {
    0% { width: 180px; min-height: 36px; }
    100% { width: calc(100vw - 16px); min-height: 110px; }
  }
}

/* ── Admin Push Notification Form ── */
.admin-push-panel {
  background: rgba(15, 20, 40, 0.6);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.admin-push-panel h3 {
  color: #c9a84c;
  font-family: 'Playfair Display', serif;
  margin-bottom: 16px;
  font-size: 1.1rem;
}
.admin-push-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-push-form label {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: -8px;
}
.admin-push-form input,
.admin-push-form textarea,
.admin-push-form select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
}
.admin-push-form input:focus,
.admin-push-form textarea:focus,
.admin-push-form select:focus {
  border-color: rgba(201,168,76,0.5);
}
.admin-push-form textarea {
  min-height: 80px;
  resize: vertical;
}
.admin-push-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-push-send-btn {
  background: linear-gradient(135deg, #c9a84c, #e8d48b);
  color: #0a0e1e;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 4px;
}
.admin-push-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.3);
}
.admin-push-preview-btn {
  background: transparent;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 12px;
  padding: 12px 20px;
  color: #c9a84c;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}
.admin-push-preview-btn:hover {
  background: rgba(201,168,76,0.08);
}
