/* ========================================
   BeachDash Web Ordering - Additional Styles
   Extends styles.css — do not duplicate base styles
   ======================================== */

/* ========================================
   ORDER PAGE LAYOUT
   ======================================== */
.order-page {
  padding: 7rem 1rem 3rem;
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
}

.order-page h1 {
  text-align: center;
  margin-bottom: 0.25rem;
}

.order-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* ========================================
   FORM SECTIONS
   ======================================== */
.order-section {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--sand-200);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.order-section h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--ocean-light), var(--ocean-mid));
  color: white;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ========================================
   LOCATION SELECTOR
   ======================================== */
.location-type-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.toggle-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 2px solid var(--sand-200);
  border-radius: 12px;
  background: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.toggle-btn.active {
  border-color: var(--ocean-mid);
  background: var(--ocean-foam);
  color: var(--ocean-deep);
  font-weight: 600;
}

.location-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mid);
}

.field-group select,
.field-group input,
.field-group textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--sand-200);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background: white;
  transition: border-color 0.2s;
  width: 100%;
}

.field-group select:focus,
.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--ocean-mid);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}

.field-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.custom-address-group {
  display: none;
}

.custom-address-group.visible {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ========================================
   GEAR CARDS
   ======================================== */
.gear-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gear-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 2px solid var(--sand-200);
  border-radius: 16px;
  background: white;
  transition: all 0.2s;
}

.gear-card.selected {
  border-color: var(--ocean-mid);
  background: var(--ocean-foam);
}

.gear-card-image {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--sand-100);
  flex-shrink: 0;
}

.gear-card-info {
  flex: 1;
  min-width: 0;
}

.gear-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.15rem;
}

.gear-card-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.3;
}

.gear-card-price {
  font-weight: 700;
  color: var(--ocean-deep);
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.gear-card-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: 2px solid var(--sand-200);
  border-radius: 10px;
  background: white;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  font-family: var(--font-body);
}

.qty-btn:hover:not(:disabled) {
  border-color: var(--ocean-mid);
  color: var(--ocean-deep);
  background: var(--ocean-foam);
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty-value {
  font-weight: 700;
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  color: var(--text-dark);
}

/* Bundle badge */
.bundle-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: linear-gradient(135deg, var(--palm-green), #16A34A);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ========================================
   FEATURED BUNDLE CARD
   ======================================== */
.gear-section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.bundle-card-featured {
  border: 2px solid var(--ocean-light);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--ocean-foam) 0%, #F0F9FF 100%);
  padding: 1.25rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
}

.bundle-card-featured.selected {
  border-color: var(--ocean-mid);
  box-shadow: 0 4px 20px rgba(3, 105, 161, 0.15);
}

.bundle-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.bundle-card-image {
  width: 100px;
  height: 80px;
  border-radius: 14px;
  object-fit: cover;
  background: white;
  flex-shrink: 0;
}

.bundle-card-header {
  flex: 1;
  min-width: 0;
}

.bundle-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bundle-card-desc {
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.4;
  margin: 0;
}

.bundle-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
  flex-wrap: wrap;
}

.bundle-price-current {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ocean-deep);
}

.bundle-price-label {
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 500;
}

.bundle-price-original {
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.bundle-price-savings {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--palm-green);
}

.bundle-includes {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.bundle-includes-item {
  font-size: 0.85rem;
  color: var(--ocean-mid);
  font-weight: 500;
}

.bundle-toggle-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  margin-top: 0.75rem;
  border: 2px solid var(--ocean-mid);
  border-radius: 100px;
  background: white;
  color: var(--ocean-mid);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.bundle-toggle-btn:hover {
  background: var(--ocean-foam, rgba(3, 105, 161, 0.08));
  transform: translateY(-1px);
}

.bundle-toggle-btn.active {
  background: linear-gradient(135deg, var(--palm-green), #16a34a);
  border-color: var(--palm-green);
  color: white;
  cursor: default;
}

.bundle-toggle-btn.active:hover {
  transform: none;
}

.bundle-badge.applied {
  background: linear-gradient(135deg, var(--palm-green), #16a34a);
}

.bundle-card-featured.selected {
  border-color: var(--palm-green);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* ========================================
   CUSTOMER INFO
   ======================================== */
.customer-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ========================================
   ORDER SUMMARY / CART
   ======================================== */
.cart-summary {
  background: linear-gradient(135deg, var(--sand-50), white);
  border: 2px solid var(--sand-200);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.cart-summary h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.cart-empty {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.cart-item-name {
  font-weight: 500;
  color: var(--text-dark);
}

.cart-item-price {
  font-weight: 600;
  color: var(--text-dark);
}

.cart-divider {
  height: 1px;
  background: var(--sand-200);
  margin: 0.75rem 0;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.cart-line.savings {
  color: var(--palm-green);
  font-weight: 500;
}

.cart-line.total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ocean-deep);
  padding-top: 0.5rem;
}

/* ========================================
   WAIVER AGREEMENT
   ======================================== */
.waiver-agreement {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--sand-200);
  text-align: center;
}

.waiver-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--ocean-mid);
  border-radius: 100px;
  background: white;
  color: var(--ocean-mid);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.waiver-open-btn:hover {
  background: var(--ocean-foam);
  transform: translateY(-1px);
}

.waiver-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--palm-green);
}

.waiver-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--palm-green);
  color: white;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ========================================
   WAIVER MODAL
   ======================================== */
