/* =============================================================
   Dawa Smart – License / Demo styling
   ============================================================= */

/* ---- DEMO badge in the header ---- */
#headerDemoBadge {
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

#headerDemoBadge .demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.demo-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
}

.demo-badge.demo-warning {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  border-color: rgba(220, 38, 38, 0.4);
}

.demo-badge.demo-expired {
  background: rgba(220, 38, 38, 0.2);
  color: #fecaca;
  border-color: rgba(220, 38, 38, 0.5);
  animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---- Dashboard demo banner ---- */
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 10px 16px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
  animation: bannerGlow 2s ease-in-out infinite alternate;
}

.demo-banner.warning {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

@keyframes bannerGlow {
  0% { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2); }
  100% { box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35); }
}

.demo-banner.d-none {
  display: none !important;
}

.demo-banner .dismiss-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s;
  flex-shrink: 0;
}

.demo-banner .dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

/* ---- Trial warning toast (persistent, dismissible) ---- */
.trial-warning-toast {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.trial-warning-toast .dismiss {
  background: none;
  border: none;
  color: #92400e;
  cursor: pointer;
  font-size: 14px;
  margin-left: auto;
  opacity: 0.6;
  transition: 0.2s;
}

.trial-warning-toast .dismiss:hover {
  opacity: 1;
}

/* ---- Full-screen expiry / lock screen ---- */
#licenseExpiryScreen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0b6e4f, #064e3b);
  color: #fff;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#licenseExpiryScreen.show {
  display: flex;
}

.license-expiry-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.license-expiry-card .expiry-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.9;
}

.license-expiry-card h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.license-expiry-card .expiry-message {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
}

.license-expiry-card .expiry-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 24px;
}

.license-expiry-card .expiry-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.license-expiry-card .btn-expiry {
  background: #f59e0b;
  color: #1e293b;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.license-expiry-card .btn-expiry:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.license-expiry-card .btn-expiry.exit-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.license-expiry-card .btn-expiry.exit-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.license-expiry-card .expiry-footer {
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---- Developer license testing panel ---- */
#licenseDevPanel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  z-index: 2500;
  font-family: 'Courier New', monospace;
  display: none;
}

#licenseDevPanel.show {
  display: block;
}

#licenseDevPanel .dev-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
}

#licenseDevPanel .dev-panel-header .close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
}

#licenseDevPanel .dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

#licenseDevPanel button {
  background: #0b6e4f;
  color: #fff;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
}

#licenseDevPanel button:hover {
  background: #08543b;
}

#licenseDevPanel button.danger {
  background: #dc2626;
}

#licenseDevPanel button.danger:hover {
  background: #b91c1c;
}

#licenseDevPanel pre {
  background: #0f172a;
  border-radius: 8px;
  padding: 8px;
  font-size: 10px;
  overflow: auto;
  max-height: 160px;
  margin-bottom: 8px;
}

#licenseDevPanel .dev-actions {
  display: flex;
  gap: 6px;
}

/* ---- Reset Demo Data button ---- */
#resetDemoBtn {
  background: #7c3aed;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#resetDemoBtn:hover {
  background: #6d28d9;
  transform: translateY(-1px);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .license-expiry-card {
    padding: 24px;
  }
  .license-expiry-card h1 {
    font-size: 22px;
  }
  .license-expiry-card .expiry-actions {
    flex-direction: column;
  }
}
