/**
 * Blossom B2B Core - Plugin Styles
 * Styles for wholesale forms, volume pricing, delivery calendar, etc.
 */

/* ==========================================================================
   Wholesale Application Form
   ========================================================================== */

.bp-wholesale-form-wrap {
  max-width: 720px;
  margin: 2rem auto;
}

.bp-wholesale-form {
  background: var(--bp-white);
  border-radius: var(--bp-radius-lg);
  box-shadow: var(--bp-shadow-lg);
  overflow: hidden;
}

.bp-wholesale-form__header {
  padding: 2rem 2rem 1rem;
  text-align: center;
}

.bp-wholesale-form__header h2 {
  font-size: 1.5rem;
  color: var(--bp-gray-800);
  margin: 0 0 0.25rem;
}

.bp-wholesale-form__header p {
  color: var(--bp-gray-500);
  margin: 0;
}

.bp-wholesale-form__body {
  padding: 1.5rem 2rem 2rem;
}

/* Steps indicator */
.bp-steps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--bp-gray-200);
}

.bp-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.bp-step--active,
.bp-step--completed {
  opacity: 1;
}

.bp-step__number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bp-gray-200);
  color: var(--bp-gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.bp-step--active .bp-step__number {
  background: var(--bp-green-dark);
  color: white;
}

.bp-step--completed .bp-step__number {
  background: var(--bp-green-accent);
  color: white;
}

.bp-step__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bp-gray-600);
}

/* Form steps */
.bp-form-step {
  display: none;
}

.bp-form-step--active {
  display: block;
}

.bp-form-step h3 {
  font-size: 1.1rem;
  margin: 0 0 1.5rem;
  color: var(--bp-gray-800);
}

/* Form fields */
.bp-form-row {
  margin-bottom: 1rem;
}

.bp-form-row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.bp-form-field {
  margin-bottom: 1rem;
}

.bp-form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bp-gray-700);
  margin-bottom: 0.375rem;
}

.bp-form-field label .required {
  color: var(--bp-red);
}

.bp-form-field input,
.bp-form-field select,
.bp-form-field textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--bp-gray-300);
  border-radius: var(--bp-radius-md);
  font-size: 0.9rem;
  font-family: var(--bp-font-primary);
  transition: border-color 0.2s;
  background: var(--bp-white);
}

.bp-form-field input:focus,
.bp-form-field select:focus,
.bp-form-field textarea:focus {
  outline: none;
  border-color: var(--bp-green-accent);
  box-shadow: 0 0 0 3px rgba(45, 107, 74, 0.1);
}

.bp-form-field input.bp-field-error,
.bp-form-field select.bp-field-error {
  border-color: var(--bp-red);
}

.bp-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bp-gray-200);
}

/* Review section */
.bp-review-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bp-gray-100);
  border-radius: var(--bp-radius-md);
}

.bp-review-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bp-gray-700);
  margin: 0 0 0.5rem;
}

.bp-review-section p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: var(--bp-gray-600);
}

/* Benefits sidebar */
.bp-wholesale-benefits {
  padding: 1rem;
  background: var(--bp-cream);
  border-radius: var(--bp-radius-md);
  margin-bottom: 1.5rem;
}

.bp-wholesale-benefits h4 {
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.bp-wholesale-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bp-wholesale-benefits li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.85rem;
  color: var(--bp-gray-700);
}

/* Success state */
.bp-form-success {
  text-align: center;
  padding: 2rem 0;
}

.bp-success-icon {
  margin-bottom: 1rem;
}

/* ==========================================================================
   Volume Pricing Table
   ========================================================================== */

.bp-volume-pricing {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bp-cream);
  border-radius: var(--bp-radius-md);
  border: 1px solid var(--bp-cream-dark);
}

.bp-volume-pricing__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bp-green-dark);
  margin: 0 0 0.75rem;
}

.bp-volume-pricing__table {
  width: 100%;
  border-collapse: collapse;
}

.bp-volume-pricing__table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bp-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--bp-gray-200);
}

.bp-volume-pricing__table td {
  padding: 0.625rem 0.75rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--bp-gray-100);
}

.bp-volume-pricing__table tr:last-child td {
  border-bottom: none;
}

.bp-tier-range {
  color: var(--bp-gray-700);
}

.bp-tier-price {
  font-weight: 600;
  color: var(--bp-gray-800);
}

.bp-tier-savings {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bp-green-accent);
  color: white;
  border-radius: var(--bp-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* ==========================================================================
   Delivery Section (Checkout)
   ========================================================================== */

.bp-delivery-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bp-gray-100);
  border-radius: var(--bp-radius-md);
  border: 1px solid var(--bp-gray-200);
}

.bp-delivery-section h3 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: var(--bp-gray-800);
}

.bp-delivery-method-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bp-gray-700);
  margin-bottom: 0.5rem;
}

.bp-delivery-method-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bp-white);
  border: 1px solid var(--bp-gray-200);
  border-radius: var(--bp-radius-md);
  cursor: pointer;
  transition: border-color 0.2s;
}

.bp-delivery-method-option:hover {
  border-color: var(--bp-green-accent);
}

.bp-delivery-method-option
  input[type="radio"]:checked
  + .bp-delivery-method-info {
  color: var(--bp-green-dark);
}

.bp-delivery-method-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.bp-delivery-method-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.bp-delivery-method-price {
  font-weight: 600;
  color: var(--bp-green-dark);
}

/* ==========================================================================
   Reorder & Favorites (My Account)
   ========================================================================== */

.bp-reorder__header,
.bp-favorites__header {
  margin-bottom: 1.5rem;
}

.bp-reorder__header h2,
.bp-favorites__header h2 {
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.bp-reorder__header p,
.bp-favorites__header p {
  color: var(--bp-gray-500);
  margin: 0;
}

.bp-reorder__table {
  width: 100%;
  border-collapse: collapse;
}

.bp-reorder__table th {
  text-align: left;
  padding: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bp-gray-500);
  text-transform: uppercase;
  border-bottom: 2px solid var(--bp-gray-200);
}

.bp-reorder__table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--bp-gray-100);
  font-size: 0.9rem;
}

.bp-favorites__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* Empty states */
.bp-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--bp-gray-500);
}

.bp-empty-state p {
  margin: 0.5rem 0;
}

.bp-empty-state .bp-btn {
  margin-top: 1rem;
}

/* ==========================================================================
   Quote Request Button
   ========================================================================== */

.bp-quote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent !important;
  border: 1px solid var(--bp-gray-300) !important;
  color: var(--bp-gray-700) !important;
  font-size: 0.9rem !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--bp-radius-md) !important;
  cursor: pointer;
  transition: all 0.2s;
}

.bp-quote-btn:hover {
  border-color: var(--bp-green-accent) !important;
  color: var(--bp-green-dark) !important;
}

/* ==========================================================================
   Cart Savings
   ========================================================================== */

.bp-savings {
  color: var(--bp-green-accent);
  font-weight: 600;
}

/* ==========================================================================
   Notices
   ========================================================================== */

.bp-notice {
  padding: 1rem 1.5rem;
  border-radius: var(--bp-radius-md);
  margin-bottom: 1.5rem;
}

.bp-notice--info {
  background: #e8f4fd;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.bp-notice--success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.bp-notice--error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .bp-form-row--half {
    grid-template-columns: 1fr;
  }

  .bp-steps {
    gap: 1rem;
  }

  .bp-step__label {
    display: none;
  }

  .bp-wholesale-form__body {
    padding: 1rem;
  }

  .bp-favorites__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
