@import url("variables.css");

.ultra-scheduler-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: stretch;
  background: rgba(17, 34, 64, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(100, 255, 218, 0.1);
  backdrop-filter: blur(10px);
}

.scheduler-pane {
  position: relative;
}

.scheduler-pane .schedule-wrapper {
  min-height: 460px;
  border: 1px solid rgba(100, 255, 218, 0.18);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  background: radial-gradient(circle at 20% 20%, rgba(100, 255, 218, 0.08), transparent 45%),
              radial-gradient(circle at 80% 10%, rgba(0, 180, 216, 0.08), transparent 40%),
              rgba(2, 12, 27, 0.8);
}

.scheduler-pane .microcopy {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fira Code', monospace;
}

.scheduler-pane .microcopy i {
  color: var(--accent-primary);
}

.scheduler-flow-pane {
  position: relative;
}

.ultra-scheduler-flow {
  height: 100%;
  border-radius: 18px;
  padding: 1.5rem;
  background: linear-gradient(145deg, rgba(10, 25, 47, 0.9), rgba(2, 12, 27, 0.95));
  border: 1px solid rgba(100, 255, 218, 0.18);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ultra-flow-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ultra-flow-head .mono-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(100, 255, 218, 0.08);
  color: var(--accent-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ultra-flow-head h3 {
  color: #fff;
  margin: 0;
  font-size: 1.45rem;
}

.ultra-flow-head p {
  color: var(--text-muted);
  margin: 0;
}

.flow-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.progress-dot {
  padding: 0.75rem;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(100, 255, 218, 0.18);
  color: #e6f1ff;
  background: rgba(255, 255, 255, 0.02);
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.progress-dot.active {
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.18), rgba(0, 180, 216, 0.22));
  border-color: rgba(100, 255, 218, 0.5);
  box-shadow: 0 10px 30px rgba(0, 180, 216, 0.25);
}

.flow-panels {
  position: relative;
  min-height: 300px;
}

.flow-step {
  display: none;
  flex-direction: column;
  gap: 0.35rem; /* Reduced gap */
  animation: fadeSlide 0.4s ease;
}

.flow-step.active {
  display: flex;
}

.flow-step.success-step {
  align-items: flex-start;
  text-align: left;
  gap: 0.8rem;
}

.flow-step label {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.flow-input,
.flow-textarea,
.flow-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(100, 255, 218, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(10, 25, 47, 0.92)),
    linear-gradient(45deg, transparent 50%, rgba(100, 255, 218, 0.4) 50%),
    linear-gradient(135deg, transparent 50%, rgba(100, 255, 218, 0.4) 50%);
  background-position: right 1.05rem center, right 0.9rem center, right 0.6rem center;
  background-size: 12px 12px, 10px 10px, 10px 10px;
  background-repeat: no-repeat;
  color: #e6f1ff;
  background-color: #0b162b;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.flow-select option {
  background: #0b162b;
  color: #e6f1ff !important;
  padding: 0.5rem 0.75rem;
}

.flow-select option:checked,
.flow-select option:hover {
  background: rgba(100, 255, 218, 0.18);
}

.flow-select:focus,
.flow-select:active {
  color: #e6f1ff;
  border-color: rgba(100, 255, 218, 0.6);
  box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.15);
}

.flow-select::-ms-expand {
  display: none;
}

.flow-input:focus,
.flow-textarea:focus,
.flow-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.flow-textarea {
  min-height: 110px;
  resize: vertical;
}

.reason-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  position: relative;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.25), transparent);
}

.mini-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1rem;
  background: rgba(100, 255, 218, 0.05);
  border: 1px dashed rgba(100, 255, 218, 0.3);
  border-radius: 12px;
  color: #e6f1ff;
  font-family: 'Fira Code', monospace;
}

.slot-pill {
  background: rgba(100, 255, 218, 0.18);
  color: #020c1b;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.flow-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-ghost,
.btn-next,
.btn-primary {
  border: 1px solid rgba(100, 255, 218, 0.4);
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: transparent;
  color: #e6f1ff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-ghost {
  border-style: dashed;
  color: var(--text-muted);
}

.btn-next {
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.7), rgba(100, 255, 218, 0.7));
  color: #020c1b;
  box-shadow: 0 15px 35px rgba(0, 180, 216, 0.35);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.9), rgba(0, 180, 216, 0.9));
  color: #020c1b;
  box-shadow: 0 18px 38px rgba(0, 180, 216, 0.35);
}

.btn-ghost:hover,
.btn-next:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 180, 216, 0.28);
}

.btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.summary-card {
  border: 1px solid rgba(100, 255, 218, 0.25);
  border-radius: 12px;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 0.65rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  color: #e6f1ff;
  font-size: 0.95rem;
}

.summary-row span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.summary-row strong {
  color: #e6f1ff;
  text-align: right;
  line-height: 1.35;
  font-weight: 700;
  max-width: 70%;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.08);
  color: #ff6b6b;
  font-weight: 600;
}

.success-block {
  text-align: center;
  padding: 2rem 1rem;
  display: none;
}

.success-block.active {
  display: block;
}

.success-hero {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.success-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 55%), linear-gradient(145deg, rgba(100, 255, 218, 0.95), rgba(0, 180, 216, 0.9));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #020c1b;
  font-size: 1.45rem;
  box-shadow: 0 14px 36px rgba(0, 180, 216, 0.35), 0 0 0 6px rgba(100, 255, 218, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.success-step h4 {
  margin: 0 0 0.15rem 0;
  color: #fff;
}

.success-lede {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.success-card {
  margin-top: 0.3rem;
}

.loading-line {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(100, 255, 218, 0.15), rgba(0, 180, 216, 0.55), rgba(100, 255, 218, 0.15));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .ultra-scheduler-shell {
    grid-template-columns: 1fr;
  }
  .scheduler-pane .microcopy {
    margin-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .flow-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .btn-ghost,
  .btn-next,
  .btn-primary {
    flex: 1 1 100%;
  }
}
