/* Alerts */
.tfm-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
}
.tfm-alert-error {
  border-color: #fecaca;
  background: #fff1f2;
}
.tfm-alert-info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

/* Meta */
.tfm-quote-meta {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0;
  color: #334155;
  flex-wrap: wrap;
}

/* Carrier grid */
.tfm-carrier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 0.5rem;
}
.tfm-carrier-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.tfm-carrier-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 12px rgba(2, 6, 23, 0.06);
}
.tfm-carrier-card.is-selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.tfm-carrier-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.tfm-carrier-name {
  font-weight: 600;
  color: #0f172a;
}
.tfm-carrier-scac {
  font-size: 0.85rem;
  color: #64748b;
}

.tfm-price {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: #0f172a;
}
.tfm-tt {
  font-size: 0.9rem;
  color: #475569;
  margin-top: 0.15rem;
}

/* Actions */
.tfm-carrier-actions {
  margin-top: 0.5rem;
}
.tfm-carrier-actions .tfm-select-carrier {
  padding: 0.45rem 0.75rem;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.tfm-carrier-actions .tfm-select-carrier:hover {
  filter: brightness(0.95);
}

/* Submit disabled state */
.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Debug pre block (only shown when TFM_DEBUG true) */
.tfm-pre {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.5rem;
  background: #f7f7f9;
  border: 1px solid #eee;
  border-radius: 6px;
  max-height: 300px;
  overflow: auto;
}

/* Get Rates button style */
.tfm-get-rates {
  background-color: #001689; /* deep blue */
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tfm-get-rates:hover {
  background-color: #0030d0;
}

.tfm-get-rates[disabled],
.tfm-get-rates[aria-busy="true"] {
  background-color: #808080;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Disabled submit styling */
form .frm_submit input[type="submit"].is-disabled {
  background-color: #aaa !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}
