/* ============================================================================
   DANSIS SEO, SCHEMA PRO & SSR VARIATION TABLE v1.00
   100% RTL · Mobile-First · Brand Harmony (#2f4b4c / #0f766e / #b70000)
   ============================================================================ */

.dsv-wrap {
  direction: rtl;
  text-align: right;
  margin: 22px auto 26px;
  max-width: 100%;
  box-sizing: border-box;
}
.dsv-wrap *,
.dsv-wrap *::before,
.dsv-wrap *::after {
  box-sizing: border-box;
}
.dsv-wrap a {
  text-decoration: none !important;
  outline: none !important;
}

.dsv-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 18px;
}

.dsv-head {
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%);
  border-bottom: 1.5px solid #e2e8f0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.dsv-head-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 320px;
}
.dsv-badge-ssr {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: #2f4b4c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}
.dsv-title {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  line-height: 1.45 !important;
}
.dsv-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.dsv-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
}
.dsv-pill.is-green {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.dsv-pill.is-price {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.dsv-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.dsv-filter-input {
  width: 220px;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  outline: none !important;
  font-family: inherit !important;
}
.dsv-filter-input:focus {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12) !important;
}
.dsv-stock-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.dsv-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dsv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dsv-table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  padding: 11px 14px;
  border-bottom: 1.5px solid #e2e8f0;
  text-align: right;
  white-space: nowrap;
}
.dsv-table thead th.dsv-col-act {
  text-align: center;
}
.dsv-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}
.dsv-table tbody tr:hover {
  background: #f4fdfb;
}
.dsv-table tbody tr.is-selected {
  background: #ecfdf5;
}
.dsv-table tbody tr.dsv-extra-row {
  display: none;
}
.dsv-table.is-expanded tbody tr.dsv-extra-row {
  display: table-row;
}
.dsv-table tbody tr.dsv-hidden-by-filter {
  display: none !important;
}
.dsv-table tbody td {
  padding: 11px 14px;
  vertical-align: middle;
  color: #0f172a;
}

.dsv-attr-cat {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
  margin-left: 5px;
}
.dsv-attr-val {
  font-weight: 800;
  color: #0f172a;
  unicode-bidi: plaintext;
}
.dsv-sku-code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}
.dsv-price-num {
  color: #b70000;
  font-size: 13.5px;
  font-weight: 900;
  white-space: nowrap;
}
.dsv-price-inquiry {
  color: #0f766e;
  font-size: 12.5px;
  font-weight: 800;
}
.dsv-st {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.dsv-st.is-in { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.dsv-st.is-inq { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.dsv-st.is-out { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.dsv-cell-act {
  text-align: center;
  white-space: nowrap;
}
.dsv-btn-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1.5px solid #0f766e !important;
  background: #f0fdfa !important;
  color: #0f766e !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer;
  font-family: inherit !important;
  transition: background-color 0.15s, color 0.15s, transform 0.12s;
}
.dsv-btn-pick:hover {
  background: #0f766e !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}
.dsv-btn-pick.is-picked {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
}
.dsv-btn-muted {
  color: #94a3b8;
  font-weight: 700;
}

.dsv-foot {
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}
.dsv-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1.5px solid #2f4b4c !important;
  background: #ffffff !important;
  color: #2f4b4c !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer;
  font-family: inherit !important;
}
.dsv-expand-btn:hover {
  background: #2f4b4c !important;
  color: #ffffff !important;
}

/* Specification Attributes Grid */
.dsv-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px;
}
.dsv-spec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
}
.dsv-spec-k { color: #64748b; font-weight: 700; }
.dsv-spec-v { color: #0f172a; font-weight: 900; text-align: left; }

/* Toast feedback on 1-click pick */
#dsv-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10000040;
  background: #162b2d;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
#dsv-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 680px) {
  .dsv-head {
    padding: 14px;
  }
  .dsv-controls,
  .dsv-filter-input {
    width: 100%;
  }
  .dsv-specs-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .dsv-table-scroll {
    overflow-x: visible;
    padding: 10px 12px;
  }
  .dsv-table,
  .dsv-table tbody {
    display: block;
    width: 100%;
  }
  .dsv-table thead {
    display: none;
  }
  .dsv-table tbody tr.dsv-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }
  .dsv-table tbody tr.dsv-row.is-selected {
    background: #ecfdf5;
    border-color: #6ee7b7;
  }
  .dsv-table tbody tr.dsv-extra-row {
    display: none;
  }
  .dsv-table.is-expanded tbody tr.dsv-extra-row {
    display: flex;
  }
  .dsv-table tbody td {
    display: block;
    padding: 0;
    border: none;
  }
  .dsv-table tbody td.dsv-cell-label {
    flex: 1 1 100%;
    font-size: 13px;
    line-height: 1.5;
  }
  .dsv-table tbody td.dsv-cell-sku {
    flex: 0 0 auto;
  }
  .dsv-table tbody td.dsv-cell-stock {
    flex: 0 0 auto;
  }
  .dsv-table tbody td.dsv-cell-price {
    flex: 1 1 auto;
    text-align: right;
  }
  .dsv-table tbody td.dsv-cell-act {
    flex: 1 1 100%;
    text-align: right;
    margin-top: 2px;
  }
  .dsv-btn-pick {
    width: 100%;
    height: 38px;
    font-size: 12.5px !important;
  }
}
