/**
 * دیتاشیت‌یاب — مثل DatasheetFinder.tsx
 */
main.ic-tool-datasheet {
  --ic-tool-pad-x: 20px;
}

main.ic-tool-datasheet .ic-tool-head.ic-ds-head {
  direction: ltr;
}

main.ic-tool-datasheet .ic-ds-title {
  color: #4e91e6;
  font-weight: 400;
}

main.ic-tool-datasheet .ic-tool-head .ic-tool-info-btn {
  left: 16px;
}

main.ic-tool-datasheet .ic-ds-diamond {
  position: absolute;
  left: 55px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  z-index: 1;
}

main.ic-tool-datasheet .ic-ds-diamond[hidden] {
  display: none !important;
}

main.ic-tool-datasheet > .ic-tool-body.ic-ds-body {
  padding-top: 40px;
  padding-bottom: 110px;
}

main.ic-tool-datasheet .ic-ds-desc {
  margin-bottom: 50px;
  line-height: 24px;
}

.ic-ds-offline {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ic-ds-offline[hidden] {
  display: none !important;
}

.ic-ds-offline-brand {
  font-size: 35px;
  font-weight: 700;
  color: #4e91e6;
  letter-spacing: 2px;
  margin: 0 0 50px;
}

.ic-ds-offline-retry {
  position: absolute;
  bottom: 50px;
  border: 0;
  background: transparent;
  color: #4e91e6;
  font-size: 12px;
  font-family: inherit;
  padding: 6px 12px;
  cursor: pointer;
}

.ic-ds-input-wrap {
  position: relative;
  width: 100%;
  max-width: var(--ic-tool-content-max);
  margin: 0 auto 10px;
}

.ic-ds-input {
  width: 100%;
  height: 65px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: #f4f4f4;
  font-size: 13px;
  font-family: inherit;
  color: #2d3a4a;
  text-align: center;
  direction: ltr;
  outline: none;
  box-sizing: border-box;
}

.ic-ds-input::placeholder {
  color: #a3a3a3;
  font-size: 10px;
  direction: rtl;
}

.ic-ds-input.is-locked {
  color: #64748b;
}

.ic-ds-input-clear {
  position: absolute;
  left: 18px;
  top: 0;
  height: 65px;
  border: 0;
  background: transparent;
  color: #9aa6b2;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.ic-ds-input-clear[hidden] {
  display: none !important;
}

.ic-ds-input-lock {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  z-index: 2;
}

.ic-ds-input-lock[hidden] {
  display: none !important;
}

.ic-ds-error {
  margin: 170px auto 30px;
  color: #e64747;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.ic-ds-error[hidden] {
  display: none !important;
}

.ic-ds-empty {
  width: 100%;
  max-width: var(--ic-tool-content-max);
  margin: 150px auto 0;
  text-align: center;
  padding: 0 12px;
  box-sizing: border-box;
}

.ic-ds-empty[hidden] {
  display: none !important;
}

.ic-ds-empty-title {
  margin: 0 0 10px;
  color: #2d3a4a;
  font-size: 15px;
  font-weight: 700;
}

.ic-ds-empty-sub {
  margin: 0;
  color: #8090a8;
  font-size: 11px;
  line-height: 22px;
}

.ic-ds-success {
  width: 100%;
  max-width: var(--ic-tool-content-max);
  margin: 150px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
}

.ic-ds-success[hidden] {
  display: none !important;
}

.ic-ds-success-text {
  margin: 0;
  color: #10b981;
  font-size: 11.8px;
  line-height: 28px;
  text-align: center;
}

.ic-ds-specs {
  width: 100%;
  max-width: var(--ic-tool-content-max);
  margin: 12px auto 0;
}

.ic-ds-specs[hidden] {
  display: none !important;
}

.ic-ds-specs-label {
  margin: 0 0 20px;
  color: #4e91e6;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.ic-ds-specs-box {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
}

.ic-ds-spec-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.ic-ds-spec-row:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.ic-ds-spec-key {
  flex: 0 0 46%;
  min-width: 0;
  padding-left: 8px;
  color: #2d3a4a;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ic-ds-spec-val {
  flex: 0 0 52%;
  min-width: 0;
  padding-right: 8px;
  color: #2d3a4a;
  font-size: 12px;
  text-align: left;
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

main.ic-tool-datasheet > .ic-ds-footer {
  padding-inline: 20px;
  padding-top: 5px;
  padding-bottom: calc(25px + env(safe-area-inset-bottom, 0px));
}

.ic-ds-footer-row {
  display: flex;
  flex-direction: row-reverse;
  direction: ltr;
  align-items: stretch;
  gap: 8px;
}

.ic-ds-btn {
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
}

.ic-ds-btn:disabled {
  cursor: default;
}

.ic-ds-btn-primary,
.ic-ds-btn-lorex {
  flex: 1;
  min-width: 0;
  padding: 18px 8px;
  background: #4e91e6;
}

.ic-ds-btn-primary.is-disabled,
.ic-ds-btn-lorex.is-disabled {
  background: #bfccd4;
}

.ic-ds-btn-primary.is-network-retry {
  background: #eea864;
}

.ic-ds-btn-primary.is-loading {
  pointer-events: none;
}

.ic-ds-btn-clear {
  flex: 0 0 auto;
  padding: 0 20px;
  background: #fb5d5d;
}

.ic-ds-btn-clear.is-disabled {
  background: #bfccd4;
}

.ic-ds-clear-icon {
  background-color: #fff !important;
  width: 21px;
  height: 21px;
}

.ic-ds-toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(320px, calc(100% - 40px));
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(45, 58, 74, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: ic-ds-toast-in 0.25s ease;
}

.ic-ds-toast[hidden] {
  display: none !important;
}

@keyframes ic-ds-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

main.ic-tool-datasheet.has-inline-app-banner > .ic-tool-body.ic-ds-body {
  padding-bottom: var(--ic-tool-bottom-stack-h, 150px);
}
