@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* DoorDash color scheme */
:root {
  --doordash-red: #cb202d;
  --doordash-blue: #0055ff;
  --doordash-dark: #1a1a1a;
  --doordash-gray: #6b7280;
  --doordash-light-gray: #9ca3af;
  --doordash-bg: #ffffff;
  --doordash-border: #e5e7eb;
  --doordash-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --doordash-radius: 8px;
}

/* Main header container - DoorDash style */
.soh-restaurant-header-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--doordash-bg);
  border-radius: var(--doordash-radius);
  padding: 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
}

/* ============================================================
   MODERN JUST EAT-STYLE PREFERENCE SECTION
   ============================================================ */

.soh-pref-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
}

/* Selected address chip - modern Just Eat style */
.soh-selected-address > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fafaf8;
  border-radius: 10px;
  color: #333333;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid #f0ede6;
  transition: all 200ms ease-out;
}

.soh-selected-address > div:hover {
  background: #f3f3f1;
  border-color: #e8e5de;
}

/* Address chip - clickable state */
.soh-address-chip {
  cursor: pointer;
  transition: all 200ms ease-out;
}

.soh-address-chip:hover {
  background: #ede8e1 !important;
  box-shadow: 0 4px 12px rgba(16,24,40,0.12) !important;
  transform: translateY(-1px);
}

.soh-address-chip:active {
  transform: translateY(0);
}

.soh-selected-address svg, 
.soh-selected-address .soh-location-icon {
  color: #ff7a45;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Preference toggle container */
.soh-pref-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Modern toggle button - Just Eat inspired */
.soh-switch-option {
  background: #f3f3f1;
  color: #666666;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: all 200ms ease-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 36px;
  justify-content: center;
}

.soh-switch-option .soh-switch-icon {
  font-size: 16px;
  display: inline-block;
  width: 16px;
  flex-shrink: 0;
}

.soh-switch-option:hover:not(.disabled) {
  background: #e8e8e5;
  color: #333333;
  transform: translateY(-1px);
}

.soh-switch-option.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* Active state - modern clean look with subtle shadow */
.soh-switch-option.active {
  background: #ffffff;
  color: #333333;
  border: 1px solid #f0ede6;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  font-weight: 600;
}

.soh-switch-option.active .soh-switch-icon {
  color: var(--doordash-blue);
}

/* Focus state for accessibility */
.soh-switch-option:focus {
  outline: 2px solid rgba(0, 85, 255, 0.1);
  outline-offset: 2px;
}

/* Delivery address section - only visible when delivery selected */
.soh-delivery-address {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  background: #fafaf8;
  border-radius: 8px;
  border: 1px solid #f0ede6;
}

.soh-delivery-address input {
  padding: 10px 12px;
  border: 1px solid #f0ede6;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: #333333;
  transition: all 200ms ease-out;
}

.soh-delivery-address input:focus {
  outline: none;
  border-color: var(--doordash-blue);
  box-shadow: 0 0 0 2px rgba(0, 85, 255, 0.1);
}

.soh-delivery-address input::placeholder {
  color: #999999;
}

.soh-delivery-address input:disabled {
  background: #f3f3f1;
  color: #999999;
  cursor: not-allowed;
}

#soh-address-suggestions {
  max-height: 150px;
  overflow-y: auto;
  border-radius: 4px;
  background: #ffffff;
}

#soh-address-suggestions div {
  padding: 8px 10px;
  border-bottom: 1px solid #f0ede6;
  cursor: pointer;
  font-size: 13px;
  color: #666666;
  transition: background 150ms ease-out;
}

#soh-address-suggestions div:last-child {
  border-bottom: none;
}

#soh-address-suggestions div:hover {
  background: #f9f9f7;
}

#soh-confirm-delivery {
  padding: 10px 12px;
  background: var(--doordash-blue);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: all 200ms ease-out;
}

#soh-confirm-delivery:hover:not(:disabled) {
  background: #0044cc;
  box-shadow: 0 2px 8px rgba(0, 85, 255, 0.2);
  transform: translateY(-1px);
}

