/* ==========================================================================
   Clean Light-Theme Store Order Modal
   Matches the Linktree-inspired public business profile theme
   ========================================================================== */

.store-order-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 68px 16px 20px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.store-order-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.store-order-modal {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 24px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
  transform: translateY(16px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  color: #0F172A;
}

.store-order-backdrop.active .store-order-modal {
  transform: translateY(0);
}

/* Header */
.store-modal-header {
  padding: 18px 22px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.store-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.store-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
}

.store-modal-subtitle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8rem;
  color: #64748B;
  margin-top: 3px;
}

.store-dot-sep {
  opacity: 0.45;
}

.store-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.store-modal-close:hover {
  background: #F1F5F9;
  color: #0F172A;
}

/* Body */
.store-modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.store-step-block {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px;
}

.store-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.store-step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E0F2FE;
  color: #0284C7;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.store-step-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
}

/* Fulfillment Selector */
.fulfillment-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fulfillment-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fulfillment-card:hover {
  border-color: #CBD5E1;
}

.fulfillment-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F1F5F9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.fulfillment-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fulfillment-card-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0F172A;
}

.fulfillment-card-Hint {
  font-size: 0.74rem;
  color: #64748B;
  line-height: 1.3;
  margin-top: 2px;
}

.fulfillment-check {
  color: #CBD5E1;
  font-size: 1rem;
  flex-shrink: 0;
}

.fulfillment-card.active {
  border-color: #0284C7;
  background: #F0F9FF;
}

.fulfillment-card.active .fulfillment-card-icon {
  background: #0284C7;
  color: #FFFFFF;
}

.fulfillment-card.active .fulfillment-card-label {
  color: #0369A1;
}

.fulfillment-card.active .fulfillment-check {
  color: #0284C7;
}

/* Order Mode Tabs */
.order-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #E2E8F0;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.order-mode-tab {
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.order-mode-tab:hover {
  color: #0F172A;
}

.order-mode-tab.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* Item List */
.order-items-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-items-header-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748B;
  padding: 0 2px;
}

.order-items-rows-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-autocomplete-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

.order-input {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  color: #0F172A;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.order-input::placeholder {
  color: #94A3B8;
}

.order-input:focus {
  border-color: #0284C7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.order-item-qty {
  width: 78px;
  text-align: center;
  flex-shrink: 0;
}

/* Autocomplete Dropdown */
.item-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
}

.item-suggestion-entry {
  padding: 10px 12px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.item-suggestion-entry:last-child {
  border-bottom: none;
}

.item-suggestion-entry:hover,
.item-suggestion-entry.active {
  background: #F0F9FF;
}

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

.suggestion-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #0F172A;
}

.suggestion-meta {
  font-size: 0.74rem;
  color: #64748B;
  margin-top: 2px;
}

.suggestion-icon {
  color: #0284C7;
  font-size: 0.85rem;
}

.item-suggestions-loading,
.item-suggestions-empty {
  padding: 12px;
  text-align: center;
  font-size: 0.82rem;
  color: #64748B;
}

.order-item-del-btn {
  width: 34px;
  height: 38px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.order-item-del-btn:hover {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #EF4444;
}

.btn-add-item-row {
  background: #FFFFFF;
  border: 1px dashed #CBD5E1;
  border-radius: 10px;
  padding: 9px 12px;
  color: #0284C7;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-add-item-row:hover {
  background: #F0F9FF;
  border-color: #0284C7;
}

/* Photo Upload Dropzone */
.prescription-dropzone {
  background: #FFFFFF;
  border: 1.5px dashed #CBD5E1;
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prescription-dropzone:hover {
  border-color: #0284C7;
  background: #F0F9FF;
}

.dropzone-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #E0F2FE;
  color: #0284C7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.dropzone-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0F172A;
}

.dropzone-sub {
  font-size: 0.78rem;
  color: #64748B;
  margin-top: 4px;
}

.prescription-preview-wrap {
  background: #FFFFFF;
  border: 1px solid #BBF7D0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prescription-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #E2E8F0;
}

/* Contact & Address */
.store-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.store-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.store-field-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.req-star {
  color: #EF4444;
}

.opt-tag {
  color: #94A3B8;
  font-weight: 500;
}

.delivery-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-use-current-loc {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  color: #0284C7;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-use-current-loc:hover {
  background: #E0F2FE;
}

.btn-use-current-loc:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loc-status-pill {
  font-size: 0.76rem;
  color: #16A34A;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  padding: 6px 10px;
  border-radius: 8px;
}

/* Submit Footer */
.store-modal-footer {
  padding-top: 4px;
}

.btn-submit-store-order {
  width: 100%;
  background: #0284C7;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.22);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-submit-store-order:hover {
  background: #0369A1;
}

.btn-submit-store-order:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Success Screen */
.store-order-success-card {
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.store-order-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #DCFCE7;
  color: #16A34A;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.store-order-success-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #0F172A;
}

.store-order-success-num {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0284C7;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 8px;
}

.store-order-success-desc {
  font-size: 0.88rem;
  color: #475569;
  margin-top: 10px;
}

.store-order-next-steps {
  width: 100%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.next-step-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.4;
}

.next-step-icon {
  color: #0284C7;
  font-size: 0.9rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Mobile Bottom Sheet Responsiveness */
@media (max-width: 640px) {
  .store-order-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .store-order-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
  }

  .store-modal-header {
    padding: 16px 18px;
  }

  .store-modal-body {
    padding: 16px 16px 22px;
    gap: 14px;
  }

  .store-step-block {
    padding: 14px;
  }

  .fulfillment-selector,
  .store-contact-grid {
    grid-template-columns: 1fr;
  }
}
