/* Module styles for .sx-secm-probes
   Uses existing brand variables from your base CSS files.
*/

/* Modal */
.sx-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
  align-items: center;
  justify-content: center;
}

.sx-modal[aria-hidden="false"] {
  display: flex;
}

.sx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 25, 0.48);
  backdrop-filter: blur(2px);
  transition: opacity .18s ease;
}

.sx-modal-content {
  position: relative;
  width: min(920px, 94%);
  max-height: 84vh;
  overflow: auto;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md, 0 6px 26px rgba(0,0,0,0.12));
  padding: 22px;
  margin: 20px;
  z-index: 2;
  transform: translateY(6px);
  transition: transform .22s ease, opacity .18s ease;
}

/* Close button */
.sx-modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--color-text-dark);
  cursor: pointer;
  padding: 6px 10px;
}

/* Table inside modal */
.sx-probe-guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.98rem;
  color: var(--color-text-dark);
}

.sx-probe-guide-table th,
.sx-probe-guide-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: left;
}

.sx-probe-guide-table thead th {
  background: var(--color-bg-blue-tint, rgba(45,132,205,0.03));
  color: var(--color-brand-blue);
  font-weight: 700;
  position: sticky;
  top: 0;
}

/* Filter bar tweaks */
/* Filter bar - refined layout + modern select visuals */

/* Make the entire filter bar vertically centered and airy */
#sx-probe-filter-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center; /* center vertically so label + select line up */
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  background: var(--color-white);
}

/* Each field: inline label + control with a comfortable gap */
#sx-probe-filter-bar .sx-dist__field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
}

/* Slightly larger growable field for the material list */
#sx-probe-filter-bar .sx-dist__field--grow {
  flex: 1 1 320px;
  min-width: 220px;
}

/* Label: fixed width so the name and box are not cramped */
#sx-probe-filter-bar .sx-dist__label {
  width: 92px;                /* fixed label column */
  margin: 0;                  /* remove default spacing */
  font-size: 0.95rem;
  color: var(--color-text-light, #666);
  text-align: left;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Modern compact select */
#sx-probe-filter-bar .sx-dist__select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-block;
  width: 220px;
  max-width: 100%;
  padding: 7px 36px 7px 12px; /* reduced vertical padding, space for custom arrow on the right */
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.10);
  background: var(--color-white);
  font-size: 0.95rem;
  color: var(--color-text-dark, #333);
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease;
  min-height: 36px; /* compact height (≈ 36px) */
  box-sizing: border-box;
}

/* Custom dropdown arrow (SVG) positioned to the right */
#sx-probe-filter-bar .sx-dist__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
}

/* Focus state */
#sx-probe-filter-bar .sx-dist__select:focus {
  outline: none;
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 6px rgba(45,132,205,0.06);
  transform: translateY(-1px);
}

/* Reduce the select width on very small screens */
@media (max-width: 560px) {
  #sx-probe-filter-bar .sx-dist__label { width: 76px; font-size: 0.92rem; }
  #sx-probe-filter-bar .sx-dist__select { width: 160px; padding-right: 34px; }
}

/* Reset — inline link style */
.sx-filter-reset-link {
  background: transparent;
  border: none;
  color: var(--color-brand-blue);
  font-weight: 600;
  padding: 6px 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: color .12s ease, text-decoration .12s ease, transform .08s ease;
}

/* Align with selects and provide hover underline */
.sx-filter-reset-link:hover,
.sx-filter-reset-link:focus {
  text-decoration: underline;
  color: var(--color-brand-blue);
  transform: translateY(-1px);
  outline: none;
}

/* Make the reset appear visually aligned in the row */
#sx-probe-filter-bar > div[style] {
  /* minimal adjustment already provided inline in HTML (align-self:center) */
}

/* Grid (cards) */
#sx-probe-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  margin-top: 18px;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  #sx-probe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  #sx-probe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Each item uses your .sx-card look */
.sx-probe-item {
  padding: 16px;
  border-radius: var(--sx-radius, 12px);
  border: 1px solid rgba(0,0,0,0.06);
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}

.sx-probe-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,0.06));
}

/* Image */
.sx-probe-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  margin-bottom: 12px;
  display: block;
}

/* Meta */
.sx-probe-meta {
  font-size: 0.95rem;
  color: var(--color-text-light, #666);
  margin-bottom: 8px;
}

.sx-probe-title {
  font-weight: 700;
  color: var(--color-brand-gray, #626262);
  margin: 0 0 8px;
}

/* Card footer */
.sx-probe-card-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Technical details button uses primary / outline */
.sx-probe-cta {
  margin-left: auto;
}

/* Pagination */
.sx-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.sx-page-btn {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  background: var(--color-white);
  cursor: pointer;
  transition: background .12s ease, transform .12s ease;
}

.sx-page-btn.active {
  background: var(--color-brand-blue);
  color: var(--color-white);
  border-color: var(--color-brand-blue);
}

.sx-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive touches */
@media (max-width:720px) {
  .sx-modal-content { padding: 14px; }
  .sx-probe-guide-table th, .sx-probe-guide-table td { padding: 10px; }
}

/* Module styles for .sx-secm-probes
   Uses existing brand variables from your base CSS files.
*/

/* --- keep existing modal, filter, grid styles above (unchanged) ---
   Below: card-specific layout for the compact spec rows + small button
*/

/* Card body wrapper */
.sx-probe-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  min-height: 0;
  flex: 1 1 auto;
}

/* Specs list (compact labeled rows) */
.sx-probe-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Each row: label on the left, value on the right */
.sx-probe-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0,0,0,0.00); /* keep airy — can use subtle tint if desired */
}

/* Label */
.sx-probe-label {
  font-size: 0.92rem;
  color: var(--color-text-light, #666);
  font-weight: 600;
  flex: 0 0 auto;
  min-width: 130px; /* aligns values vertically across cards */
}

/* Value */
.sx-probe-value {
  font-size: 0.95rem;
  color: var(--color-text-dark, #333);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.sx-probe-value { text-transform: uppercase; }
.sx-probe-value .no-uppercase { text-transform: none; }

/* Make sure image remains a consistent size */
.sx-probe-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  margin-bottom: 12px;
  display: block;
  max-height: 240px;
}

/* Footer: keep the CTA aligned to bottom */
.sx-probe-card-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

/* Small button variant for Technical Details */
.sx-btn-sm {
  padding: 6px 10px;
  font-size: 0.92rem;
  line-height: 1;
  border-radius: 8px;
  height: auto;
  min-height: 32px; /* visually compact */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Ensure outline style stays readable at small size */
.sx-btn-outline.sx-btn-sm {
  border: 1px solid rgba(45,132,205,0.18);
  background: transparent;
  color: var(--color-brand-blue);
}

/* hover states (small) */
.sx-btn-outline.sx-btn-sm:hover {
  background: var(--color-bg-blue-hover);
  transform: translateY(-1px);
}

/* Responsive tweaks */
@media (max-width: 560px) {
  .sx-probe-label { min-width: 100px; font-size: 0.9rem; }
  .sx-probe-value { font-size: 0.92rem; }
  .sx-probe-image { max-height: 200px; }
}