/* ============================================================
   ADFC WordPress Theme — Quotation System Styles
   Product configurator, quote list, form, and thank-you page
   ============================================================ */

/* ── PRODUCT CONFIGURATOR ────────────────────────────────── */
.adfc-configurator {
  background: var(--adfc-bg-surface);
  border: 1px solid var(--adfc-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.adfc-configurator__header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--adfc-border);
}

.adfc-configurator__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  color: var(--adfc-text-main);
  margin-bottom: 0.5rem;
}

.adfc-configurator__title svg {
  color: var(--adfc-blue);
}

.adfc-configurator__desc {
  font-size: 0.875rem;
  color: var(--adfc-text-muted);
  margin: 0;
}

.adfc-configurator__groups {
  display: grid;
  gap: 1.25rem;
}

.adfc-configurator__group {
  background: #FFFFFF;
  border: 1px solid var(--adfc-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color var(--transition-fast);
}

.adfc-configurator__group:focus-within {
  border-color: var(--adfc-blue);
  box-shadow: 0 0 0 3px var(--adfc-blue-tint);
}

.adfc-configurator__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--adfc-text-main);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.adfc-configurator__label .required {
  color: #d63638;
  margin-left: 0.2rem;
}

.adfc-configurator__help {
  font-size: 0.8125rem;
  color: var(--adfc-text-muted);
  margin: -0.25rem 0 0.75rem;
  line-height: 1.5;
}

/* Select (Dropdown) */
.adfc-configurator__select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--adfc-text-main);
  background: #FFFFFF;
  border: 1.5px solid var(--adfc-border);
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A4D54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.adfc-configurator__select:focus {
  border-color: var(--adfc-blue);
  outline: none;
  box-shadow: 0 0 0 3px var(--adfc-blue-tint);
}

/* Text / Number Input */
.adfc-configurator__input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--adfc-text-main);
  background: #FFFFFF;
  border: 1.5px solid var(--adfc-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.adfc-configurator__input:focus {
  border-color: var(--adfc-blue);
  outline: none;
  box-shadow: 0 0 0 3px var(--adfc-blue-tint);
}

/* Radio / Checkbox Groups */
.adfc-configurator__radio-group,
.adfc-configurator__checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.adfc-configurator__radio-item,
.adfc-configurator__checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--adfc-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.adfc-configurator__radio-item:hover,
.adfc-configurator__checkbox-item:hover {
  border-color: var(--adfc-blue);
  background: var(--adfc-blue-light);
}

.adfc-configurator__radio-item input:checked + .adfc-configurator__radio-label,
.adfc-configurator__checkbox-item input:checked + .adfc-configurator__checkbox-label {
  color: var(--adfc-blue);
  font-weight: 600;
}

.adfc-configurator__radio-item:has(input:checked),
.adfc-configurator__checkbox-item:has(input:checked) {
  border-color: var(--adfc-blue);
  background: var(--adfc-blue-light);
}

.adfc-configurator__radio-item input,
.adfc-configurator__checkbox-item input {
  accent-color: var(--adfc-blue);
}

/* Quantity Control */
.adfc-configurator__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--adfc-border);
  flex-wrap: wrap;
}

.adfc-configurator__qty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.adfc-configurator__qty label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--adfc-text-main);
}

.adfc-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--adfc-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.adfc-qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--adfc-bg-alt);
  border: none;
  font-size: 1.2rem;
  color: var(--adfc-text-main);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.adfc-qty-btn:hover {
  background: var(--adfc-blue-light);
  color: var(--adfc-blue);
}

.adfc-qty-input {
  width: 50px;
  height: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--adfc-border);
  border-right: 1px solid var(--adfc-border);
  font-size: 0.9375rem;
  font-weight: 600;
  background: #FFFFFF;
  -moz-appearance: textfield;
}

.adfc-qty-input::-webkit-inner-spin-button,
.adfc-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.adfc-qty-control--small .adfc-qty-btn {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.adfc-qty-control--small .adfc-qty-input {
  width: 40px;
  height: 32px;
  font-size: 0.8125rem;
}

.adfc-add-to-quote-btn {
  flex: 1;
  min-width: 200px;
}

/* ── QUOTE LIST ──────────────────────────────────────────── */
.adfc-quote-list {
  margin: 1rem 0;
}

.adfc-quote-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--adfc-text-muted);
}

.adfc-quote-empty h3 {
  margin: 1.5rem 0 0.5rem;
  color: var(--adfc-text-main);
}

.adfc-quote-empty p {
  margin-bottom: 1.5rem;
}

.adfc-quote-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  background: #FFFFFF;
  border: 1px solid var(--adfc-border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  transition: all var(--transition-fast);
}

.adfc-quote-item:hover {
  border-color: rgba(25, 113, 185, 0.2);
  box-shadow: var(--shadow-sm);
}

.adfc-quote-item__image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--adfc-bg-alt);
}

.adfc-quote-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adfc-quote-item__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adfc-border);
}

.adfc-quote-item__details {
  flex: 1;
  min-width: 0;
}

