/*
 * Intaj Sports Quote System v2 — Complete Stylesheet
 *
 * CRITICAL FIX: --red-light was undefined causing transparent hover state.
 * All button colours are now driven by admin-settings-generated CSS variables
 * with explicit hex fallbacks so no button state can ever become invisible.
 *
 * Covers:
 *   .iq-atq-btn          — Add to Quote button (product page + archive cards + LFF)
 *   .iq-counter-wrap     — Header counter icon + badge
 *   .iq-drawer           — Slide-out quote drawer
 *   .iq-rfq-*            — Quote Request page
 *   .iq-toast            — Toast notification
 *   .iq-lff-atq          — Latest From Factory overlay button
 *   .iq-apc-atq          — Archive product card bottom button
 */

/* ── 0. Define ALL variables with explicit fallbacks ─────────────────────── */
:root {
  /* These are overridden by the inline style block generated by quote-loader.php */
  --iq-btn-bg          : #e8293a;
  --iq-btn-color       : #ffffff;
  --iq-btn-hover-bg    : #c0001a;   /* ← was --red-light (undefined). Now explicit. */
  --iq-btn-hover-color : #ffffff;
  --iq-counter-bg      : #e8293a;
  --iq-counter-color   : #ffffff;

  /* System tokens */
  --iq-navy  : #0d1b2e;
  --iq-gold  : var(--gold, #c9922a);
  --iq-gold2 : var(--gold-light, #d4aa4a);
  --iq-dark  : #0a0f1a;
  --iq-white : #ffffff;
  --iq-r     : 8px;
  --iq-tr    : .18s ease;
  --iq-shadow: 0 20px 60px rgba(0,0,0,.45);
}

/* ── 1. Add to Quote button — ALL states ─────────────────────────────────── */

/*
 * This button intentionally does NOT use WooCommerce's <a class="button">
 * because the archive cards wrap the entire card in an <a> tag.
 * Instead it uses data-product-id and JS click delegation, which is valid.
 * On the product page it is a standalone <button>.
 */

.iq-atq-btn {
  /* Layout */
  display         : inline-flex;
  align-items     : center;
  justify-content : center;
  gap             : 8px;
  width           : 100%;
  padding         : 14px 20px;
  box-sizing      : border-box;

  /* Typography */
  font-family     : var(--ff-display, -apple-system, sans-serif);
  font-size       : 11px;
  font-weight     : 800;
  letter-spacing  : .12em;
  text-transform  : uppercase;
  text-decoration : none;
  line-height     : 1;
  white-space     : nowrap;

  /* Appearance — defaults, overridden by inline vars from admin settings */
  background      : var(--iq-btn-bg) !important;
  color           : var(--iq-btn-color) !important; /* Override any theme color rule */
  border          : 2px solid transparent;
  border-radius   : 0 !important;
  cursor          : pointer;
  outline         : none;
  position        : relative;
  overflow        : hidden;
  transition      : background var(--iq-tr), color var(--iq-tr),
                    border-color var(--iq-tr), transform var(--iq-tr),
                    box-shadow var(--iq-tr);
}

/* ── HOVER — explicit hex fallback prevents invisible button ── */
.iq-atq-btn:hover {
  background   : var(--iq-btn-hover-bg) !important;   /* Never empty — has a hex fallback */
  color        : var(--iq-btn-hover-color) !important;
  border-color : transparent;
  box-shadow   : 0 4px 16px rgba(0,0,0,.2);
}

/* ── FOCUS (keyboard) ── */
.iq-atq-btn:focus-visible {
  outline       : 3px solid var(--iq-btn-bg);
  outline-offset: 3px;
}

/* ── ACTIVE / PRESSED ── */
.iq-atq-btn:active {
  transform : scale(.97);
  box-shadow: none;
}

/* ── LOADING ── */
.iq-atq-btn.iq-loading {
  pointer-events : none;
  opacity        : .75;
  cursor         : wait;
}

/* ── ADDED STATE (green) — cannot be confused with hover ── */
.iq-atq-btn.iq-added {
  background   : #16a34a !important;
  color        : #ffffff !important;
  border-color : transparent;
}
.iq-atq-btn.iq-added:hover {
  background   : #15803d !important;
  color        : #ffffff !important;
}

/* ── DISABLED ── */
.iq-atq-btn:disabled,
.iq-atq-btn[disabled] {
  opacity        : .45;
  cursor         : not-allowed;
  pointer-events : none;
}

/* ── ICON / SPINNER ── */
.iq-atq-btn .iq-btn-icon {
  flex-shrink : 0;
  width       : 15px;
  height      : 15px;
}
.iq-atq-btn .iq-btn-spinner {
  animation   : iq-spin .7s linear infinite;
  flex-shrink : 0;
}
@keyframes iq-spin { to { transform: rotate(360deg); } }

/* ── Card variant (archive + LFF) — slightly more compact ── */
.iq-atq-btn--card {
  padding         : 10px 14px;
  font-size       : 10px;
  border-radius   : 0 !important;
  width           : auto;
  min-height      : 39px;
}

/* ── Full-width page variant ── */
.iq-atq-btn--page {
  border-radius   : 0 !important;
  font-size       : 13px;
  letter-spacing  : .08em;
  padding         : 16px 24px;
}

/* ── 2. Archive / category card quote button ─────────────────────────────
 *
 * Cards use content-product.php which places .ipc-quote OUTSIDE the <a> link.
 * The .ipc-quote div is block-level and stretches full card width.
 * The button needs to be constrained to its content width.
 */
.ipc-quote {
  padding     : 10px 10px 10px;
  /* flex makes the span shrink to content width */
  display     : flex;
  align-items : center;
  justify-content: stretch;
}

.ipc-quote .iq-atq-btn {
  width           : 100%;        /* fill the flex container */
  flex            : 1 1 auto;
  padding         : 9px 12px;
  font-size       : 10px;
  letter-spacing  : .08em;
  border-radius   : 0 !important;
  white-space     : nowrap;
  overflow        : hidden;
  text-overflow   : ellipsis;
}

/* apc-footer (archive-product.php variant) */
.apc-footer .iq-atq-btn {
  width           : auto;
  flex            : 1;
  padding         : 8px 12px;
  font-size       : 10px;
  letter-spacing  : .08em;
  border-radius   : 0 !important;
  background      : #181918 !important;
  color           : #fff !important;
}
.apc-footer .button.iq-atq-btn,
.apc-footer a.button.iq-atq-btn {
  background : var(--iq-btn-bg) !important;
  color      : var(--iq-btn-color) !important;
}
.apc-footer .button.iq-atq-btn:hover,
.apc-footer a.button.iq-atq-btn:hover {
  background : var(--iq-btn-hover-bg) !important;
  color      : var(--iq-btn-hover-color) !important;
}

/* ── 3. Latest From Factory card integration ────────────────────────────────
 *
 * The LFF section uses <a class="fp-lff-card"> wrapping the whole card.
 * We replace the "Request Sample" <span class="fp-lff-cta"> with a
 * <span class="iq-lff-atq" data-product-id="..."> that JS handles.
 * Using span avoids nested interactive element issues.
 */
.iq-lff-atq {
  display         : inline-flex;
  align-items     : center;
  gap             : 7px;
  font-size       : 11px;
  font-weight     : 700;
  letter-spacing  : .1em;
  text-transform  : uppercase;
  color           : var(--iq-btn-bg);
  cursor          : pointer;
  padding         : 6px 0;
  transition      : color var(--iq-tr), gap var(--iq-tr);
  border-bottom   : 1px solid transparent;
}
.iq-lff-atq:hover {
  color       : var(--iq-btn-hover-bg);
  gap         : 10px;
}
.iq-lff-atq.iq-added {
  color : #16a34a;
}
.fp-lff-card:hover .iq-lff-atq {
  gap         : 9px;
  border-color: var(--iq-btn-bg);
}

/* ── 4. Counter badge ────────────────────────────────────────────────────── */
.iq-counter-wrap {
  position    : relative;
  display     : inline-flex;
  align-items : center;
  gap         : 6px;
  cursor      : pointer;
  padding     : 6px 8px;
  border-radius: 8px;
  border      : 1px solid rgba(255,255,255,.12);
  color       : var(--white, #fff);
  transition  : background var(--iq-tr);
  background  : transparent;
}
.header-cart.iq-counter-wrap {
  /* header.php adds both classes; ensure positioning context exists */
  position : relative;
  overflow  : visible !important;
}
.iq-counter-wrap:hover {
  background : rgba(255,255,255,.06);
}
.iq-counter-wrap svg {
  width  : 20px;
  height : 20px;
  flex-shrink: 0;
}
.iq-counter-badge {
  position      : absolute;
  top           : -10px;
  right         : -10px;
  min-width     : 22px;
  height        : 22px;
  background    : var(--iq-counter-bg);
  color         : var(--iq-counter-color);
  border-radius : 100px;
  font-size     : 12px;
  font-weight   : 800;
  line-height   : 1;
  text-align    : center;
  padding       : 3px 5px;
  box-sizing    : content-box;
  font-family   : var(--ff-display, -apple-system, sans-serif);
  display       : none;
  border        : 2.5px solid #0a0f1a;
  box-shadow    : 0 2px 6px rgba(0,0,0,.5);
  z-index       : 10;
  letter-spacing: 0;
}
.iq-counter-badge.visible { display: inline-flex; align-items: center; justify-content: center; }
.iq-counter-badge.iq-pulse    { animation: iq-badge-pulse .3s ease; }
@keyframes iq-badge-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.iq-counter-label {
  font-size    : 11px;
  font-weight  : 700;
  letter-spacing: .05em;
  display      : none;
}
@media (min-width: 1100px) { .iq-counter-label { display: inline; } }

/* ── "View Quote List →" transformed link — inherits iq-added green ── */
a.iq-view-list-link {
  text-decoration : none;
  display         : inline-flex;
  align-items     : center;
  justify-content : center;
  gap             : 8px;
  text-align      : center;
}
a.iq-view-list-link.iq-atq-btn--page {
  width        : 100%;
  box-sizing   : border-box;
}
a.iq-view-list-link.iq-atq-btn--card {
  width        : 100%;
}
a.iq-view-list-link.iq-lff-atq {
  color        : #16a34a;
  font-weight  : 700;
}
a.iq-view-list-link.iq-lff-atq:hover {
  color        : #15803d;
}

/* ── 5. Drawer ───────────────────────────────────────────────────────────── */
.iq-drawer-overlay {
  position       : fixed;
  inset          : 0;
  background     : rgba(0,0,0,.55);
  z-index        : 9998;
  opacity        : 0;
  pointer-events : none;
  transition     : opacity .25s ease;
  backdrop-filter: blur(2px);
}
.iq-drawer-overlay.open {
  opacity        : 1;
  pointer-events : all;
}

.iq-drawer {
  position   : fixed;
  top        : 0;
  right      : 0;
  bottom     : 0;
  width      : 420px;
  max-width  : 100vw;
  background : var(--iq-navy);
  z-index    : 9999;
  display    : flex;
  flex-direction: column;
  transform  : translateX(100%);
  transition : transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow : var(--iq-shadow);
  border-left: 1px solid rgba(255,255,255,.08);
}
.iq-drawer.open { transform: translateX(0); }

.iq-drawer-head {
  display         : flex;
  align-items     : center;
  justify-content : space-between;
  padding         : 20px 22px;
  border-bottom   : 1px solid rgba(255,255,255,.08);
  flex-shrink     : 0;
}
.iq-drawer-head-title {
  font-family : var(--ff-display, sans-serif);
  font-size   : 16px;
  font-weight : 800;
  color       : var(--iq-white);
}
.iq-drawer-head-count {
  font-size : 12px;
  color     : rgba(255,255,255,.45);
  margin-top: 2px;
}
.iq-drawer-close {
  background    : none;
  border        : 1px solid rgba(255,255,255,.14);
  border-radius : 8px;
  padding       : 7px;
  cursor        : pointer;
  color         : rgba(255,255,255,.6);
  display       : flex;
  align-items   : center;
  transition    : border-color var(--iq-tr), color var(--iq-tr);
}
.iq-drawer-close:hover { border-color: rgba(255,255,255,.4); color: var(--iq-white); }

.iq-drawer-body {
  flex     : 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.iq-drawer-body::-webkit-scrollbar { width: 5px; }
.iq-drawer-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 100px; }

/* Empty state */
.iq-drawer-empty {
  display        : flex;
  flex-direction : column;
  align-items    : center;
  justify-content: center;
  text-align     : center;
  padding        : 56px 32px;
  color          : rgba(255,255,255,.4);
  gap            : 12px;
}
.iq-drawer-empty svg { opacity: .25; }
.iq-drawer-empty p   { margin: 0; font-size: 13px; line-height: 1.65; }

/* Items list */
.iq-drawer-items { list-style: none; margin: 0; padding: 0; }
.iq-drawer-item {
  display         : flex;
  align-items     : flex-start;
  gap             : 13px;
  padding         : 15px 22px;
  border-bottom   : 1px solid rgba(255,255,255,.055);
  transition      : background var(--iq-tr);
}
.iq-drawer-item:hover { background: rgba(255,255,255,.02); }
.iq-drawer-img-link   { flex-shrink: 0; }
.iq-drawer-img {
  width        : 58px;
  height       : 58px;
  object-fit   : cover;
  border-radius: 8px;
  border       : 1px solid rgba(255,255,255,.07);
  display      : block;
}
.iq-drawer-item-info { flex: 1; min-width: 0; }
.iq-drawer-item-name {
  display        : block;
  font-size      : 13px;
  font-weight    : 700;
  color          : var(--iq-white);
  text-decoration: none;
  overflow       : hidden;
  text-overflow  : ellipsis;
  white-space    : nowrap;
  margin-bottom  : 3px;
}
.iq-drawer-item-name:hover { color: var(--iq-gold2); }
.iq-drawer-item-cat {
  display      : block;
  font-size    : 10px;
  color        : rgba(255,255,255,.38);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.iq-drawer-item-actions {
  display     : flex;
  align-items : center;
  gap         : 12px;
}
.iq-drawer-qty-label {
  display     : flex;
  align-items : center;
  gap         : 5px;
  font-size   : 11px;
  color       : rgba(255,255,255,.45);
  font-weight : 600;
}
.iq-drawer-qty-input {
  width       : 58px;
  padding     : 4px 7px;
  background  : rgba(255,255,255,.06);
  border      : 1px solid rgba(255,255,255,.11);
  border-radius: 6px;
  color       : var(--iq-white);
  font-size   : 13px;
  font-weight : 700;
  text-align  : center;
}
.iq-drawer-qty-input:focus { outline: none; border-color: var(--iq-gold); }
.iq-drawer-remove {
  background    : none;
  border        : none;
  cursor        : pointer;
  color         : rgba(255,255,255,.28);
  display       : flex;
  align-items   : center;
  gap           : 4px;
  font-size     : 11px;
  padding       : 3px;
  border-radius : 4px;
  transition    : color var(--iq-tr);
}
.iq-drawer-remove:hover { color: #ef4444; }

/* Drawer footer */
.iq-drawer-footer {
  padding     : 18px 22px;
  border-top  : 1px solid rgba(255,255,255,.08);
  flex-shrink : 0;
  background  : rgba(255,255,255,.01);
}
.iq-drawer-summary {
  font-size   : 12px;
  color       : rgba(255,255,255,.45);
  text-align  : center;
  margin-bottom: 14px;
}
.iq-drawer-submit-btn {
  display         : flex;
  align-items     : center;
  justify-content : center;
  gap             : 8px;
  width           : 100%;
  padding         : 14px 20px;
  background      : var(--iq-gold);
  color           : var(--iq-dark) !important;
  font-family     : var(--ff-display, sans-serif);
  font-size       : 12px;
  font-weight     : 800;
  letter-spacing  : .1em;
  text-transform  : uppercase;
  text-decoration : none;
  border-radius   : 8px;
  transition      : background var(--iq-tr);
  margin-bottom   : 10px;
}
.iq-drawer-submit-btn:hover { background: var(--iq-gold2); color: var(--iq-dark) !important; }
.iq-drawer-clear-btn {
  display     : block;
  width       : 100%;
  padding     : 8px;
  background  : none;
  border      : none;
  color       : rgba(255,255,255,.3);
  font-size   : 12px;
  text-align  : center;
  cursor      : pointer;
  transition  : color var(--iq-tr);
}
.iq-drawer-clear-btn:hover { color: #ef4444; }

/* ── 6. Toast ────────────────────────────────────────────────────────────── */
#iq-toast {
  position     : fixed;
  bottom       : 28px;
  left         : 50%;
  transform    : translateX(-50%);
  background   : #0d1b2e;
  border       : 1px solid var(--iq-gold);
  color        : #fff;
  padding      : 11px 22px;
  border-radius: 100px;
  font-size    : 13px;
  font-weight  : 600;
  z-index      : 10001;
  box-shadow   : 0 6px 28px rgba(0,0,0,.45);
  animation    : iq-toast-in .22s ease;
  white-space  : nowrap;
  max-width    : calc(100vw - 48px);
  pointer-events: none;
}
#iq-toast.iq-toast-error { border-color: #ef4444; background: #1a0b0b; }
@keyframes iq-toast-in {
  from { opacity:0; transform:translateX(-50%) translateY(14px); }
  to   { opacity:1; transform:translateX(-50%) translateY(0); }
}

/* ── 7. RFQ (Quote Request) Page ─────────────────────────────────────────── */
.iq-rfq-main { padding: 48px 0 80px; min-height: 60vh; }
.iq-rfq-header { margin-bottom: 40px; }
.iq-rfq-title {
  font-family : var(--ff-display, sans-serif);
  font-size   : clamp(28px, 4vw, 44px);
  font-weight : 800;
  color       : var(--navy, #0f2245);
  margin      : 12px 0 14px;
  line-height : 1.1;
}
.iq-rfq-sub { font-size: 16px; color: var(--text-muted, #6b7280); max-width: 680px; line-height: 1.7; }

/* Empty state */
.iq-rfq-empty { text-align: center; padding: 80px 20px; color: var(--text-muted, #6b7280); }
.iq-rfq-empty svg { margin: 0 auto 20px; opacity: .3; display: block; }
.iq-rfq-empty h2 { font-size: 22px; font-weight: 700; color: var(--navy, #0f2245); margin-bottom: 12px; }
.iq-rfq-empty p  { font-size: 15px; margin-bottom: 24px; }
.iq-rfq-back-btn {
  display         : inline-block;
  padding         : 12px 28px;
  background      : var(--iq-btn-bg);
  color           : var(--iq-btn-color) !important;
  font-weight     : 700;
  font-size       : 13px;
  text-decoration : none;
  border-radius   : 8px;
  transition      : background var(--iq-tr);
}
.iq-rfq-back-btn:hover { background: var(--iq-btn-hover-bg); }

/* Layout */
.iq-rfq-layout { display: grid; grid-template-columns: 1fr 1.35fr; gap: 40px; align-items: start; }
.iq-rfq-col-title {
  font-family  : var(--ff-display, sans-serif);
  font-size    : 15px;
  font-weight  : 800;
  color        : var(--navy, #0f2245);
  display      : flex;
  align-items  : center;
  gap          : 8px;
  margin       : 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--iq-btn-bg);
}

/* Product list */
.iq-rfq-items { display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.iq-rfq-item {
  display         : flex;
  align-items     : center;
  gap             : 13px;
  padding         : 13px 15px;
  border-bottom   : 1px solid #f3f4f6;
  background      : #fff;
  transition      : background var(--iq-tr);
}
.iq-rfq-item:last-child { border-bottom: none; }
.iq-rfq-item:hover { background: #fafafa; }
.iq-rfq-item-img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; flex-shrink: 0; }
.iq-rfq-item-info { flex: 1; min-width: 0; }
.iq-rfq-item-name { display: block; font-size: 13px; font-weight: 700; color: var(--navy, #0f2245); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; }
.iq-rfq-item-name:hover { color: var(--iq-btn-bg); }
.iq-rfq-item-sku, .iq-rfq-item-cat { font-size: 11px; color: #9ca3af; margin-right: 8px; }
.iq-rfq-item-qty-wrap { flex-shrink: 0; text-align: center; }
.iq-rfq-qty-label { font-size: 10px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 4px; }
.iq-rfq-qty-input { width: 70px; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-weight: 700; text-align: center; color: var(--navy, #0f2245); }
.iq-rfq-qty-input:focus { outline: none; border-color: var(--iq-btn-bg); box-shadow: 0 0 0 3px rgba(232,41,58,.1); }
.iq-rfq-item-remove { background: none; border: none; cursor: pointer; color: #d1d5db; padding: 5px; border-radius: 5px; display: flex; align-items: center; transition: color var(--iq-tr); }
.iq-rfq-item-remove:hover { color: #ef4444; }

.iq-rfq-products-footer { margin-bottom: 14px; }
.iq-rfq-add-more-btn { background: none; border: 1px solid #d1d5db; color: #6b7280; padding: 8px 15px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: border-color var(--iq-tr), color var(--iq-tr); }
.iq-rfq-add-more-btn:hover { border-color: var(--iq-btn-bg); color: var(--iq-btn-bg); }

.iq-rfq-wa-cta { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f3f4f6; }
.iq-rfq-wa-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #16a34a; text-decoration: none; transition: opacity var(--iq-tr); }
.iq-rfq-wa-link:hover { opacity: .75; }

/* Form */
.iq-rfq-form-col { position: sticky; top: calc(var(--header-h) + 16px); }
.iq-rfq-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 22px; }
.iq-rfq-field { display: flex; flex-direction: column; gap: 6px; }
.iq-rfq-field--full { grid-column: 1 / -1; }
.iq-rfq-field label { font-size: 12px; font-weight: 700; color: #374151; letter-spacing: .03em; }
.iq-rfq-field label span { color: var(--iq-btn-bg); }
.iq-rfq-field input,
.iq-rfq-field select,
.iq-rfq-field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #d1d5db; border-radius: 9px;
  font-size: 14px; color: #111; background: #fff; transition: border-color var(--iq-tr), box-shadow var(--iq-tr); font-family: inherit;
}
.iq-rfq-field input:focus,
.iq-rfq-field select:focus,
.iq-rfq-field textarea:focus {
  outline: none; border-color: var(--iq-btn-bg); box-shadow: 0 0 0 3px rgba(232,41,58,.1);
}
.iq-rfq-field textarea { resize: vertical; min-height: 110px; }

/* File upload */
.iq-rfq-upload-area { border: 2px dashed #d1d5db; border-radius: 11px; background: #fafafa; overflow: hidden; transition: border-color var(--iq-tr), background var(--iq-tr); }
.iq-rfq-upload-area.dragover { border-color: var(--iq-btn-bg); background: rgba(232,41,58,.03); }
.iq-rfq-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.iq-rfq-upload-label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px 18px; cursor: pointer; color: #9ca3af; text-align: center; transition: color var(--iq-tr); }
.iq-rfq-upload-label:hover { color: var(--iq-btn-bg); }
.iq-rfq-upload-label span:first-of-type { font-size: 14px; font-weight: 600; }
.iq-rfq-upload-meta { font-size: 11px; opacity: .7; }
.iq-rfq-file-list { padding: 0 15px; font-size: 12px; }
.iq-rfq-file-list:not(:empty) { padding-bottom: 10px; }
.iq-rfq-file-entry { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-top: 1px solid #f3f4f6; color: #374151; gap: 8px; }
.iq-rfq-file-entry .iq-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iq-rfq-file-entry .iq-file-size { color: #9ca3af; flex-shrink: 0; }

/* RFQ Submit button — same crisp states as ATQ button */
.iq-rfq-footer { text-align: center; }
.iq-rfq-submit-btn {
  display         : inline-flex;
  align-items     : center;
  justify-content : center;
  gap             : 10px;
  width           : 100%;
  padding         : 16px 26px;
  background      : var(--iq-gold);
  color           : #0a0f1a !important;
  border          : none;
  border-radius   : 9px;
  font-family     : var(--ff-display, sans-serif);
  font-size       : 13px;
  font-weight     : 800;
  letter-spacing  : .1em;
  text-transform  : uppercase;
  cursor          : pointer;
  transition      : background var(--iq-tr), transform var(--iq-tr);
  margin-bottom   : 13px;
}
.iq-rfq-submit-btn:hover   { background: var(--iq-gold2); }
.iq-rfq-submit-btn:active  { transform: scale(.98); }
.iq-rfq-submit-btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.iq-spinner { animation: iq-spin .8s linear infinite; }
.iq-rfq-footer-note { font-size: 12px; color: #9ca3af; margin: 0; line-height: 1.65; }

.iq-rfq-response { padding: 14px 17px; border-radius: 9px; font-size: 14px; line-height: 1.65; margin-top: 15px; }
.iq-rfq-response.success { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.iq-rfq-response.error   { background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626; }

/* ── 8. Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .iq-rfq-layout { grid-template-columns: 1fr; }
  .iq-rfq-form-col { position: static; }
}
@media (max-width: 640px) {
  .iq-rfq-fields { grid-template-columns: 1fr; }
  .iq-rfq-field--full { grid-column: 1; }
  .iq-drawer { width: 100%; }
}

/* ── 9. Archive card and non-archive button overrides ──────────────────────
 * Migrated from Additional CSS. Selectors .iq-atq-btn.iq-added and
 * .iq-atq-btn.iq-added:hover are already defined above at lines 110-118
 * and are not repeated here.
 */

/* Archive footer (apc-footer) — dark hover, not the admin-configured red */
.apc-footer .iq-atq-btn:hover { background: #2d2f2d !important; color: #fff !important; }

/* "View Quote List" transformed link — always green in both states */
a.iq-view-list-link.iq-atq-btn       { background: #16a34a !important; color: #fff !important; }
a.iq-view-list-link.iq-atq-btn:hover { background: #15803d !important; color: #fff !important; }

/* Non-archive-footer buttons — explicit red fallback to beat any plugin inline styles */
.iq-atq-btn:not(.apc-footer .iq-atq-btn)       { background: #e8293a !important; color: #fff !important; }
.iq-atq-btn:not(.apc-footer .iq-atq-btn):hover { background: #c0001a !important; color: #fff !important; }

/* Archive card and ipc-quote — square corners on all interaction states */
.apc-footer .iq-atq-btn,
.apc-footer .iq-atq-btn:hover,
.apc-footer .iq-atq-btn:focus,
.apc-footer .iq-atq-btn:active,
.apc-footer .iq-atq-btn:visited,
.apc-footer a.iq-view-list-link,
.apc-footer a.iq-view-list-link:hover,
.apc-footer a.iq-view-list-link:focus,
.apc-footer a.iq-view-list-link:active,
.apc-footer a.iq-view-list-link:visited,
.ipc-quote .iq-atq-btn,
.ipc-quote .iq-atq-btn:hover,
.ipc-quote .iq-atq-btn:focus,
.ipc-quote .iq-atq-btn:active,
.ipc-quote .iq-atq-btn:visited,
.ipc-quote a.iq-view-list-link,
.ipc-quote a.iq-view-list-link:hover,
.ipc-quote a.iq-view-list-link:focus,
.ipc-quote a.iq-view-list-link:active,
.ipc-quote a.iq-view-list-link:visited { border-radius: 0 !important; }