#soh-confirm-delivery:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#soh-confirm-delivery:focus {
  outline: 2px solid rgba(0, 85, 255, 0.3);
  outline-offset: 2px;
}

/* Restaurant image placeholder - hidden as per PHP */
.soh-restaurant-header-wrap .soh-restaurant-header-img {
  display: none;
}

/* Main content area */
.soh-restaurant-header-content {
  flex: 1;
  min-width: 0;
}

/* Info button styling - modern icon button */
.soh-info-btn {
  transition: all 200ms ease-out;
  min-width: 40px;
  min-height: 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  outline: none;
  border: 1px solid #f0ede6;
  background: #f9f9f7;
  padding: 0;
  margin: 0;
  border-radius: 50px;
  color: #666666;
}

.soh-info-btn:hover {
  background: #f3f3f1;
  border-color: #e8e5de;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.soh-info-btn:focus {
  outline: 2px solid rgba(0, 85, 255, 0.1);
  outline-offset: 2px;
}

/* Legacy compatibility for header class */
.soh-restaurant-header h2 {
  margin: 0 0 6px 0;
  font-size: 1.75rem;
  color: var(--doordash-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  letter-spacing: -0.3px;
}

/* Row styling for address, phone, hours */
.soh-row {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--doordash-gray);
  font-size: 13px;
  margin: 8px 0;
  flex-wrap: wrap;
  flex-direction: row;
}

/* Ensure all SVGs in row are consistent size */
.soh-row svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
}

/* Address, phone, hours, min order - inline with consistent styling */
.soh-address,
.soh-phone,
.soh-hours-inline,
.soh-min-order {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #666666;
  white-space: nowrap;
}

.soh-address svg,
.soh-phone svg,
.soh-min-order svg,
.soh-hours-inline svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.soh-hours-inline {
  gap: 4px;
  align-items: center;
}

.soh-hours-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #333333;
}

.soh-hours-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.soh-hours-shift-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.soh-hours-shift {
  white-space: nowrap;
  font-size: 13px;
}

/* ============================================================
   MODERN BADGES SECTION - JUST EAT INSPIRED
   ============================================================ */

/* Badges row container - clean horizontal layout */
.soh-badges-row {
  margin-top: 14px;
  padding-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Hide badges until API data loads */
.soh-badges-row.soh-badges-loading {
  display: none;
}

/* Individual badges - modern clean chip design */
.soh-badges-row .soh-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  background: #f9f9f7;
  border: 1px solid #f0ede6;
  color: #666666;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
  text-align: center;
  min-height: 36px;
  transition: all 200ms ease-out;
}

