/**
 * کد رنگ مقاومت — استایل اختصاصی
 */
.ic-tool-resistor-code .ic-tool-body {
  padding-top: 8px;
  padding-bottom: 32px;
}

.ic-tool-resistor-code .ic-rcode-menu-btn {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.ic-tool-resistor-code .ic-rcode-menu-icon {
  display: block;
  opacity: 0.85;
}

main.ic-tool.ic-tool-resistor-code .ic-tool-head .ic-tool-info-btn {
  left: 75px;
}

.ic-rcode-visual {
  position: relative;
  width: 260px;
  height: 165px;
  margin: 0 auto 12px;
}

.ic-rcode-resistor-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 0;
}

.ic-rcode-bands-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.ic-rcode-bands-layer.is-34 {
  top: 0px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.ic-rcode-bands-layer.is-34.is-4 {
  gap: 8px;
}

.ic-rcode-bands-layer.is-56 {
  top: 0;
}

.ic-rcode-band {
  width: 10px;
  height: 41px;
  border-radius: 1px;
  flex-shrink: 0;
}

.ic-rcode-band.is-tall {
  height: 52px;
  border-radius: 1.5px;
}

.ic-rcode-bands-56 {
  position: absolute;
  inset: 0;
}

.ic-rcode-bands-56-first {
  position: absolute;
  left: 69px;
  top: 0;
}

.ic-rcode-bands-56-mid {
  position: absolute;
  left: 102px;
  top: 0;
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: flex-start;
}

.ic-rcode-bands-56-ppm {
  position: absolute;
  right: 69px;
  top: 0;
}

.ic-rcode-value-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  margin-bottom: 16px;
}

.ic-rcode-value {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #2d3a4a;
  text-align: center;
  line-height: 1.5;
}

.ic-rcode-tick {
  display: block;
  margin-top: 2px;
  filter: brightness(0) saturate(100%) invert(56%) sepia(61%) saturate(459%) hue-rotate(88deg) brightness(95%) contrast(89%);
}

.ic-rcode-tick[hidden] {
  display: none !important;
}

.ic-rcode-columns {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
  max-width: 100%;
  padding: 8px 4px 0;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ic-rcode-columns::-webkit-scrollbar {
  display: none;
}

.ic-rcode-columns.is-4 {
  gap: 22px;
}

.ic-rcode-columns.is-5 {
  gap: 20px;
}

.ic-rcode-columns.is-6 {
  gap: 15px;
}

.ic-rcode-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ic-rcode-swatch {
  width: 58px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.15s ease;
}

.ic-rcode-columns.is-5 .ic-rcode-swatch {
  width: 48px;
  height: 29px;
}

.ic-rcode-columns.is-6 .ic-rcode-swatch {
  width: 42px;
  height: 26px;
}

.ic-rcode-swatch.is-selected {
  transform: scale(1.1);
}

.ic-rcode-swatch-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-sizing: border-box;
}

.ic-rcode-swatch-inner.is-white {
  border: 1px solid #e0e0e0;
}

.ic-rcode-toast {
  position: fixed;
  left: 50%;
  bottom: 50px;
  transform: translateX(-50%);
  z-index: 120;
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(45, 58, 74, 0.92);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ic-rcode-toast.is-visible {
  opacity: 1;
}

.ic-rcode-toast[hidden] {
  display: block !important;
}
