/* ========================================
   FRESH MICRO GREENS v3.0
   Fully Responsive Modal & Order Form
   REDESIGNED: Greens selection on step 1
   ======================================== */

/* Reset & Base */
.fmg-modal *,
.fmg-modal *::before,
.fmg-modal *::after {
  box-sizing: border-box;
}

/* ========================================
   MODAL
   ======================================== */

.fmg-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  align-items: flex-start;
  justify-content: center;
  padding: 15px;
  overflow-y: auto;
}

.fmg-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1;
}

.fmg-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 650px;
  margin: 15px auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 2;
  overflow: hidden;
}

.fmg-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.fmg-modal-close:hover {
  background: #f0f0f0;
  color: #000;
}

/* ========================================
   MODAL HEADER - More compact
   ======================================== */

.fmg-modal-header {
  padding: 20px 20px 15px;
  text-align: center;
  background: linear-gradient(135deg, #f8fdf5 0%, #e8f5e0 100%);
  border-bottom: 2px solid #2d5016;
}

.fmg-modal-header h2 {
  margin: 0 0 5px;
  color: #2d5016;
  font-size: 22px;
  font-weight: 700;
}

.fmg-tagline {
  margin: 0;
  color: #555;
  font-size: 13px;
}

/* ========================================
   LOGIN PROMPT
   ======================================== */

.fmg-login-prompt {
  text-align: center;
  padding: 30px 20px;
}

.fmg-login-icon {
  margin-bottom: 15px;
}

.fmg-login-prompt h3 {
  color: #2d5016;
  font-size: 18px;
  margin: 0 0 8px;
}

.fmg-login-prompt > p {
  color: #555;
  font-size: 13px;
  margin: 0 0 20px;
  line-height: 1.5;
}

.fmg-purchase-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0;
}

.fmg-purchase-option {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 15px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.fmg-purchase-option:hover {
  border-color: #2d5016;
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.15);
}

.fmg-purchase-option.fmg-option-featured {
  border-color: #2d5016;
  background: #f8fdf5;
}

.fmg-option-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  background: #2d5016;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.fmg-option-icon {
  margin-bottom: 12px;
}

.fmg-purchase-option h4 {
  color: #2d5016;
  font-size: 15px;
  margin: 0 0 8px;
  font-weight: 700;
}

.fmg-purchase-option p {
  color: #666;
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 15px;
  min-height: 48px;
}

.fmg-purchase-option .fmg-btn {
  width: 100%;
  padding: 10px 12px;
  font-size: 12px;
  text-decoration: none;
  display: inline-block;
}

.fmg-login-note {
  font-size: 12px;
  color: #666;
  margin: 15px 0 0;
}

.fmg-login-note a {
  color: #2d5016;
  font-weight: 600;
}

.fmg-guest-notice {
  background: #e8f5e0;
  color: #2d5016;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 13px;
  text-align: center;
  border: 1px solid #2d5016;
}

@media (max-width: 600px) {
  .fmg-purchase-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fmg-purchase-option p {
    min-height: auto;
  }

  .fmg-login-prompt {
    padding: 20px 15px;
  }
}

.fmg-login-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.fmg-login-note {
  font-size: 12px;
  color: #888;
  margin: 0;
}

/* ========================================
   NOTICES - More compact
   ======================================== */

.fmg-notice {
  padding: 10px 14px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.4;
}

.fmg-notice-warning {
  background: #fef3cd;
  color: #856404;
  border-left: 3px solid #ffc107;
}

.fmg-notice-info {
  background: #e7f3ff;
  color: #004085;
  border-left: 3px solid #007bff;
}

/* ========================================
   MODAL BODY & STEPS - More compact
   ======================================== */

.fmg-modal-body {
  padding: 0;
}

.fmg-step {
  padding: 20px;
}

.fmg-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e8f5e0;
}

.fmg-step-num {
  width: 30px;
  height: 30px;
  background: #2d5016;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.fmg-step-header h3 {
  margin: 0;
  color: #2d5016;
  font-size: 17px;
  font-weight: 600;
}

/* ========================================
   FORM SECTIONS - More compact
   ======================================== */

.fmg-form-section {
  margin-bottom: 18px;
}

.fmg-form-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.fmg-required {
  color: #dc3545;
}

.fmg-form-help {
  margin: 6px 0 0;
  font-size: 12px;
  color: #666;
}

.fmg-form-intro {
  color: #555;
  margin-bottom: 15px;
  font-size: 14px;
}

/* ========================================
   BOX SIZE SELECTOR - NEW
   ======================================== */

.fmg-size-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  background: #f8fdf5;
  border-radius: 10px;
  border: 2px solid #2d5016;
}

.fmg-size-btn {
  width: 44px;
  height: 44px;
  background: #2d5016;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fmg-size-btn:hover {
  background: #1f3810;
  transform: scale(1.1);
}

