.ols-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #111827;
  position: relative;
  padding-bottom: 100px; /* Место для фиксированной панели */
}

.entry-content .ols-wrapper,
.wp-block-post-content .ols-wrapper {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Компактный заголовок */
.ols-header-compact {
  padding: 12px 16px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  border-radius: 12px 12px 0 0;
  text-align: center;
}

.ols-heading-compact {
  margin: 0 0 16px;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
}

.ols-today-label {
  margin: 0 0 8px;
  font-size: 0.9rem;
  opacity: 0.95;
  line-height: 1.5;
}

.ols-today-label p {
  margin: 0;
}

/* Если в today_label вставлен полноценный HTML-блок (с собственным фоном/отступами),
   отключаем фиолетовую обертку, чтобы стиль применялся ко всей плашке. */
.ols-header-compact--custom-html {
  padding: 0;
  background: transparent;
  color: inherit;
  border-radius: 0;
}

.ols-header-compact--custom-html .ols-heading-compact {
  color: #111827;
  margin-bottom: 12px;
}

.ols-today-label--custom-html {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  opacity: 1;
}

.ols-price-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.75rem;
}

.ols-price-badge-label {
  opacity: 0.9;
}

.ols-price-badge-item {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Аккордеон дней */
.ols-days-accordion {
  padding: 8px 16px;
}

.ols-day-accordion-item {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0;
}

.ols-day-accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  color: #111827;
}

.ols-day-accordion-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ols-day-name {
  font-weight: 600;
}

.ols-day-date {
  font-size: 0.8rem;
  color: #6b7280;
}

.ols-day-accordion-icon {
  font-size: 0.7rem;
  color: #9ca3af;
  transition: transform 0.2s;
}

.ols-day-accordion-toggle[aria-expanded='true'] .ols-day-accordion-icon {
  transform: rotate(180deg);
}

.ols-day-accordion-content {
  padding-bottom: 12px;
}

/* Группы категорий блюд */
.ols-dish-category-group {
  margin-bottom: 20px;
}

.ols-dish-category-group:last-child {
  margin-bottom: 0;
}

.ols-dish-category-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
}

.ols-dish-category-group[data-category='main'] .ols-dish-category-header {
  border-bottom-color: #4f46e5;
}

.ols-dish-category-group[data-category='soup_salad'] .ols-dish-category-header {
  border-bottom-color: #10b981;
}

.ols-dish-category-group[data-category='sandwich'] .ols-dish-category-header {
  border-bottom-color: #f59e0b;
}

.ols-dish-category-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.ols-dish-category-title-wrapper {
  flex: 1;
}

