/* CSS styles for AVFS modal styling */
.workshop-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Force overlay display to flex when active class is set */
.workshop-loader-overlay.is-active {
  display: flex !important;
}

/* Overriding and extending layout styles for AVFS loader card */
.workshop-loader-card.avfs-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  width: min(480px, 92vw);
  box-shadow: 0 24px 70px rgba(4, 20, 36, 0.32);
  font-family: 'Lato', Helvetica, Arial, Lucida, sans-serif;
  box-sizing: border-box;
}

.avfs-title {
  margin-top: 0;
  font-size: 20px;
  color: #005495;
  text-align: left;
}

.avfs-text {
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
  margin: 12px 0;
}

.avfs-ref-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 12px 0;
}

#avfs-ref-code {
  font-size: 18px;
  font-weight: bold;
  color: #0f172a;
  letter-spacing: 1px;
  font-family: monospace;
}

#avfs-btn-copy {
  font-size: 11px;
  padding: 6px 12px;
  background: #e2e8f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 16px;
  transition: background 0.2s ease;
}

#avfs-btn-copy:hover {
  background: #cbd5e1;
}

.avfs-portal-link-container {
  margin: 16px 0 8px 0;
  width: 100%;
  text-align: center;
}

.avfs-portal-link {
  display: inline-block;
  font-size: 14px;
  color: #2563eb;
  text-decoration: underline;
  font-weight: 500;
}

#avfs-error-msg {
  display: none;
  color: #b45309;
  font-size: 13px;
  line-height: 1.4;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 10px;
  border-radius: 6px;
  margin: 12px 0;
  width: 100%;
  box-sizing: border-box;
}

#avfs-status-msg {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px;
  border-radius: 6px;
  margin: 12px 0;
  width: 100%;
  box-sizing: border-box;
}

#avfs-status-msg.is-pending {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

#avfs-status-msg.is-success {
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
}

#avfs-status-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#avfs-status-text span:first-child {
  font-weight: 700;
}

.avfs-status-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.avfs-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.avfs-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  animation: avfsDotPulse 1.2s ease-in-out infinite;
}

.avfs-dots span:nth-child(2) { animation-delay: 0.2s; }
.avfs-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes avfsDotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1.15); }
}

.avfs-status-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  opacity: 0.75;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .avfs-dots span { animation: none; opacity: 0.7; }
}

.avfs-action-container {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  width: 100%;
}

#avfs-btn-cancel {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  flex: 1;
  height: 42px;
  font-family: 'Lato', Helvetica, Arial, Lucida, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

#avfs-btn-cancel:hover {
  background: #cbd5e1;
}

#avfs-btn-verify {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  background: #005495;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  flex: 2;
  height: 42px;
  font-family: 'Lato', Helvetica, Arial, Lucida, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

#avfs-btn-verify:hover {
  background: #004475;
}

#avfs-btn-verify:disabled,
#avfs-btn-cancel:disabled {
  background: #cbd5e1 !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  opacity: 0.8 !important;
}
