/*
 * RFQ Checkout Styles
 * Request for Quote / Inquiry form page
 */

/* ==========================================================================
   CHECKOUT CONTAINER
   ========================================================================== */

.rfq-checkout {
  padding: 5rem 2rem;
}

.rfq-checkout__container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.rfq-checkout__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.rfq-checkout__title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.rfq-checkout__clear-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0.5rem 0.5rem 0;
  transition: color 0.3s ease;
}

.rfq-checkout__clear-all:hover {
  color: var(--color-primary);
}

.rfq-checkout__subtitle {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin: 0 0 2rem 0;
}

/* ==========================================================================
   PRODUCTS LIST
   ========================================================================== */

.rfq-checkout__products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Single Product Card */
.rfq-product {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--color-white);
  border: 1px solid #e5e7eb;
  position: relative;
}

.rfq-product__image-link {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  background-color: var(--color-bgc-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rfq-product__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: darken;
}

.rfq-product__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 70%;
}

.rfq-product__name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: var(--color-text-primary);
}

.rfq-product__name a {
  color: inherit;
  text-decoration: none;
}

.rfq-product__name a:hover {
  color: var(--color-secondary);
}

.rfq-product__meta {
  font-size: 0.8rem;
  margin: 0;
  color: var(--color-text-secondary);
}

.rfq-product__meta-label {
  color: var(--color-primary);
  font-weight: 500;
}

.rfq-product__meta-value {
  color: var(--color-text-secondary);
}

.rfq-product__remove {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.3s ease;
}

.rfq-product__remove:hover {
  color: #ef4444;
}

/* ==========================================================================
   FORM SECTION
   ========================================================================== */

.rfq-checkout__form-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 2rem;
}

.rfq-checkout__form-intro {
  text-align: center;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  margin: 0 0 2rem 0;
}

/* Form Grid */
.rfq-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.rfq-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rfq-form__field--full {
  grid-column: 1 / -1;
}

.rfq-form__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.rfq-form__label .required {
  color: #ef4444;
}

.rfq-form__input,
.rfq-form__textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  font-family: inherit;
  background-color: var(--color-white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rfq-form__input:focus,
.rfq-form__textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(10, 189, 194, 0.1);
}

.rfq-form__input::placeholder,
.rfq-form__textarea::placeholder {
  color: #9ca3af;
}

.rfq-form__textarea {
  resize: vertical;
  min-height: 100px;
}

/* Consent Checkbox */
.rfq-form__consent {
  margin: 1.5rem 0;
}

.rfq-form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.5;
}

.rfq-form__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rfq-form__checkbox-mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  background-color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.rfq-form__checkbox:checked + .rfq-form__checkbox-mark {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.rfq-form__checkbox:checked + .rfq-form__checkbox-mark::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.rfq-form__checkbox:focus + .rfq-form__checkbox-mark {
  box-shadow: 0 0 0 3px rgba(10, 189, 194, 0.2);
}

.rfq-form__checkbox-text {
  color: var(--color-text-secondary);
}

.rfq-form__checkbox-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.rfq-form__checkbox-text a:hover {
  color: var(--color-secondary);
}

/* Submit Button */
.rfq-form__submit {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.rfq-form__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-white);
  background-color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.rfq-form__button:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.rfq-form__button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.rfq-checkout__empty {
  text-align: center;
  padding: 4rem 2rem;
}

.rfq-checkout__empty-text {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin: 0 0 1.5rem 0;
}

.rfq-checkout__empty-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.rfq-checkout__empty-link:hover {
  color: var(--color-secondary);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
  .rfq-checkout__products {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .rfq-checkout {
    padding: 3rem 1.25rem;
  }

  .rfq-checkout__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .rfq-checkout__title {
    font-size: 1.5rem;
  }

  .rfq-form__grid {
    grid-template-columns: 1fr;
  }

  .rfq-product {
    padding: 0.75rem;
  }

  .rfq-product__image-link {
    width: 80px;
    height: 80px;
  }

  .rfq-product__name {
    font-size: 0.9rem;
  }

  .rfq-checkout__form-intro {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .rfq-product__image-link {
    width: 70px;
    height: 70px;
  }

  .rfq-form__button {
    width: 100%;
  }
}
