/* =============================================================
   product_modal.css  — Pigments TDS View Modal
   Light blue/white design matching the reference screenshots
============================================================= */

/* ── Overlay ─────────────────────────────────────────────── */
.tds-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9000;
  overflow-y: auto;
  padding: 32px 16px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: tdsOverlayIn 0.2s ease;
}

.tds-overlay.active {
  display: block;
}

@keyframes tdsOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal box ───────────────────────────────────────────── */
.tds-modal {
  position: relative;
  background: #eef3fb;
  border-radius: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 28px 28px;
  animation: tdsModalIn 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@keyframes tdsModalIn {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Close button ────────────────────────────────────────── */
.tds-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #dde6f4;
  color: #555;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 10;
}
.tds-close:hover { background: #c6d3e8; color: #1d2939; }

/* ── Loading spinner ─────────────────────────────────────── */
.tds-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}
.tds-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #c6d8f0;
  border-top-color: #1da1c4;
  border-radius: 50%;
  animation: tdsSpinAnim 0.7s linear infinite;
}
@keyframes tdsSpinAnim { to { transform: rotate(360deg); } }

/* ── Header bar ──────────────────────────────────────────── */
.tds-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.tds-header-left  { display: flex; align-items: center; gap: 14px; }
.tds-header-right { display: flex; gap: 10px; }

.tds-version-badge {
  background: #1d2939;
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.tds-revision {
  font-size: 14px;
  color: #555;
}

.tds-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1.5px solid #c6d3e8;
  border-radius: 8px;
  background: #fff;
  color: #1d2939;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.tds-dl-btn:hover { background: #eef3fb; border-color: #8baed4; }
.tds-dl-btn svg   { color: #1da1c4; }

/* ── Layout helpers ──────────────────────────────────────── */
.tds-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ── Cards ───────────────────────────────────────────────── */
.tds-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.tds-card--full {
  margin-bottom: 16px;
}

.tds-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #1d2939;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef3fb;
}
.tds-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1da1c4;
  flex-shrink: 0;
}

/* ── Description table ───────────────────────────────────── */
.tds-desc-table {
  width: 100%;
  border-collapse: collapse;
}
.tds-desc-table tr {
  border-bottom: 1px solid #f0f4fa;
}
.tds-desc-table tr:last-child { border-bottom: none; }
.tds-label {
  padding: 11px 0;
  font-size: 13px;
  color: #7a8fa6;
  width: 55%;
}
.tds-value {
  padding: 11px 0;
  font-size: 13px;
  color: #1d2939;
  text-align: right;
  font-weight: 500;
}
.tds-bold   { font-weight: 700; }
.tds-blue   { color: #1da1c4; font-weight: 600; }
.tds-formula { font-weight: 700; font-family: monospace; font-size: 14px; }

/* ── Images ──────────────────────────────────────────────── */
.tds-img-wrap {
  background: #f0f4fa;
  border-radius: 8px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tds-img-wrap--structure {
  min-height: 180px;
  padding: 12px;
}
.tds-img-wrap img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 6px;
}
.tds-img-placeholder {
  font-size: 13px;
  color: #aab;
}

/* ── Fastness bars ───────────────────────────────────────── */
.tds-fastness-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 40px;
}
.tds-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tds-bar-label {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  min-width: 130px;
}
.tds-bar-track {
  flex: 1;
  height: 8px;
  background: #dde6f4;
  border-radius: 99px;
  overflow: hidden;
}
.tds-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #1da1c4, #1d8ce0);
  transition: width 0.5s ease;
}
.tds-bar-score {
  font-size: 13px;
  font-weight: 700;
  color: #1da1c4;
  min-width: 28px;
  text-align: right;
}

/* ── Light fastness bars (orange-red gradient) ───────────── */
.tds-light-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}
.tds-bar-fill--light {
  background: linear-gradient(90deg, #f5a623, #e8402a);
}
.tds-bar-score--light { color: #e8402a; }

/* ── Application suitability ─────────────────────────────── */
.tds-suitability-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tds-suit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #f0f4fa;
  font-size: 13px;
  color: #555;
}
.tds-suit-row:last-child { border-bottom: none; }
.tds-badge-yes {
  background: #1db87a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.tds-badge-no {
  color: #aaa;
  font-size: 15px;
}

/* ── Compliance grid ─────────────────────────────────────── */
.tds-compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 20px;
  padding-top: 4px;
}
.tds-cert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #444;
}
.tds-cert-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1db87a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tds-cert-check svg { color: #fff; }

/* ── Advisory banner ─────────────────────────────────────── */
.tds-advisory {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #1d2939;
  border-radius: 10px;
  padding: 18px 22px;
  margin-top: 16px;
}
.tds-advisory-icon { color: #fff; flex-shrink: 0; margin-top: 2px; }
.tds-advisory p    { font-size: 12.5px; color: #cdd6e4; line-height: 1.65; margin: 0; }
.tds-advisory strong { color: #fff; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .tds-modal          { padding: 20px 14px; }
  .tds-row            { grid-template-columns: 1fr; }
  .tds-fastness-grid  { grid-template-columns: 1fr; }
  .tds-compliance-grid{ grid-template-columns: 1fr 1fr; }
  .tds-bar-label      { min-width: 100px; font-size: 12px; }
}