:root {
  --a2cai-stepper-line-thickness: 4px;
  --a2cai-stepper-line-top-distance: calc(
    11px + 2px - var(--a2cai-stepper-line-thickness)
  );
}

html {
  background: #ffffff;
}

p {
  margin: 0;
}

#wpwrap {
  background-color: white !important;
}

#a2cai-main-container {
  display: none;
}

.show {
  display: block !important;
}

/* Onbooarding Styles */
#a2cai-welcome-screen {
  height: 100%;
  margin-top: 22vh;
}

.a2cai-font {
  font-family: "Bricolage Grotesque", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.a2cai-center-horizontally {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.a2cai-center-flex {
  display: flex;
  justify-content: center;
  align-items: center;
}

#a2cai-brand-container {
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: normal;
}

#a2cai-main-container {
  padding: 24px;
}

#a2cai-stepper-container {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  gap: 8px;
  width: 300px;
  height: 6px;
}

.a2cai-step {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background-color: #d9d9d9;
}

.a2cai-wizard-step {
  margin-top: 96px;
  display: none;
}

.show {
  display: block;
}

.a2cai-step.active {
  background-color: #259912;
}

.a2cai-step-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #1e293b;
  text-align: center;
  line-height: normal;
}

.a2cai-step-subtitle {
  font-size: 20px;
  font-weight: normal;
  color: #334155;
  text-align: center;
  max-width: 400px;
  margin-bottom: 60px;
  line-height: normal;
}

.a2cai-onboarding-input {
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  padding: 8px 16px !important;
  background: transparent !important;
  line-height: normal !important;
  width: 100% !important;
}

.a2cai-onboarding-input:focus {
  border-color: #20890f !important;
  box-shadow: 0 0 0 1px #20890f !important;
  outline: 2px solid transparent !important;
}

.a2cai-button-primary {
  border-radius: 12px;
  font-weight: 600;
  padding: 8px 12px;
  color: white;
  background: #17a34a;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
}

.a2cai-button-primary svg {
  fill: white;
}

.a2cai-button-primary:hover {
  background: #0e913e;
}

.a2cai-button-primary:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

.a2cai-button-secondary {
  border-radius: 12px;
  font-weight: 600;
  padding: 8px 12px;
  color: #20890f;
  background: transparent;
  border: 1px solid #94a3b8;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
}

.a2cai-button-secondary svg {
  fill: #20890f;
}

.a2cai-button-secondary:hover {
  background: #f1f5f9;
}

.a2cai-button-secondary:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

.a2cai-button-danger {
  border-radius: 12px;
  font-weight: 600;
  padding: 8px 12px;
  color: #dc2626;
  background: transparent;
  border: 1px solid #fecaca;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
}

.a2cai-button-danger svg {
  fill: #dc2626;
}

.a2cai-button-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.a2cai-button-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.a2cai-button-tertiary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 8px 12px;
  color: #20890f;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}

.a2cai-button-tertiary svg {
  fill: #20890f;
  width: 20px;
  height: 20px;
}

.a2cai-button-tertiary:hover {
  background: #f1f5f9;
  color: #20890f;
}

.a2cai-button-tertiary:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.a2cai-loader {
  fill: white;
  animation: spin 1s linear infinite;
  height: 20px;
  display: none;
}

*.loading {
  opacity: 0.5;
  cursor: default;
}

*.loading .a2cai-loader {
  display: inline-block;
}

button:disabled {
  cursor: default !important;
}

.a2cai-inputs-container {
  display: flex;
  gap: 8px;
  max-width: 510px;
}

.a2cai-link {
  font-size: 16px;
  font-weight: 400;
  color: #64748b;
  text-decoration: underline;
  text-align: center;
  cursor: pointer;
}

.a2cai-terciary-text {
  font-size: 16px !important;
  font-weight: 400;
  color: #64748b;
  text-align: center;
}

.a2cai-link:hover {
  color: #334155;
}

#a2cai-error-message-box,
.a2cai-error-message-box {
  margin-top: 20px;
  display: none;
  background: #ffebeb;
  border: 1px solid #f2cdcd;
  padding: 16px 22px;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

#a2cai-error-message-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

#a2cai-error-message-title {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

#a2cai-error-message-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #334155;
}

/* Admin Styles */
.a2cai-dash-container {
  max-width: 780px;
}

.a2cai-tab-container {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
}

.a2cai-tab-container-inner {
  display: flex;
}

.a2cai-tab {
  padding: 8px 16px;
  color: #94a3b8;
  transition: color 0.2s ease;
  /* remove button default styles */
  border: none;
  background: none;
  cursor: pointer;
}

.a2cai-tab:hover {
  color: #64748b;
}

.a2cai-tab.active {
  box-shadow: inset 0 -3px 0 0 #84cc16;
  color: #475569;
}

#a2cai-loading-notice-container {
  display: flex;
  align-items: start;
  gap: 10px;
  line-height: normal;
}

.a2cai-loading-notice {
  font-size: 16px;
  font-weight: 400;
  color: #64748b;
}

.a2cai-text {
  font-size: 16px;
  font-weight: 400;
  color: #1e293b;
  line-height: normal;
}