.adfc-quote-item__title {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.adfc-quote-item__title a {
  color: var(--adfc-text-main);
  transition: color var(--transition-fast);
}

.adfc-quote-item__title a:hover {
  color: var(--adfc-blue);
}

.adfc-quote-item__components {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.adfc-quote-item__comp {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--adfc-blue-light);
  color: var(--adfc-text-body);
  border-radius: var(--radius-pill);
  line-height: 1.4;
}

.adfc-quote-item__qty {
  flex-shrink: 0;
}

.adfc-quote-item__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--adfc-border);
  border-radius: var(--radius-md);
  color: var(--adfc-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.adfc-quote-item__remove:hover {
  background: #FEF2F2;
  border-color: #d63638;
  color: #d63638;
}

.adfc-quote-list__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--adfc-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.adfc-quote-list__count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--adfc-text-muted);
}

.adfc-quote-list__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── QUOTE FORM ──────────────────────────────────────────── */
.adfc-quote-form-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  margin: 1rem 0;
}

.adfc-quote-summary {
  background: var(--adfc-bg-surface);
  border: 1px solid var(--adfc-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 110px;
}

.adfc-quote-summary__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.adfc-quote-summary__title svg {
  color: var(--adfc-blue);
}

.adfc-quote-summary__items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.adfc-quote-summary__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--adfc-border);
  font-size: 0.875rem;
}

.adfc-quote-summary__name {
  font-weight: 500;
  color: var(--adfc-text-main);
}

.adfc-quote-summary__qty {
  color: var(--adfc-text-muted);
  font-size: 0.8125rem;
}

.adfc-quote-summary__edit {
  font-size: 0.8125rem;
  color: var(--adfc-blue);
  font-weight: 600;
}

.adfc-quote-form {
  background: #FFFFFF;
  border: 1px solid var(--adfc-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.adfc-quote-form__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.adfc-quote-form__desc {
  font-size: 0.875rem;
  color: var(--adfc-text-muted);
  margin-bottom: 1.5rem;
}

.adfc-quote-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.adfc-quote-form__field {
  margin-bottom: 1rem;
}

.adfc-quote-form__field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--adfc-text-main);
  margin-bottom: 0.4rem;
}

.adfc-quote-form__field .required {
  color: #d63638;
}

.adfc-quote-form__field input,
.adfc-quote-form__field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--adfc-text-main);
  background: #FFFFFF;
  border: 1.5px solid var(--adfc-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.adfc-quote-form__field input:focus,
.adfc-quote-form__field textarea:focus {
  border-color: var(--adfc-blue);
  outline: none;
  box-shadow: 0 0 0 3px var(--adfc-blue-tint);
}

.adfc-quote-form__submit {
  margin-top: 1.5rem;
}

.adfc-quote-form__disclaimer {
  font-size: 0.75rem;
  color: var(--adfc-text-muted);
  text-align: center;
  margin-top: 0.75rem;
}

.adfc-quote-form__message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  text-align: center;
}

.adfc-quote-form__message.success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.adfc-quote-form__message.error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* ── THANK YOU PAGE ──────────────────────────────────────── */
.adfc-thankyou {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 650px;
  margin: 0 auto;
}

.adfc-thankyou__icon {
  margin-bottom: 1.5rem;
}

.adfc-thankyou__title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--adfc-text-main);
}

.adfc-thankyou__text {
  font-size: 1.0625rem;
  color: var(--adfc-text-body);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.adfc-thankyou__quote-num {
  font-size: 0.875rem;
  color: var(--adfc-blue);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.adfc-thankyou__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ── PRODUCT SPECS TABLE ─────────────────────────────────── */
.adfc-specs-table {
  margin: 2rem 0;
}

.adfc-specs-table__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.adfc-specs-table__title svg {
  color: var(--adfc-blue);
}

.adfc-specs-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--adfc-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.adfc-specs-table th,
.adfc-specs-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  text-align: left;
  border-bottom: 1px solid var(--adfc-border);
}

.adfc-specs-table th {
  width: 200px;
  font-weight: 600;
  color: var(--adfc-text-main);
  background: var(--adfc-bg-surface);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.adfc-specs-table td {
  color: var(--adfc-text-body);
}

.adfc-specs-table tr:last-child th,
.adfc-specs-table tr:last-child td {
  border-bottom: none;
}

/* ── TOAST NOTIFICATION ──────────────────────────────────── */
.adfc-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--adfc-charcoal-dark);
  color: #FFFFFF;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 400px;
}

.adfc-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.adfc-toast.success {
  border-left: 4px solid #10B981;
}

.adfc-toast.error {
  border-left: 4px solid #d63638;
}

.adfc-toast__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  margin-left: auto;
}

/* ── LOADING STATE ───────────────────────────────────────── */
.adfc-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.adfc-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid rgba(25, 113, 185, 0.2);
  border-top-color: var(--adfc-blue);
  border-radius: 50%;
  animation: adfc-spin 0.6s linear infinite;
}

@keyframes adfc-spin {
  to { transform: rotate(360deg); }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .adfc-configurator {
    padding: 1.25rem;
  }

  .adfc-configurator__actions {
    flex-direction: column;
  }

  .adfc-add-to-quote-btn {
    width: 100%;
  }

  .adfc-quote-item {
    flex-wrap: wrap;
  }

  .adfc-quote-item__image {
    width: 60px;
    height: 60px;
  }

  .adfc-quote-form-wrapper {
    grid-template-columns: 1fr;
  }

  .adfc-quote-summary {
    position: static;
  }

  .adfc-quote-form__row {
    grid-template-columns: 1fr;
  }

  .adfc-quote-list__footer {
    flex-direction: column;
    text-align: center;
  }

  .adfc-quote-list__actions {
    width: 100%;
    flex-direction: column;
  }

  .adfc-quote-list__actions .btn {
    width: 100%;
  }
}