.soh-badges-row .soh-badge:hover {
  background: #f3f3f1;
  border-color: #e8e5de;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Badge icon styling */
.soh-badge-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.soh-badges-row .soh-badge .soh-badge-icon svg { 
  fill: #666666; 
  color: #666666;
  width: 16px;
  height: 16px;
}

/* Badge text styling */
.soh-badge-text {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  gap: 4px;
}

.soh-badge-label {
  display: inline;
  font-size: 13px;
  color: #666666;
  line-height: 1.4;
  margin: 0;
  font-weight: 600;
}

.soh-badge-value {
  display: inline;
  font-weight: 500;
  color: #999999;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  font-size: 12px;
}

/* Badge variants - delivery, collection, minorder */
.soh-badges-row .soh-badge.delivery .soh-badge-icon svg { fill: #ff7a45; color: #ff7a45; }
.soh-badges-row .soh-badge.collection .soh-badge-icon svg { fill: #ff7a45; color: #ff7a45; }
.soh-badges-row .soh-badge.minorder .soh-badge-icon svg { fill: #666666; color: #666666; }

/* Individual badge styling (when used outside badges-row) */
.soh-badge {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f9f9f7;
  border-radius: 8px;
  border: 1px solid #f0ede6;
  font-size: 13px;
  line-height: 1.4;
  color: #666666;
  min-height: 36px;
  transition: all 200ms ease-out;
}

.soh-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  background: #f3f3f1;
  border-color: #e8e5de;
}

.soh-badge-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  margin: 0;
}

/* Responsive design - mobile optimizations for modern design */
@media (max-width: 768px) {
  .soh-restaurant-header-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  /* Mobile text sizing for header */
  .soh-restaurant-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    flex-wrap: nowrap;
  }
  
  .soh-restaurant-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .soh-row {
    font-size: 1rem;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  /* Mobile preference toggle - stack vertically on small screens */
  .soh-pref-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .soh-selected-address > div {
    width: 100%;
  }

  .soh-pref-toggle {
    width: 100%;
    justify-content: center;
  }

  /* Mobile switch options - full width on small screens */
  .soh-switch-option {
    flex: 1;
    justify-content: center;
  }

  /* Mobile badge layout adjustments - smaller, tighter spacing */
  .soh-badges-row {
    gap: 8px;
  }

  .soh-badges-row .soh-badge {
    padding: 6px 12px;
    gap: 6px;
    min-height: 32px;
    font-size: 12px;
  }

  .soh-badge {
    padding: 8px 12px;
    gap: 8px;
    min-height: 36px;
  }

  .soh-badge-icon {
    width: 16px;
    height: 16px;
  }

  .soh-badge-label {
    font-size: 12px;
  }

  .soh-badge-value {
    font-size: 11px;
  }

  /* Mobile text sizing for hours */
  .soh-hours-inline,
  .soh-address,
  .soh-phone {
    font-size: 12px;
  }

  .soh-hours-shift {
    font-size: 12px;
  }
}

/* Modal close button hover effects */
.soh-modal-close-btn {
  transition: all 0.2s ease;
  border-radius: 4px;
}

/* Lower address/service card */
.soh-address-card { margin-top:16px; background:#f6f9fb; border-radius:8px; padding:14px 18px; border:1px solid rgba(16,24,40,0.03); }
.soh-address-card-line { font-weight:600; color:#0b2; margin-bottom:8px; }
.soh-address-card-services { font-size:14px; color:#444; display:flex; gap:14px; align-items:center; }
.soh-service { display:inline-flex; gap:8px; align-items:center; padding:6px 10px; border-radius:8px; background:#fff; box-shadow:0 4px 12px rgba(16,24,40,0.04); border:1px solid rgba(16,24,40,0.03); }


.soh-modal-close-btn:hover {
  background-color: rgba(107, 114, 128, 0.1);
  color: #374151;
  transform: rotate(90deg);
}

.soh-modal-close-btn:active {
  transform: rotate(90deg) scale(0.95);
}

/* Modern Modal Styling */
.soh-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10001;
  cursor: pointer;
  animation: modalFadeIn 0.3s ease-out;
}

.soh-modal-overlay.soh-modal-open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.soh-modal-content {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  background: white;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
  cursor: default;
  animation: modalSlideIn 0.3s ease-out;
}

.soh-modal-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.soh-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.025em;
}

.soh-modal-close-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin: -8px -8px -8px 0;
}

.soh-modal-close-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
  transform: rotate(90deg);
}

.soh-modal-close-btn:active {
  transform: rotate(90deg) scale(0.95);
}

.soh-modal-map-container {
  position: relative;
  padding: 16px;
  background: #f8fafc;
}

.soh-map-content {
  height: 320px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
}

.soh-modal-footer {
  padding: 24px;
  background: white;
}

/* Mapbox Popup Styling */
.soh-map-popup .mapboxgl-popup-content {
  background: white;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border: 1px solid #e5e7eb;
}

.soh-map-popup .mapboxgl-popup-tip {
  border-top-color: white;
}

.soh-address-text {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.soh-fsa-section {
  text-align: center;
  margin-top: 16px;
}

/* Hours info in modal - clean table-like display */
.soh-hours-info {
  font-size: 13px;
}

.soh-hours-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #333333;
}

.soh-hours-info > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.soh-hours-info div > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666666;
  padding: 8px 0;
  border-bottom: 1px solid #f0ede6;
}

.soh-hours-info div > div:last-child {
  border-bottom: none;
}

.soh-hours-info div > div span:first-child {
  font-weight: 500;
  color: #333333;
}

.soh-hours-info div > div span:last-child {
  color: #999999;
  text-align: right;
}

/* Modal Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Responsive Modal */
@media (max-width: 640px) {
  .soh-modal-overlay {
    background: rgba(0, 0, 0, 0.4);
  }

  .soh-modal-overlay.soh-modal-open {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: modalFadeIn 0.3s ease-out;
  }
  
  .soh-modal-content {
    width: 100%;
    max-width: none;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: bottomSheetSlideUp 0.3s ease-out;
  }

  .soh-modal-header {
    padding: 20px 20px 16px;
    flex-shrink: 0;
  }
  
  .soh-modal-title {
    font-size: 1.25rem;
  }

  .soh-modal-map-container {
    padding: 12px;
    flex-shrink: 0;
    overflow: hidden;
  }
  
  .soh-map-content {
    height: 280px;
    border-radius: 12px;
  }
  
  .soh-modal-footer {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
  }
  
  .soh-address-text {
    font-size: 0.8125rem;
    padding: 14px;
  }
}

@keyframes bottomSheetSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .soh-modal-content {
    width: 98%;
    margin: 10px;
  }
  
  .soh-map-content {
    height: 240px;
  }
  
  .soh-modal-header,
  .soh-modal-footer {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .soh-restaurant-header-wrap {
    padding: 10px;
  }
}

 #soh-min-order-banner {
                display: flex;
                align-items: center;
                gap: 18px;
                background: linear-gradient(90deg, #ffeaea 0%, #fff6f6 100%);
                color: #a00;
                padding: 18px 32px;
                margin: 18px 0;
                border-radius: 14px;
                font-size: 1.08em;
                font-weight: 600;
                box-shadow: 0 2px 12px rgba(200,0,0,0.07);
                border: 1px solid #ffd6d6;
                text-align: left;
                max-width: 600px;
                margin-left: auto;
                margin-right: auto;
            }
            #soh-min-order-banner .soh-banner-icon {
                flex-shrink: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                background: #fff;
                border-radius: 50%;
                box-shadow: 0 1px 6px rgba(200,0,0,0.08);
                border: 1.5px solid #ffd6d6;
                width: 56px;
                height: 56px;
                margin-right: 2px;
            }
            #soh-min-order-banner .soh-banner-text {
                flex: 1;
                font-size: 1.08em;
                color: #a00;
                font-weight: 600;
            }
            @media (max-width: 600px) {
                #soh-min-order-banner {
                    flex-direction: column;
                    align-items: flex-start;
                    padding: 14px 10px;
                }
                #soh-min-order-banner .soh-banner-icon {
                    margin-bottom: 10px;
                }
            }