.waiver-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.waiver-modal-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.waiver-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  margin: 2rem auto;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.waiver-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--sand-200);
}

.waiver-modal-header h2 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--text-dark);
}

.waiver-close-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--sand-100);
  font-size: 1.4rem;
  color: var(--text-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.waiver-close-btn:hover {
  background: var(--sand-200);
}

.waiver-modal-body {
  padding: 1.5rem;
  max-height: 65vh;
  overflow-y: auto;
}

.waiver-section-block {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--sand-50);
  border-radius: 12px;
  border: 1px solid var(--sand-200);
}

.waiver-section-block.warning {
  background: #FFF7ED;
  border-color: #FED7AA;
}

.waiver-section-block h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.waiver-section-block ul {
  margin: 0;
  padding-left: 1.25rem;
}

.waiver-section-block li {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

.waiver-full-link {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.waiver-full-link a {
  color: var(--ocean-mid);
  font-weight: 500;
}

.waiver-agree-section {
  border-top: 1px solid var(--sand-200);
  padding-top: 1.25rem;
}

.waiver-agree-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.waiver-agree-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--ocean-mid);
  cursor: pointer;
}

.waiver-accept-btn {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-mid));
  color: white;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.waiver-accept-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(12, 74, 110, 0.3);
}

.waiver-accept-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================
   CHECKOUT BUTTON
   ======================================== */
.checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1.1rem 2rem;
  background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-mid) 100%);
  color: white;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(12, 74, 110, 0.35);
}

.checkout-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(12, 74, 110, 0.45);
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.checkout-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ========================================
   ERROR / STATUS MESSAGES
   ======================================== */
.form-error {
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--danger-red);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: none;
}

.form-error.visible {
  display: block;
}

/* ========================================
   CONFIRMATION PAGE
   ======================================== */
.confirmation-page {
  padding: 7rem 1rem 3rem;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  text-align: center;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--palm-green), #16A34A);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
}

.confirmation-page h1 {
  color: var(--palm-green);
  margin-bottom: 0.5rem;
}

.confirmation-details {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--sand-200);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  text-align: left;
}

.confirmation-details h3 {
  margin-bottom: 0.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.detail-label {
  color: var(--text-light);
}

.detail-value {
  font-weight: 600;
  color: var(--text-dark);
}

.next-steps {
  background: var(--ocean-foam);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.next-steps h3 {
  color: var(--ocean-deep);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.next-steps p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.support-info {
  margin-top: 2rem;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.support-info a {
  color: var(--ocean-mid);
  font-weight: 500;
}

/* ========================================
   EMBEDDED CHECKOUT
   ======================================== */
.checkout-container {
  margin-bottom: 2rem;
}

.checkout-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 1.25rem;
  margin-bottom: 1rem;
  border: 1.5px solid var(--sand-200);
  border-radius: 100px;
  background: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.2s;
}

.checkout-back-btn:hover {
  border-color: var(--ocean-mid);
  color: var(--ocean-deep);
}

#checkout-mount {
  min-height: 400px;
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 640px) {
  .order-page {
    padding: 8rem 2rem 4rem;
  }

  .order-section {
    padding: 2rem;
  }

  .gear-card {
    padding: 1.25rem;
  }

  .gear-card-image {
    width: 88px;
    height: 88px;
  }

  .customer-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .customer-fields .field-group:first-child {
    grid-column: 1 / -1;
  }
}
