/* Дополнения к office-lunch.css: подписки на питание */

.gms-root.ols-wrapper {
  max-width: 100%;
}

/* lightbox-only host (как в Office Lunch) */
.gms-gl-gallery-host {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  clip: auto;
  border: 0;
}

/* Ужин — отдельный акцент карточки (в OLS нет модификатора dinner) */
.ols-dish-card--dinner {
  border-color: #c4b5fd;
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
}

.ols-dish-card--dinner:hover {
  border-color: #a78bfa;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.ols-dish-card--dinner input:checked ~ .ols-dish-label-compact {
  color: #5b21b6;
}

/* Нижняя панель: без суммы заказа */
.gms-sticky-total-spacer {
  min-height: 1px;
}

/* Перебиваем office-lunch.css: у .ols-errors по умолчанию display:none */
.gms-order-form .gms-errors.ols-errors:not(:empty) {
  display: block;
}

.gms-errors {
  padding: 12px 16px;
  margin: 8px 16px 100px;
  font-size: 0.95rem;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  min-height: 1.25em;
}

.gms-errors:empty {
  display: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  border: none;
  background: transparent;
}

.gms-errors.gms-ok-msg {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
  margin-bottom: 100px;
}

.gms-order-form textarea.ols-input {
  min-height: 72px;
  resize: vertical;
}

/* Подписки: порции без чекбокса Office Lunch */
.gms-dish-card .ols-dish-card-main.gms-dish-card-main {
  cursor: default;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.gms-dish-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gms-dish-qty-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.gms-dish-qty-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Степпер порций: без input — нет клавиатуры на мобилке */
.gms-qty-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-width: 7.75rem;
  padding: 4px 4px;
  background: #eef1ee;
  border: 1px solid #e2e8e4;
  border-radius: 14px;
  box-sizing: border-box;
}

.gms-qty-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #166534;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.gms-qty-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(22, 101, 52, 0.35);
}

.gms-qty-btn:active {
  background: rgba(22, 101, 52, 0.12);
}

.gms-qty-value {
  flex: 1 1 auto;
  min-width: 1.5rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #166534;
  font-variant-numeric: tabular-nums;
}

.gms-dish-card--picked .ols-dish-name-compact {
  font-weight: 600;
}

.gms-dish-card--main.gms-dish-card--picked {
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
}

.gms-dish-card--soup_salad.gms-dish-card--picked {
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.gms-dish-card--dinner.gms-dish-card--picked {
  border-color: #8b5cf6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.12);
}

.ols-notice {
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
}

.gms-order-form .ols-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Fallback, если office-lunch.css не подключён */
.ols-request-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ols-request-success-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.ols-request-success-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 32px 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.ols-request-success-panel .ols-request-success-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 1;
}

.ols-request-success-panel .ols-request-success-close:hover {
  background: #e5e7eb;
  color: #111827;
}

.ols-request-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  font-size: 2rem;
  font-weight: 700;
  line-height: 64px;
}

.ols-request-success-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  color: #111827;
}

.ols-request-success-order {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #4f46e5;
}

.ols-request-success-order:empty {
  display: none;
}

.ols-request-success-message {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4b5563;
}
