/* ==========================================================================
   Faraz Schema — HowTo Block Premium Styles (Vertical Stepper)
   ========================================================================== */

.faraz-schema-howto-wrapper,
.faraz-schema-howto-block,
.wp-block-faraz-howto {
  direction: rtl;
  margin: 1.5rem 0;
  font-family: 'IRANSansXV', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  width: 100%;
}

.faraz-howto-card,
.faraz-schema-howto-block {
  width: 100%;
  margin-inline: auto;
  border-radius: 1rem;
  padding: 1rem !important; /* 16px padding */
  background-color: #ffffff !important;
  border: 1px solid #dadce0 !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  box-sizing: border-box;
}

/* Dark Mode */
.dark .faraz-howto-card,
.dark .faraz-schema-howto-block,
body.dark-theme .faraz-howto-card,
body.dark-theme .faraz-schema-howto-block,
[data-theme="dark"] .faraz-howto-card,
[data-theme="dark"] .faraz-schema-howto-block {
  background-color: #212b36 !important;
  border-color: rgba(99, 115, 129, 0.2) !important;
}

.faraz-howto-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem !important;
  border-bottom: 1px solid #dadce0;
  padding-bottom: 0.75rem !important;
}

.dark .faraz-howto-header,
body.dark-theme .faraz-howto-header,
[data-theme="dark"] .faraz-howto-header {
  border-color: #374151;
}

.faraz-howto-title {
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  color: #191f27 !important;
  margin: 0 !important;
}

.dark .faraz-howto-title,
body.dark-theme .faraz-howto-title,
[data-theme="dark"] .faraz-howto-title {
  color: #ffffff !important;
}

.faraz-howto-duration-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background-color: rgba(51, 102, 255, 0.1);
  color: #3366ff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
}

.faraz-howto-stepper,
.faraz-howto-steps {
  position: relative;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  counter-reset: faraz-step;
}

/* Step Item in legacy HTML and new HTML */
.faraz-howto-step,
.faraz-howto-step-item {
  display: flex;
  position: relative;
  margin-bottom: 1.25rem !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  counter-increment: faraz-step;
}

.faraz-howto-step:last-child,
.faraz-howto-step-item:last-child {
  margin-bottom: 0 !important;
}

/* Legacy HTML Vertical Stepper simulation via CSS counters */
.faraz-howto-steps .faraz-howto-step-item {
  padding-right: 3.5rem !important;
  flex-direction: column;
}

.faraz-howto-steps .faraz-howto-step-item::before {
  content: counter(faraz-step);
  position: absolute;
  top: 0;
  right: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: #3366ff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 0 12px rgba(51, 102, 255, 0.3);
  z-index: 10;
}

.faraz-howto-steps .faraz-howto-step-item::after {
  content: '';
  position: absolute;
  top: 2.25rem;
  right: 1.0625rem;
  width: 2px;
  height: calc(100% + 1.25rem);
  background-color: #dadce0;
}

.dark .faraz-howto-steps .faraz-howto-step-item::after,
body.dark-theme .faraz-howto-steps .faraz-howto-step-item::after,
[data-theme="dark"] .faraz-howto-steps .faraz-howto-step-item::after {
  background-color: #374151;
}

.faraz-howto-steps .faraz-howto-step-item:last-child::after {
  display: none;
}

/* New HTML Stepper column — No right margin as requested */
.faraz-howto-step-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 0 !important; /* No right margin */
  margin-left: 1rem !important;
  position: relative;
}

.faraz-howto-step-number {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: #3366ff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 0 12px rgba(51, 102, 255, 0.3);
  z-index: 10;
  flex-shrink: 0;
}

.faraz-howto-connecting-line {
  width: 2px;
  height: calc(100% + 1.25rem);
  background-color: #dadce0;
  position: absolute;
  top: 2.25rem;
  right: 1.0625rem;
}

.dark .faraz-howto-connecting-line,
body.dark-theme .faraz-howto-connecting-line,
[data-theme="dark"] .faraz-howto-connecting-line {
  background-color: #374151;
}

.faraz-howto-step-body {
  padding-top: 0.25rem;
  padding-bottom: 0.5rem;
}

.faraz-howto-step-heading,
.faraz-howto-step-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #191f27 !important;
  margin: 0 0 0.5rem 0 !important;
}

.dark .faraz-howto-step-heading,
.dark .faraz-howto-step-title,
body.dark-theme .faraz-howto-step-heading,
body.dark-theme .faraz-howto-step-title,
[data-theme="dark"] .faraz-howto-step-heading,
[data-theme="dark"] .faraz-howto-step-title {
  color: #ffffff !important;
}

.faraz-howto-step-description,
.faraz-howto-step-text {
  font-size: 14px !important;
  line-height: 1.7 !important;
  color: #303437 !important;
  margin: 0 !important;
}

.dark .faraz-howto-step-description,
.dark .faraz-howto-step-text,
body.dark-theme .faraz-howto-step-description,
body.dark-theme .faraz-howto-step-text,
[data-theme="dark"] .faraz-howto-step-description,
[data-theme="dark"] .faraz-howto-step-text {
  color: #919eab !important;
}

.faraz-howto-step-img,
.faraz-howto-step-image img {
  margin-top: 0.75rem;
  border-radius: 0.5rem;
  max-width: 100%;
  height: auto;
  display: block;
}
