/**
 * Checkout Styles
 */

.seecommerce-checkout {
  max-width: 1000px !important;
  margin: 32px auto !important;
  padding: 0 20px !important;
  background: transparent !important;
  border: none !important;
}

@media (max-width: 640px) {
  .seecommerce-checkout {
    margin: 16px auto !important;
    padding: 0 16px !important;
  }
}

/* Single Column Layout */
.checkout-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .checkout-content {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .checkout-content {
    padding: 20px;
  }
}

.checkout-content h1 {
  margin: 0 0 32px;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

@media (max-width: 640px) {
  .checkout-content h1 {
    margin: 0 0 16px;
    font-size: 24px;
  }
}

/* Order Summary - Top */
.order-summary-top {
  background: #fff;
  border: 2px solid #2563eb;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

@media (max-width: 640px) {
  .order-summary-top {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
  }
}

.order-summary-top h2 {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

@media (max-width: 640px) {
  .order-summary-top h2 {
    margin: 0 0 16px;
    font-size: 18px;
  }
}

.price-update-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  font-style: italic;
}

/* Checkout Form */
.checkout-form {
  background: #fff;
}

.form-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.form-section h2 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
  transition: border-color 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.form-field.error input,
.form-field.error select,
.form-field.error textarea {
  border-color: #dc2626;
}

.error-message {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #dc2626;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.checkbox-label:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkbox-label span {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

/* Payment Methods */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.payment-option:hover {
  border-color: #2563eb;
  background: #f9fafb;
}

.payment-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.payment-option input[type="radio"]:checked + .payment-icon,
.payment-option input[type="radio"]:checked ~ .payment-label {
  color: #2563eb;
}

.payment-option:has(input[type="radio"]:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}

.payment-icon {
  font-size: 20px;
  line-height: 1;
}

.payment-label {
  font-size: 15px;
  font-weight: 500;
  color: #111827;
  flex: 1;
}

.payment-fee {
  font-size: 13px;
  font-weight: 600;
  color: #059669;
  margin-left: 8px;
}

/* Order Summary Items */
.summary-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  align-items: center;
}

@media (min-width: 768px) {
  .item-info {
    align-items: center;
  }
}

.item-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  width: 100%;
  flex-basis: 100%;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .item-name {
    flex: 1;
    width: auto;
    flex-basis: auto;
    margin-bottom: 0;
  }
}

.item-qty {
  font-size: 12px;
  color: #6b7280;
  margin-left: auto;
}

@media (min-width: 768px) {
  .item-qty {
    margin-left: 0;
  }
}

.item-pricing {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .item-pricing {
    margin-left: auto;
  }
}

.item-total {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}

/* Order Summary Totals */
.summary-totals {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #374151;
}

.summary-row.total-row {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.total-amount {
  color: #2563eb;
  font-size: 16px;
  font-weight: 700;
}

/* Checkout Actions */
.checkout-actions {
  margin-top: 32px;
}

.complete-purchase-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.complete-purchase-btn:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.complete-purchase-btn:active:not(:disabled) {
  transform: translateY(0);
}

.complete-purchase-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.lock-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-text {
  flex-shrink: 0;
  font-weight: 600;
}

.btn-total {
  font-weight: 700;
  flex-shrink: 0;
}

/* Empty Checkout */
.seecommerce-checkout-empty {
  text-align: center;
  padding: 80px 20px;
}

.seecommerce-checkout-empty h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.seecommerce-checkout-empty p {
  margin: 0 0 32px;
  color: #6b7280;
  font-size: 16px;
}
