/**
 * October Diagnostic Popup Modal Styles
 * Zeneesha Workday Services
 */

/* ── Overlay & Container ────────────────────────────────────────── */
.zen-diag-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
  box-sizing: border-box;
}

.zen-diag-modal.is-active {
  opacity: 1;
  visibility: visible;
}

body.zen-diag-modal-open {
  overflow: hidden !important;
}

.zen-diag-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 41, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: default;
}

.zen-diag-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  max-height: 94vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: center;
}

/* Custom scrollbar for popup */
.zen-diag-container::-webkit-scrollbar {
  width: 6px;
}
.zen-diag-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

/* ── Card ───────────────────────────────────────────────────────── */
.zen-diag-card {
  position: relative;
  width: 100%;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 30px 90px -15px rgba(10, 25, 50, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 42px 42px 38px;
  box-sizing: border-box;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.zen-diag-modal.is-active .zen-diag-card {
  transform: scale(1) translateY(0);
}

/* ── Close Button ───────────────────────────────────────────────── */
.zen-diag-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(241, 245, 249, 0.85);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  z-index: 10;
  padding: 0;
}

.zen-diag-close:hover {
  background: #e2e8f0;
  color: #ff5500;
  transform: rotate(90deg);
}

/* ── Layout Grid ────────────────────────────────────────────────── */
.zen-diag-layout {
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.zen-diag-col-content {
  flex: 1 1 54%;
  max-width: 54%;
  display: flex;
  flex-direction: column;
}

.zen-diag-col-visual {
  flex: 1 1 46%;
  max-width: 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 400px;
}

/* ── Complimentary Pill ─────────────────────────────────────────── */
.zen-diag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: #FFF1EA;
  color: #FF5500;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 85, 0, 0.12);
}

.zen-diag-pill-icon {
  color: #FF5500;
  flex-shrink: 0;
}

/* ── Heading ────────────────────────────────────────────────────── */
.zen-diag-heading {
  font-size: clamp(23px, 2.7vw, 31px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.zen-diag-heading--dark {
  color: #0b1a30;
}

.zen-diag-heading--orange {
  color: #FF5500;
}

/* ── Paragraphs ─────────────────────────────────────────────────── */
.zen-diag-lead {
  font-size: 14.5px;
  line-height: 1.5;
  color: #334155;
  margin: 0 0 8px;
}

.zen-diag-highlight {
  color: #FF5500;
  font-weight: 700;
}

.zen-diag-sublead {
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
  margin: 0 0 18px;
}

/* ── Form Fields ────────────────────────────────────────────────── */
.zen-diag-form {
  display: flex;
  flex-direction: column;
}

.zen-diag-field {
  margin-bottom: 12px;
}

.zen-diag-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 5px;
}

.zen-diag-req {
  color: #dc2626;
  font-weight: 800;
}

.zen-diag-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.zen-diag-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s;
}

.zen-diag-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14.5px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.zen-diag-input::placeholder {
  color: #94a3b8;
  font-size: 14px;
}

.zen-diag-input:focus {
  border-color: #FF5500;
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.14);
}

.zen-diag-input:focus + .zen-diag-input-icon,
.zen-diag-input-wrapper:focus-within .zen-diag-input-icon {
  color: #FF5500;
}

/* ── Submit Button ──────────────────────────────────────────────── */
.zen-diag-btn {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #FF5500 0%, #EA4300 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 20px -3px rgba(255, 85, 0, 0.38);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  font-family: inherit;
}

.zen-diag-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -4px rgba(255, 85, 0, 0.45);
  background: linear-gradient(135deg, #ff661a 0%, #f04803 100%);
}

.zen-diag-btn:active:not(:disabled) {
  transform: translateY(0);
}

.zen-diag-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.zen-diag-btn-arrow {
  transition: transform 0.2s;
}

.zen-diag-btn:hover:not(:disabled) .zen-diag-btn-arrow {
  transform: translateX(3px);
}

/* ── Scarcity Indicator ─────────────────────────────────────────── */
.zen-diag-scarcity {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dc2626;
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 2px;
}

.zen-diag-scarcity strong {
  font-weight: 800;
}

.zen-diag-scarcity-icon {
  color: #dc2626;
  flex-shrink: 0;
}