/* ============================================================
   CHECKOUT DELIVERY ADDRESS FIELD
   ============================================================ */

/* Hide standard billing fields - use !important to override WooCommerce */
#billing_address_1_field,
#billing_address_2_field,
#billing_city_field,
#billing_postcode_field,
#billing_state_field,
#billing_company_field {
    display: none !important;
}

/* Style the custom delivery address field */
#soh_delivery_address_checkout_field {
    position: relative;
    margin-bottom: 20px;
}

#soh_delivery_address_checkout_field label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

#soh_delivery_address_checkout {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

#soh_delivery_address_checkout:focus {
    outline: none;
    border-color: #0055ff;
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.1);
    position: relative;
    z-index: 1001;
}

#soh-address-suggestions-checkout {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1002;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: -1px;
}

.soh-address-suggestion {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.soh-address-suggestion:hover {
    background-color: #f5f5f5;
    color: #0055ff;
}

.soh-time-unavailable-wrap{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    max-width: 449px;
    width: 100%;
    flex-direction: column;
    text-align: center;
    border-radius: 100px!important;
}

section.woocommerce-customer-details, section.woocommerce-order-details, .woocommerce-order ul.order_details, .woocommerce-thankyou-order-received{
  display: none !important;
}

#post-6 > div > div > div > p:nth-child(3) {
  display: none !important;
}