.a2cai-kpi-container {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  width: 100%;
  border-radius: 12px;
}

/* make a2cai-kpi-container responsive */
@media (max-width: 768px) {
  .a2cai-kpi-container {
    flex-direction: column;
  }
}

.a2cai-kpi-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

.a2cai-kpi-title {
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  margin-bottom: 4px;
  color: #64748b;
}

.a2cai-kpi-value {
  font-size: 32px;
  font-weight: 700;
  line-height: normal;
  color: #334155;
}

.a2cai-tab-content {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.a2cai-tab-content.active {
  display: flex;
}

.a2cai-relative-container {
  position: relative;
}

/* https://www.w3schools.com/howto/howto_css_switch.asp */
/* The switch - the box around the slider */
.a2cai-switch {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  /* Remove button styles */
  border: none;
  background: transparent;
  padding: 0;
  width: fit-content;
}

/* The slider background */
.a2cai-slider {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  border-radius: 34px;
  width: 43px;
  height: 25px;
}

.a2cai-slider-circle {
  position: absolute;
  content: "";
  height: 17px;
  width: 17px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.2s;
  border-radius: 50%;
}

.a2cai-switch.checked .a2cai-slider {
  background-color: #20890f;
}

.a2cai-switch.checked .a2cai-slider-circle {
  -webkit-transform: translateX(17px);
  -ms-transform: translateX(17px);
  transform: translateX(17px);
}

.a2cai-switch:focus .a2cai-slider {
  box-shadow: 0 0 1px #20890f;
}

.a2cai-switch-label {
  /* style to not split into multiple lines */
  white-space: nowrap;
}

.a2cai-remove-link-styles {
  text-decoration: none;
}

.a2cai-arrow-container {
  position: absolute;
  top: -55px;
  left: 12px;
}

.a2cai-arrow-text {
  position: absolute;
  white-space: nowrap;
  top: -9px;
  left: 62px;
}

/* Settings Page - Vertical Tabs Layout */
.a2cai-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.a2cai-settings-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.a2cai-logo-link {
  text-decoration: none;
}

.a2cai-version-badge {
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.a2cai-settings-container {
  display: flex;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.a2cai-vertical-tabs {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  padding: 16px 8px;
  gap: 2px;
  min-width: 150px;
  background: #f1f5f9;
}

.a2cai-vertical-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  text-align: left;
  position: relative;
}

.a2cai-vertical-tab:hover {
  color: #334155;
}

.a2cai-vertical-tab.active {
  background: #fff;
  color: #1e293b;
  font-weight: 600;
}

.a2cai-vertical-tab svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.a2cai-vertical-tab.active svg {
  opacity: 1;
}

.a2cai-tab-panels {
  flex: 1;
  padding: 28px;
  min-height: 320px;
}

.a2cai-tab-panel {
  display: none;
}

.a2cai-tab-panel.active {
  display: block;
}

.a2cai-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: #16a34a;
}

.a2cai-status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
}

.a2cai-store-info {
  margin-bottom: 16px;
}

.a2cai-store-info h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.a2cai-store-info p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.a2cai-sync-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.a2cai-sync-status-loading {
  background: #f1f5f9;
  color: #94a3b8;
}

.a2cai-sync-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
}

.a2cai-sync-status-success {
  background: #dcfce7;
  color: #166534;
}

.a2cai-sync-status-progress {
  background: #dbeafe;
  color: #1e40af;
}

.a2cai-sync-status-error {
  background: #fee2e2;
  color: #991b1b;
}

.a2cai-sync-status-pending {
  background: #f1f5f9;
  color: #475569;
}

.a2cai-sync-status-hint {
  font-size: 13px;
  color: #94a3b8;
}

.a2cai-sync-status-link {
  color: #17a34a;
  text-decoration: underline;
}

.a2cai-sync-status-link:hover {
  color: #15803d;
}

.a2cai-description {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.a2cai-dashboard-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #17a34a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.a2cai-dashboard-button:hover {
  background: #15803d;
  color: #fff;
}

.a2cai-dashboard-button:focus,
.a2cai-dashboard-button:active {
  background: #15803d;
  color: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 163, 74, 0.3);
}

.a2cai-dashboard-button svg {
  fill: currentColor;
  opacity: 0.9;
}

.a2cai-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
}

.a2cai-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.a2cai-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.a2cai-info-row span:first-child {
  color: #64748b;
}

.a2cai-info-row span:last-child {
  color: #1e293b;
  font-weight: 500;
}

.a2cai-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 20px 0;
}

.a2cai-support-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.a2cai-support-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3b82f6;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.a2cai-support-links a:hover {
  color: #2563eb;
}

.a2cai-danger-description {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.a2cai-button-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: transparent;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.a2cai-button-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.a2cai-button-danger svg {
  fill: #dc2626;
}

.a2cai-button-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 520px) {
  .a2cai-settings-container {
    flex-direction: column;
  }

  .a2cai-vertical-tabs {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    min-width: auto;
    padding: 8px;
  }

  .a2cai-vertical-tab {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
  }

  .a2cai-tab-panels {
    padding: 20px;
  }
}