.fmg-size-display {
  text-align: center;
  min-width: 120px;
}

.fmg-size-weight {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #2d5016;
}

.fmg-size-price {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.fmg-size-info {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin: 10px 0 0;
}

/* ========================================
   RADIO CARDS - More compact
   ======================================== */

.fmg-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fmg-radio-inline {
  flex-direction: row;
  flex-wrap: wrap;
}

.fmg-radio-inline .fmg-radio-card {
  flex: 1;
  min-width: 100px;
}

.fmg-radio-card {
  display: flex;
  align-items: flex-start;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}

.fmg-radio-card:hover {
  border-color: #2d5016;
  background: #f8fdf5;
}

.fmg-radio-card.fmg-radio-compact {
  padding: 8px 10px;
}

.fmg-radio-card input[type="radio"] {
  margin: 2px 10px 0 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #2d5016;
}

.fmg-radio-card input[type="radio"]:checked ~ .fmg-radio-content {
  color: #2d5016;
}

.fmg-radio-content {
  flex: 1;
  min-width: 0;
}

.fmg-radio-content strong {
  display: block;
  font-size: 13px;
  margin-bottom: 1px;
}

.fmg-radio-content small {
  display: block;
  font-size: 11px;
  color: #666;
  font-weight: normal;
}

.fmg-radio-price {
  display: block;
  color: #2d5016;
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
}

/* ========================================
   WEIGHT TRACKER
   ======================================== */

.fmg-weight-tracker {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.fmg-weight-bar {
  height: 10px;
  background: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 6px;
}

.fmg-weight-fill {
  height: 100%;
  background: #2d5016;
  border-radius: 5px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}

.fmg-weight-text {
  text-align: center;
  font-weight: 600;
  color: #333;
  font-size: 13px;
}

.fmg-varieties-count {
  color: #666;
  font-weight: normal;
  margin-left: 8px;
}

/* ========================================
   GREENS SELECTION - Redesigned
   ======================================== */

/* ========================================
   BOX TOTAL DISPLAY - NEW (shows at top of step 1)
   ======================================== */

.fmg-box-total-display {
  background: linear-gradient(135deg, #f8fdf5 0%, #e8f5e0 100%);
  padding: 12px 15px;
  border-radius: 10px;
  border: 2px solid #2d5016;
  margin-bottom: 15px;
  text-align: center;
}

.fmg-total-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.fmg-total-weight {
  font-size: 24px;
  font-weight: 700;
  color: #2d5016;
}

.fmg-total-price {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.fmg-box-total-display small {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

/* ========================================
   GREENS LIST SIMPLE - For step 1 layout
   ======================================== */

.fmg-greens-list-simple {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 5px;
  margin-bottom: 15px;
  background: #f9f9f9;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e0e0e0;
}

/* ========================================
   BOX PREVIEW INLINE - For step 1 layout
   ======================================== */

.fmg-box-preview-inline {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  border: 2px solid #2d5016;
  margin-bottom: 15px;
}

.fmg-box-preview-inline h4 {
  margin: 0 0 10px;
  color: #2d5016;
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f5e0;
}

.fmg-box-preview-inline .fmg-box-contents {
  min-height: 60px;
  max-height: 150px;
  overflow-y: auto;
}

.fmg-greens-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 15px 0;
}

.fmg-greens-available,
.fmg-box-preview {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e0e0e0;
}

.fmg-greens-available h4,
.fmg-box-preview h4 {
  margin: 0 0 12px;
  color: #2d5016;
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #2d5016;
}

.fmg-greens-list {
  max-height: 350px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Section labels for greens list */
.fmg-greens-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #2d5016;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 0 4px;
  margin-top: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.fmg-greens-section-label:first-child {
  margin-top: 0;
}

/* Green Item */
.fmg-green-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 6px;
  border-left: 3px solid #2d5016;
  transition: all 0.2s;
}

.fmg-green-item:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.fmg-green-mix {
  border-left-color: #28a745;
}

.fmg-wheatgrass-item {
  border-left-color: #ffc107;
}

.fmg-green-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.fmg-green-info strong {
  display: block;
  font-size: 13px;
  color: #333;
  margin-bottom: 1px;
}

.fmg-green-info small {
  display: block;
  font-size: 11px;
  color: #666;
  line-height: 1.3;
}

/* Full description visible for mixes */
.fmg-green-desc-full {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}

.fmg-addon-price-tag {
  color: #2d5016 !important;
  font-weight: 600 !important;
}

.fmg-green-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fmg-green-weight {
  font-weight: 700;
  color: #2d5016;
  font-size: 12px;
  min-width: 30px;
  text-align: right;
}

.fmg-green-weight.fmg-weight-active {
  background: #e8f5e0;
  padding: 2px 6px;
  border-radius: 4px;
}

.fmg-btn-add {
  width: 30px;
  height: 30px;
  background: #2d5016;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  flex-shrink: 0;
}

.fmg-btn-add:hover {
  background: #1f3810;
  transform: scale(1.1);
}

/* Mini quantity control for wheatgrass */
.fmg-qty-control-mini {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fmg-qty-btn-mini {
  width: 26px;
  height: 26px;
  background: #2d5016;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fmg-qty-btn-mini:hover {
  background: #1f3810;
}

.fmg-qty-display {
  font-weight: 700;
  color: #2d5016;
  min-width: 20px;
  text-align: center;
}

.fmg-wheatgrass-note {
  font-size: 11px;
  color: #666;
  background: #fff8e1;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 10px;
  line-height: 1.4;
}

/* Box Preview Items */
.fmg-box-contents {
  min-height: 120px;
}

.fmg-empty-box {
  color: #999;
  text-align: center;
  padding: 30px 10px;
  font-style: italic;
  font-size: 13px;
}

.fmg-box-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 6px;
  border-left: 3px solid #2d5016;
}

.fmg-box-item-addon {
  border-left-color: #ffc107;
}

.fmg-box-item-name {
  flex: 1;
  font-weight: 500;
  color: #333;
  font-size: 13px;
}

.fmg-box-item-weight {
  font-weight: 700;
  color: #2d5016;
  font-size: 12px;
}

.fmg-box-item-actions {
  display: flex;
  gap: 3px;
}

.fmg-btn-sm {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fmg-btn-minus {
  background: #6c757d;
  color: #fff;
}

.fmg-btn-plus {
  background: #2d5016;
  color: #fff;
}

.fmg-btn-remove {
  background: #dc3545;
  color: #fff;
}

.fmg-btn-sm:hover {
  opacity: 0.8;
}

/* ========================================
   ORDER SUMMARY - More compact
   ======================================== */

.fmg-order-summary {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
}

.fmg-summary-section h4 {
  margin: 0 0 10px;
  color: #2d5016;
  font-size: 14px;
}

.fmg-summary-box {
  margin-bottom: 12px;
}

.fmg-summary-items {
  margin: 8px 0;
  padding-left: 18px;
}

.fmg-summary-items li {
  margin: 4px 0;
  color: #555;
  font-size: 13px;
}

.fmg-summary-addons {
  margin: 12px 0;
  padding-top: 12px;
  border-top: 1px dashed #ddd;
}

.fmg-summary-addons ul {
  margin: 8px 0;
  padding-left: 18px;
}

.fmg-summary-type,
.fmg-summary-container,
.fmg-summary-rotation,
.fmg-summary-favorites {
  margin: 6px 0;
  font-size: 13px;
  color: #555;
}

.fmg-summary-favorites {
  background: #f8fdf5;
  padding: 8px;
  border-radius: 6px;
  margin-top: 8px;
}

.fmg-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 2px solid #2d5016;
  font-size: 18px;
}

.fmg-summary-total strong {
  color: #2d5016;
  font-size: 22px;
}

.fmg-delivery-details {
  background: #e7f3ff;
  padding: 14px;
  border-radius: 8px;
  margin: 15px 0;
}

.fmg-detail-row {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  font-size: 13px;
}

.fmg-detail-label {
  color: #004085;
  font-weight: 600;
}

.fmg-detail-value {
  color: #333;
}

/* ========================================
   BUTTONS
   ======================================== */

.fmg-step-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.fmg-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.fmg-btn-primary {
  background: #2d5016;
  color: #fff;
}

.fmg-btn-primary:hover {
  background: #1f3810;
}

.fmg-btn-secondary {
  background: #6c757d;
  color: #fff;
}

.fmg-btn-secondary:hover {
  background: #5a6268;
}

.fmg-btn-success {
  background: #28a745;
  color: #fff;
}

.fmg-btn-success:hover {
  background: #218838;
}

.fmg-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Order Button (Shortcode) */
.fmg-order-button {
  background: #2d5016;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.fmg-order-button:hover {
  background: #1f3810;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
}

/* ========================================
   FAVORITES INPUT
   ======================================== */

.fmg-favorites-input {
  margin: 15px 0;
  padding: 15px;
  background: #f8fdf5;
  border-radius: 8px;
  border: 2px solid #2d5016;
}

.fmg-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}

.fmg-textarea:focus {
  outline: none;
  border-color: #2d5016;
}

.fmg-textarea::placeholder {
  color: #999;
}

/* ========================================
   ROTATION NOTE
   ======================================== */

.fmg-rotation-note {
  background: #e8f5e0;
  color: #2d5016;
  border-left: 3px solid #2d5016;
}

/* ========================================
   DELIVERY DATE PREVIEW
   ======================================== */