/* ── Feedback Messages ──────────────────────────────────────────── */
.zen-diag-message {
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.zen-diag-message.is-success {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.zen-diag-message.is-error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.zen-diag-message.is-loading {
  display: block;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ── Right Stage Visual ─────────────────────────────────────────── */
.zen-diag-stage {
  position: relative;
  width: 100%;
  max-width: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 10px;
}

/* Soft circular ambient glow behind sheet */
.zen-diag-ambient-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(219, 234, 254, 0.8) 0%, rgba(239, 246, 255, 0.4) 55%, transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Report Preview Graphic Image */
.zen-diag-report-img {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 330px;
  height: auto;
  display: block;
  border-radius: 14px;
  filter: drop-shadow(0 16px 36px rgba(15, 23, 42, 0.16));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.zen-diag-stage:hover .zen-diag-report-img {
  transform: translateY(-4px) scale(1.015);
  filter: drop-shadow(0 22px 45px rgba(15, 23, 42, 0.22));
}

/* Spark rays */
.zen-diag-sparks {
  position: absolute;
  top: -4px;
  left: 20px;
  width: 44px;
  height: 32px;
  z-index: 4;
}

.zen-diag-spark {
  position: absolute;
  background: #FF5500;
  border-radius: 2px;
}

.zen-diag-spark--1 {
  width: 3px;
  height: 14px;
  left: 8px;
  top: 10px;
  transform: rotate(-35deg);
}

.zen-diag-spark--2 {
  width: 3px;
  height: 16px;
  left: 20px;
  top: 2px;
  transform: rotate(0deg);
}

.zen-diag-spark--3 {
  width: 3px;
  height: 14px;
  left: 32px;
  top: 8px;
  transform: rotate(35deg);
}

/* Floating Purple Compensation Badge */
.zen-diag-badge-comp {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 8;
  background: linear-gradient(135deg, #5338ec 0%, #3e26b8 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 12px 28px -4px rgba(83, 56, 236, 0.45);
  transform: rotate(2deg);
  transition: transform 0.2s ease;
}

.zen-diag-badge-comp:hover {
  transform: rotate(0deg) scale(1.04);
}

.zen-diag-badge-comp-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.zen-diag-badge-comp-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

/* Layered sheets */
.zen-diag-sheet-shadow {
  position: absolute;
  width: 290px;
  height: 330px;
  background: #f1f5f9;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  transform: rotate(3deg) translateY(6px);
  z-index: 1;
}

.zen-diag-sheet-card {
  position: relative;
  z-index: 2;
  width: 290px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.16);
  padding: 18px 18px 20px;
  box-sizing: border-box;
  transform: rotate(-2.5deg);
  transition: transform 0.25s ease;
}

.zen-diag-stage:hover .zen-diag-sheet-card {
  transform: rotate(-1deg);
}

/* Sheet Header */
.zen-diag-sheet-head {
  margin-bottom: 14px;
}

.zen-diag-workday-brand {
  margin-bottom: 8px;
}

.zen-diag-sheet-heading {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.zen-diag-sheet-subheading {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

/* Diagnostic items checklist */
.zen-diag-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zen-diag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 7px 9px;
}

.zen-diag-row-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.zen-diag-row-icon--red {
  background: #fee2e2;
  color: #ef4444;
}

.zen-diag-row-icon--amber {
  background: #fef3c7;
  color: #f59e0b;
}

.zen-diag-row-icon--purple {
  background: #ede9fe;
  color: #8b5cf6;
}

.zen-diag-row-icon--teal {
  background: #d1fae5;
  color: #10b981;
}

.zen-diag-row-content {
  flex: 1;
  min-width: 0;
}

.zen-diag-row-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bars */
.zen-diag-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
}

.zen-diag-bar--red {
  background: #fee2e2;
}
.zen-diag-bar--red .zen-diag-bar-fill {
  background: #f87171;
  height: 100%;
  border-radius: 999px;
}

.zen-diag-bar--amber {
  background: #fef3c7;
}
.zen-diag-bar--amber .zen-diag-bar-fill {
  background: #fbbf24;
  height: 100%;
  border-radius: 999px;
}

.zen-diag-bar--purple {
  background: #ede9fe;
}
.zen-diag-bar--purple .zen-diag-bar-fill {
  background: #a78bfa;
  height: 100%;
  border-radius: 999px;
}

.zen-diag-bar--teal {
  background: #d1fae5;
}
.zen-diag-bar--teal .zen-diag-bar-fill {
  background: #34d399;
  height: 100%;
  border-radius: 999px;
}

/* Ghost skeleton placeholder bars on right */
.zen-diag-row-ghosts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
  flex-shrink: 0;
}

.zen-diag-ghost {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
}

.zen-diag-ghost--lg {
  width: 26px;
}

.zen-diag-ghost--sm {
  width: 16px;
}

/* ── Responsive Queries ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .zen-diag-card {
    padding: 36px 24px 28px;
    border-radius: 20px;
  }

  .zen-diag-layout {
    flex-direction: column;
    gap: 24px;
  }

  .zen-diag-col-content {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .zen-diag-col-visual {
    flex: 1 1 100%;
    max-width: 100%;
    min-height: auto;
    padding-top: 10px;
  }

  .zen-diag-stage {
    max-width: 290px;
    margin: 0 auto;
  }

  .zen-diag-report-img {
    max-width: 260px;
  }

  .zen-diag-sheet-card,
  .zen-diag-sheet-shadow {
    width: 270px;
  }
}

@media (max-width: 480px) {
  .zen-diag-modal {
    padding: 10px;
  }

  .zen-diag-card {
    padding: 28px 18px 22px;
    border-radius: 16px;
  }

  .zen-diag-heading {
    font-size: 20px;
  }

  .zen-diag-lead {
    font-size: 13.5px;
  }

  .zen-diag-col-visual {
    display: none; /* Hide visual on small mobile screens to keep form front and center */
  }
}