.ols-dish-category-title {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ols-dish-category-required {
  color: #dc2626;
  font-size: 1rem;
}

.ols-dish-category-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Компактные карточки блюд */
.ols-dishes-grid-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.ols-dish-card-compact {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: #ffffff;
  transition: all 0.15s;
  position: relative;
}

.ols-dish-card-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

/* Стили для разных категорий */
.ols-dish-card--main {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.ols-dish-card--main:hover {
  border-color: #4f46e5;
  background: #e0e7ff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.ols-dish-card--main input:checked ~ .ols-dish-label-compact {
  color: #4f46e5;
  font-weight: 600;
}

.ols-dish-card--soup_salad {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.ols-dish-card--soup_salad:hover {
  border-color: #10b981;
  background: #d1fae5;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.ols-dish-card--soup_salad input:checked ~ .ols-dish-label-compact {
  color: #059669;
  font-weight: 600;
}

.ols-dish-card--sandwich {
  border-color: #fde68a;
  background: #fffbeb;
  opacity: 0.7;
}

.ols-dish-card--sandwich:hover {
  border-color: #f59e0b;
  background: #fef3c7;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.ols-dish-card--sandwich input:checked ~ .ols-dish-label-compact {
  color: #d97706;
  font-weight: 600;
}

.ols-dish-card--sandwich input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ols-dish-card--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

.ols-dish-card--disabled:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  box-shadow: none !important;
}

.ols-dish-item--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.ols-dish-item--disabled .ols-dish-checkbox {
  cursor: not-allowed;
}

.ols-dish-card-compact input:checked {
  accent-color: #4f46e5;
}

.ols-dish-label-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.ols-dish-name-compact {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
}

.ols-dish-details-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #6b7280;
}

.ols-dish-weight {
  font-weight: 500;
  color: #4b5563;
}

.ols-dish-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ols-dish-tag {
  display: inline-block;
  padding: 2px 6px;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.ols-dish-tag--vegan {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
  font-weight: 700;
}

.ols-dish-tag--gf {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #111827;
  font-weight: 700;
}

.ols-dish-tag--lf {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
  font-weight: 700;
}

/* Кнопка "Подробнее" для блюда */
.ols-dish-details-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  margin-top: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ols-dish-details-toggle:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

.ols-dish-details-toggle.active {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #4f46e5;
}

.ols-dish-details-icon {
  font-size: 0.9rem;
}

.ols-dish-details-text {
  font-weight: 500;
}

/* Полные детали блюда */
.ols-dish-full-details {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  font-size: 0.8rem;
  line-height: 1.5;
}

.ols-dish-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.ols-dish-detail-item:last-child {
  margin-bottom: 0;
}

.ols-dish-detail-item strong {
  color: #374151;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ols-dish-detail-item span {
  color: #6b7280;
  font-size: 0.8rem;
}

/* Данные сотрудника (всегда видимые) */
.ols-employee-data-section {
  padding: 16px;
  margin: 16px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
}

.ols-section-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.ols-employee-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ols-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .ols-field-row {
    grid-template-columns: 1fr;
  }
}

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

.ols-field-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
}

.ols-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.15s;
  font-family: inherit;
  background: #ffffff;
}

.ols-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ols-input.ols-field--error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.ols-input[type="text"],
.ols-input[type="email"],
.ols-input[type="tel"] {
  /* Стили для текстовых полей */
}

.ols-input select,
select.ols-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.ols-input select:focus,
select.ols-input:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234f46e5' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}


/* Кнопки контактов */
.ols-contact-buttons {
  width: 100%;
  padding: 12px 16px;
  margin: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  text-align: center;
}

.ols-contact-text {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.ols-contact-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.ols-contact-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.ols-contact-link--telegram {
  background: #0088cc;
  color: #ffffff;
  border-color: #0088cc;
}

.ols-contact-link--telegram:hover {
  background: #006ba3;
  border-color: #006ba3;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.ols-contact-link--whatsapp {
  background: #25d366;
  color: #ffffff;
  border-color: #25d366;
}

.ols-contact-link--whatsapp:hover {
  background: #1da851;
  border-color: #1da851;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.ols-contact-icon {
  font-size: 1rem;
}

.ols-contact-label {
  font-weight: 500;
}

/* Фиксированная панель внизу */
.ols-sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.ols-sticky-total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-self: start;
}

.ols-sticky-submit {
  justify-self: center;
  grid-column: 2;
}

.ols-sticky-total-label {
  font-size: 0.75rem;
  color: #6b7280;
}

.ols-sticky-total-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: #111827;
}

.ols-total-discount {
  font-size: 0.7rem;
  color: #059669;
  margin-top: 2px;
}

.ols-sticky-submit {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transition: transform 0.12s, box-shadow 0.12s;
}

.ols-sticky-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.ols-sticky-submit:active {
  transform: translateY(0);
}

/* Промокод: после данных сотрудника, на десктопе — узкая колонка по центру, текст слева */
.ols-promo-block-outer {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 4px 0 8px;
  padding: 0 16px;
  box-sizing: border-box;
}

.ols-promo-block {
  width: 100%;
  max-width: 100%;
  text-align: left;
}

@media (min-width: 641px) {
  .ols-promo-block {
    max-width: 380px;
  }
}

