/* Quote & contact form UX — does not alter layout grids */

.tbw-form-extras {
  width: 100%;
}

.tbw-dropzone {
  border: 2px dashed #c5d0d8;
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: #fafbfc;
}

.tbw-dropzone:hover,
.tbw-dropzone:focus-visible,
.tbw-dropzone--active {
  border-color: #1a6b8a;
  background: #f0f7fa;
  outline: none;
}

.tbw-dropzone__icon {
  width: 32px;
  height: 32px;
  fill: #1a6b8a;
  margin-bottom: 0.5rem;
}

.tbw-dropzone__text {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a2b36;
}

.tbw-dropzone__hint {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7c88;
}

.tbw-dropzone__file {
  font-size: 0.85rem;
  color: #1a6b8a;
  font-weight: 600;
  padding: 0.5rem;
}

.tbw-dropzone__progress {
  height: 4px;
  background: #e8ecf0;
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
}

.tbw-dropzone__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: #1a6b8a;
  transition: width 0.15s ease;
}

.tbw-captcha {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tbw-captcha__question {
  font-weight: 600;
  min-width: 6rem;
}

.tbw-captcha__input {
  max-width: 5rem;
}

.tbw-captcha__refresh {
  border: 1px solid #c5d0d8;
  background: #fff;
  border-radius: 6px;
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.15s ease;
}

.tbw-captcha__refresh:hover {
  background: #f0f7fa;
}

.tbw-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
  cursor: pointer;
}

.tbw-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.tbw-check a {
  color: #1a6b8a;
}

.tbw-field-error {
  color: #c0392b;
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
}

.tbw-input-error {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.2);
}

.tbw-form-feedback {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  animation: tbwFadeIn 0.3s ease;
}

.tbw-form-feedback strong {
  display: block;
  margin-bottom: 0.25rem;
}

.tbw-form-feedback p {
  margin: 0;
  opacity: 0.9;
}

.tbw-form-feedback--success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
}

.tbw-form-feedback--error {
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #922b21;
}

.tbw-btn-loading {
  opacity: 0.85;
  pointer-events: none;
}

.tbw-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: tbwSpin 0.6s linear infinite;
  vertical-align: -0.15em;
}

@keyframes tbwSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tbwFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-page__form .tbw-form-extras {
  grid-column: 1 / -1;
}

.product-page__form .tbw-captcha__input {
  flex: 1;
  max-width: none;
}

.tbw-quote-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.tbw-quote-stat {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 16px;
  text-align: center;
}

.tbw-quote-stat strong {
  display: block;
  font-size: 13px;
  color: #50575e;
  margin-bottom: 4px;
}

.tbw-quote-stat span {
  font-size: 28px;
  font-weight: 600;
  color: #1d2327;
}

.tbw-quote-section-title {
  margin: 24px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.tbw-quote-stats--sources {
  margin-bottom: 28px;
}

.tbw-quote-stat--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tbw-quote-stat--link:hover,
.tbw-quote-stat--link:focus {
  border-color: #c97e3a;
  box-shadow: 0 0 0 1px #c97e3a;
}

.tbw-quote-stat--contact small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: #646970;
}

.tbw-quote-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.tbw-quote-tabs {
  margin-bottom: 20px;
}

.tbw-quote-settings-form {
  margin-top: 8px;
  max-width: 820px;
}

.tbw-quote-settings-form .form-table th {
  width: 220px;
}

.tbw-quote-view-btn {
  min-width: 64px;
  text-align: center;
}

.tbw-quote-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  background: #f0f0f1;
  color: #1d2327;
}

.tbw-quote-status--new {
  background: #e8f4fd;
  color: #0a4b78;
}

.tbw-quote-status--in-progress {
  background: #fff8e5;
  color: #8a6d00;
}

.tbw-quote-status--quoted {
  background: #edf7ed;
  color: #1e6b32;
}

.tbw-quote-status--completed {
  background: #f0f0f1;
  color: #50575e;
}

.tbw-quote-detail {
  margin-top: 16px;
}

.tbw-quote-detail__back {
  margin: 0 0 16px;
}

.tbw-quote-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
}

.tbw-quote-detail__title {
  margin: 0 0 6px;
}

.tbw-quote-detail__meta {
  margin: 0;
  color: #646970;
}

.tbw-quote-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 960px) {
  .tbw-quote-detail__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tbw-quote-detail__panel {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 16px 20px 20px;
}

.tbw-quote-detail__panel--full {
  margin-bottom: 16px;
}

.tbw-quote-detail__panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.tbw-quote-detail__table th {
  width: 140px;
  font-weight: 600;
}

.tbw-quote-detail__notes {
  padding: 14px 16px;
  background: #f6f7f7;
  border-radius: 4px;
  line-height: 1.6;
}

.tbw-quote-detail__admin-notes {
  margin: 0;
  padding: 14px 16px;
  background: #f6f7f7;
  border-radius: 4px;
  white-space: pre-wrap;
}

.tbw-quote-detail__timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tbw-quote-detail__timeline li {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f1;
}

.tbw-quote-detail__timeline li:last-child {
  border-bottom: none;
}

.tbw-quote-detail__timeline time {
  display: inline-block;
  margin-left: 8px;
  color: #646970;
  font-size: 13px;
}

.tbw-quote-detail__timeline p {
  margin: 6px 0 0;
  color: #50575e;
}

.tbw-quote-detail__delete {
  margin-top: 8px;
}