.ols-promo-field-group {
  width: 100%;
}

.ols-promo-label {
  display: block;
  text-align: left;
}

.ols-promo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin-top: 8px;
}

.ols-promo-input {
  flex: 1 1 160px;
  min-width: 0;
}

.ols-wrapper .ols-promo-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px !important;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #4f46e5;
  background: #4f46e5;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  box-shadow: none;
}

.ols-wrapper .ols-promo-apply-btn:hover:not(:disabled) {
  background: #4338ca;
  border-color: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.ols-wrapper .ols-promo-apply-btn:active:not(:disabled) {
  transform: translateY(0);
}

.ols-wrapper .ols-promo-apply-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ols-promo-feedback {
  font-size: 0.85rem;
  margin-top: 6px;
  min-height: 1.2em;
  text-align: left;
}

.ols-promo-feedback--ok {
  color: #047857;
}

.ols-promo-feedback--err {
  color: #b91c1c;
}

/* Модалки */
.ols-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.ols-modal--open {
  opacity: 1;
  pointer-events: all;
}

.ols-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.ols-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  max-width: 90%;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

@media (min-width: 640px) {
  .ols-modal-content {
    max-width: 500px;
  }
}

.ols-modal-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: all 0.15s;
}

.ols-modal-close:hover {
  background: #e5e7eb;
  color: #111827;
}

.ols-modal-title {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 600;
}

.ols-modal-description {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: #6b7280;
}

.ols-modal-field {
  margin-bottom: 16px;
}

.ols-modal-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
}

.ols-modal-field input[type='text'],
.ols-modal-field select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.ols-modal-field input[type='text']:focus,
.ols-modal-field select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px #4f46e5;
}

.ols-modal-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ols-modal-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  font-weight: normal;
  margin: 0;
  transition: all 0.15s;
}

.ols-modal-radio-group label:hover {
  border-color: #4f46e5;
  background: #f5f3ff;
}

.ols-modal-radio-group input:checked + span,
.ols-modal-radio-group input[type='radio']:checked ~ span {
  color: #4f46e5;
}

.ols-modal-submit {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transition: transform 0.12s, box-shadow 0.12s;
}

.ols-modal-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* Ошибки */
.ols-errors {
  padding: 12px 16px;
  margin: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.85rem;
  display: none;
}

.ols-errors--visible {
  display: block;
}

/* Галерея */
.ols-gallery-wrapper {
  margin: 12px 16px;
}

.ols-gallery-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
  color: #4f46e5;
  background: #eef2ff;
  border-color: #c7d2fe;
}

.ols-gallery-trigger:hover {
  border-color: #4f46e5;
  background: #e0e7ff;
  color: #3730a3;
}

.ols-gallery-trigger-text {
  font-weight: 800;
}

.ols-gallery-trigger-icon {
  font-size: 1.1rem;
}

.ols-modal-content--gallery {
  max-width: 95%;
  padding: 0;
  background: #000000;
}

@media (min-width: 640px) {
  .ols-modal-content--gallery {
    max-width: 800px;
  }
}

.ols-gallery-slider {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 300px;
  overflow: hidden;
}

.ols-gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ols-gallery-slide--active {
  opacity: 1;
  z-index: 1;
}

.ols-gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.ols-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
}

.ols-gallery-prev,
.ols-gallery-next {
  width: 40px;
  height: 40px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ols-gallery-prev:hover,
.ols-gallery-next:hover {
  background: rgba(255, 255, 255, 0.4);
}

.ols-gallery-counter {
  font-size: 0.9rem;
  min-width: 60px;
  text-align: center;
}

.ols-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

/* Адаптивность */
@media (min-width: 640px) {
  .ols-dishes-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ols-sticky-footer {
    padding: 16px 24px;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .ols-sticky-total {
    justify-self: center;
    text-align: center;
  }
  
  .ols-sticky-submit {
    grid-column: 1;
    justify-self: center;
    width: 100%;
    max-width: 300px;
  }
}
