/* WineHype theme. Loaded after the vendor theme and app styles, including for body-level popups. */
:root {
  --e-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-sf-primary: var(--forest);
  --color-sf-primary-light: #b9cdbd;
  --color-sf-primary-lighter: var(--soft);
  --color-sf-primary-dark: var(--forest-light);
  --color-sf-primary-darker: #172f28;
  --color-sf-primary-bg-color-hover: var(--forest-light);
  --color-sf-primary-bg-color-pressed: #172f28;
  --color-sf-primary-bg-color-selected: var(--forest);
  --color-sf-brand-primary: var(--forest);
  --color-sf-brand-primary-d10: var(--forest-light);
  --color-sf-content-bg-color: var(--white);
  --color-sf-content-bg-color-alt1: var(--white);
  --color-sf-content-bg-color-alt2: var(--paper);
  --color-sf-content-bg-color-alt3: var(--line);
  --color-sf-content-bg-color-alt4: var(--soft);
  --color-sf-content-bg-color-alt5: #e7eee1;
  --color-sf-content-bg-color-hover: var(--soft);
  --color-sf-content-bg-color-pressed: #dfe8da;
  --color-sf-content-bg-color-focus: var(--soft);
  --color-sf-content-bg-color-selected: #e4eddf;
  --color-sf-content-bg-color-dragged: var(--soft);
  --color-sf-content-bg-color-disabled: #f0f2ec;
  --color-sf-content-text-color: var(--ink);
  --color-sf-content-text-color-alt1: #526052;
  --color-sf-content-text-color-alt2: #647263;
  --color-sf-content-text-color-alt3: var(--muted);
  --color-sf-placeholder-text-color: var(--muted);
  --color-sf-icon-color: #6e7d70;
  --color-sf-flyout-bg-color: var(--white);
  --color-sf-flyout-bg-color-hover: var(--soft);
  --color-sf-flyout-bg-color-pressed: #dfe8da;
  --color-sf-flyout-bg-color-selected: #e4eddf;
  --color-sf-flyout-bg-color-focus: var(--soft);
  --color-sf-overlay-bg-color: #203e3566;
  --color-sf-table-bg-color-hover: #f4f7f0;
  --color-sf-table-bg-color-pressed: #dfe8da;
  --color-sf-table-bg-color-selected: #e4eddf;
  --color-sf-border-light: var(--line);
  --color-sf-border: #dce2d8;
  --color-sf-border-dark: #c8d3c1;
  --color-sf-border-hover: #8b9f87;
  --color-sf-border-pressed: var(--forest-light);
  --color-sf-border-focus: var(--forest);
  --color-sf-border-selected: #90a486;
  --color-sf-border-dragged: var(--forest);
  --color-sf-secondary-border-color: #dce2d8;
  --color-sf-secondary-bg-color-hover: var(--soft);
  --color-sf-secondary-border-color-hover: #c8d3c1;
  --color-sf-secondary-bg-color-pressed: #dfe8da;
  --color-sf-secondary-border-color-pressed: #90a486;
  --color-sf-secondary-border-color-focus: var(--forest);
  --color-sf-secondary-bg-color-selected: #e4eddf;
  --color-sf-secondary-border-color-selected: #90a486;
  --color-sf-secondary-text-color-selected: var(--forest);
  --color-sf-shadow-color: var(--forest);
  --vinea-control-radius: 8px;
  --vinea-popup-shadow: 0 12px 36px #203e351f, 0 2px 8px #203e350a;
}

/* Buttons retain native compact sizing in grids, calendars and popup navigation. */
.e-btn.e-control {
  font-family: var(--e-font-family);
  border-radius: var(--vinea-control-radius);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.campaign-controls > .e-btn,
.campaign-dialog-actions > .e-btn {
  min-height: 40px;
  padding: 10px 16px;
  font-size: 12px;
  box-shadow: none;
}
.e-btn.e-control:disabled { cursor: not-allowed; }
.e-btn.e-control.e-primary .e-btn-icon,
.e-btn.e-control.e-primary svg,
.button.primary .e-icons,
.button.primary svg { color: #fff; }
.campaign-controls > .e-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; line-height: 20px; }
.campaign-controls > .e-btn .e-btn-icon { margin: 0; padding: 0; float: none; }
/* Page filters use the same compact height as registration fields. */
.campaign-filter-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@media(max-width:900px) { .campaign-filters > .campaign-filter-field:first-child { grid-column: 1 / -1; } }
@media(max-width:520px) { .campaign-filters > .campaign-filter-field:first-child { grid-column: auto; } }
.campaign-filters .e-input-group.e-control-wrapper,
.top-actions .campaign-context-select.e-input-group.e-control-wrapper { height: 40px; min-height: 40px; padding: 0; box-sizing: border-box; }
.campaign-filters .e-input-group.e-control-wrapper input.e-input,
.top-actions .campaign-context-select.e-input-group.e-control-wrapper input.e-input { height: 100%; min-height: 0; padding: 8px 10px; line-height: 22px; font-size: 14px; box-sizing: border-box; }
.campaign-filters .e-input-group .e-input-group-icon,
.top-actions .campaign-context-select .e-input-group-icon { min-height: 0; min-width: 32px; }
.campaign-filters .e-multi-select-wrapper { min-height: 0; padding: 0 32px 0 10px; line-height: 38px; }
.campaign-filters .e-multi-select-wrapper .e-searcher { margin: 0; padding: 0; }
.campaign-filters .e-multi-select-wrapper.e-delimiter .e-searcher { height: 38px; }
.campaign-filters .e-multiselect.e-control-container .e-multi-select-wrapper .e-ddl-icon,
.campaign-filters .e-multiselect.e-control-container .e-multi-select-wrapper .e-clear-icon { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); margin: 0; height: 32px; width: 28px; }
.campaign-filters .e-multiselect.e-control-container .e-multi-select-wrapper .e-clear-icon { right: 32px; }
.campaign-filters .e-multi-select-wrapper input[type=text] { height: 38px; min-height: 0; padding: 0; border: 0; line-height: 38px; box-sizing: border-box; }
.campaign-filters .e-input-group::before,
.campaign-filters .e-input-group::after,
.top-actions .campaign-context-select.e-input-group::before,
.top-actions .campaign-context-select.e-input-group::after { display: none; }
.campaign-journal .campaign-search { min-height: 44px; padding: 0 12px; margin-bottom: 16px; }
.campaign-journal .campaign-search .e-input-group { min-height: 42px; padding: 0; }
.campaign-journal .campaign-search input.e-input { height: 42px; min-height: 0; padding: 8px 0; line-height: 24px; box-sizing: border-box; }
.campaign-filters > .e-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; }
@media(max-width:640px) {
 .campaign-filters .e-input-group.e-control-wrapper input.e-input,
 .campaign-filters .e-multi-select-wrapper input[type=text],
 .campaign-filters .e-multi-select-wrapper .e-delim-view,
 .top-actions .campaign-context-select.e-input-group.e-control-wrapper input.e-input,
 .campaign-journal .campaign-search input.e-input { font-size: 16px; }
 .campaign-filters { gap: 12px; }
 .campaign-controls { margin-bottom: 16px; }
}
.e-btn.e-control:focus-visible,
.e-checkbox-wrapper:focus-visible .e-frame {
  outline: 3px solid #b68a5080;
  outline-offset: 3px;
}

/* Outline fields, with one border on the wrapper rather than a second on the input. */
.vinea-form-field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.vinea-form-field > label { margin: 0; }
.campaign-task-dialog .vinea-form-field { gap: 6px; }
.e-input-group.e-control-wrapper,
.e-input-group,
.e-multiselect.e-input-group.e-control-wrapper {
  border-radius: var(--vinea-control-radius);
  border-color: var(--color-sf-border);
  background: var(--white);
  font-family: var(--e-font-family);
  box-shadow: none;
}
.e-input-group.e-control-wrapper input.e-input,
.e-input-group input.e-input,
.e-input-group.e-control-wrapper textarea.e-input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  margin: 0;
  min-width: 0;
}
.campaign-filters .e-input-group,
.campaign-task-dialog .e-input-group {
  min-height: 42px;
  font-size: 13px;
}
.campaign-task-dialog .e-input-group input.e-input,
.campaign-task-dialog .e-input-group textarea.e-input {
  padding: 10px 12px;
}
.e-input-group.e-control-wrapper.e-input-focus:not(.e-error):not(.e-warning):not(.e-success),
.e-input-group.e-input-focus:not(.e-error):not(.e-warning):not(.e-success) {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px #203e3514;
}
.e-input-group.e-control-wrapper::after,
.e-input-group::after { border-radius: 0 0 var(--vinea-control-radius) var(--vinea-control-radius); }
.e-input-group .e-input-group-icon { color: #6e7d70; }
.e-multiselect .e-chips {
  background: var(--soft);
  color: var(--forest);
  border: 1px solid #d6e1cd;
  border-radius: 6px;
}
.e-checkbox-wrapper .e-frame { border-radius: 4px; }
/* The existing search frame supplies its own border and full width. */
.campaign-search .e-input-group.e-control-wrapper,
.campaign-search .e-input-group.e-control-wrapper.e-input-focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}

/* Popup roots live outside page containers, so theme them globally. */
.e-popup.e-popup-open:not(.e-dialog):not(.e-tooltip-wrap),
.e-dropdown-popup.e-popup,
.e-datepicker.e-popup,
.e-timepicker.e-popup,
.e-multi-select-list-wrapper.e-popup {
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: var(--vinea-popup-shadow);
  font-family: var(--e-font-family);
}
.e-dropdownbase .e-list-item,
.e-dropdownbase .e-list-group-item {
  font-family: var(--e-font-family);
  font-size: 13px;
}
.e-dropdownbase .e-list-item.e-active,
.e-dropdownbase .e-list-item.e-active.e-hover {
  color: var(--forest);
  background: #e4eddf;
}
.e-calendar .e-content td.e-selected span.e-day,
.e-calendar .e-content td.e-selected:hover span.e-day {
  background: var(--forest);
  color: white;
  border-radius: 7px;
}
.e-calendar .e-content td.e-today:not(.e-selected) span.e-day { color: var(--forest); }
.e-calendar .e-header .e-title,
.e-calendar .e-footer-container .e-today { color: var(--forest); }

/* Match the application's cards and registration windows. */
.enology-form { display: flex; flex-direction: column; gap: 18px; }
.enology-dialog .order-line { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) auto; align-items: end; gap: 12px; }
@media(max-width:640px) { .enology-dialog .order-line { grid-template-columns: minmax(0,1fr); } }
.cellar-layout .e-btn.layout-room,
.assignment-dialog .e-btn.layout-assignment-option { display: flex; text-align: left; white-space: normal; }
.cellar-layout .e-btn.layout-slot { display: flex; flex-direction: column; white-space: normal; }
.cellar-layout .e-btn.tank-lot { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; text-align: left; white-space: normal; }
.cellar-layout .tank-lot-info { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 6px; line-height: 1.45; }
.cellar-layout .tank-lot-info > strong { font-size: 13px; overflow-wrap: anywhere; }
.cellar-layout .tank-lot-reference { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.cellar-layout .tank-lot-details { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--forest-light); font-size: 11px; }
.cellar-layout .tank-lot-volume { margin-left: auto; font-weight: 600; white-space: nowrap; }
.cellar-layout .tank-lot-chevron { display: flex; align-self: center; align-items: center; justify-content: center; flex: 0 0 22px; color: var(--muted); }
.cellar-layout .tank-lot-chevron svg { position: static; display: block; }
.cellar-layout .e-btn.layout-unassign,
.cellar-layout .e-btn.layout-unassign:hover,
.cellar-layout .e-btn.layout-unassign:focus { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 6px; }
.assignment-dialog .e-dlg-header .eyebrow { display: block; font-family: var(--e-font-family); }
.heading-actions > .e-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 14px; font-size: 12px; line-height: 20px; text-align: center; }
.heading-actions > .e-btn .e-btn-icon { float: none; margin: 0; padding: 0; }
.heading-actions > .e-btn.vineyard-create > svg { color: #fff; stroke: #fff; }
.vineyard-card .card-footer { flex-wrap: wrap; gap: 8px; }
.vineyard-card .e-btn.vineyard-card-command { min-height: 32px; padding: 6px 8px; font-size: 11px; }
.e-dialog.e-control {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px #203e3533;
  color: var(--ink);
  font-family: var(--e-font-family);
  overflow: hidden;
}
.e-dialog .e-dlg-header-content {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 24px 28px 20px;
}
.e-dialog .e-dlg-header {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -.035em;
  color: var(--forest);
}
.e-dialog .e-dlg-content { background: var(--white); color: var(--ink); }
.e-dialog .e-footer-content { border-top: 1px solid var(--line); background: var(--paper); }
.e-dialog .e-dlg-closeicon-btn { border-radius: 6px; }

/* Scheduler headers, active view, cells and events use the WineHype palette. */
.e-schedule.e-control { border-color: var(--line); font-family: var(--e-font-family); }
.e-schedule .e-schedule-toolbar,
.e-schedule .e-schedule-toolbar .e-toolbar-items { background: var(--paper); }
.e-schedule .e-schedule-toolbar .e-toolbar-item.e-active-view .e-tbar-btn {
  background: #e4eddf;
  color: var(--forest);
  border-radius: var(--vinea-control-radius);
}
.e-schedule .e-schedule-toolbar .e-toolbar-item.e-active-view .e-tbar-btn-text { color: var(--forest); }
.e-schedule .e-vertical-view .e-header-cells,
.e-schedule .e-month-view .e-header-cells { background: #f4f7f0; }
.e-schedule .e-vertical-view .e-work-cells.e-work-hours,
.e-schedule .e-vertical-view .e-work-cells.e-work-days { background: #fafbf8; }
.e-schedule .e-vertical-view .e-work-cells.e-selected-cell,
.e-schedule .e-month-view .e-work-cells.e-selected-cell { background: #e4eddf; }
.e-schedule .e-appointment { border-radius: 7px; }
.e-schedule .e-appointment.e-appointment-border { box-shadow: 0 0 0 2px var(--accent); }
.e-schedule .e-vertical-view .e-current-timeline { border-color: var(--accent); }
.e-schedule .e-current-time { color: var(--amber); }

/* Grid commands, selected rows and pager share the same theme. */
.vinea-grid .e-grid .e-toolbar,
.vinea-grid .e-grid .e-toolbar-items { background: #f8faf6; }
.vinea-grid .e-grid .e-toolbar .e-tbar-btn,
.vinea-grid .e-grid .e-toolbar .e-tbar-btn .e-icons { color: var(--forest); }
.vinea-grid .e-grid td.e-active,
.vinea-grid .e-grid .e-rowcell.e-selectionbackground { background: #e4eddf; color: var(--ink); }
.vinea-grid .e-pager .e-currentitem,
.vinea-grid .e-pager .e-currentitem:hover { background: var(--forest); color: white; border-radius: 6px; }

@media (max-width: 520px) {
  .e-dialog .e-dlg-header-content { padding: 20px 18px 16px; }
  .e-dialog .e-dlg-header { font-size: 25px; }
}

/* Shared filters stay above the native calendar/list tab contents. */
.campaign-view-tabs.e-tab { min-width: 0; }
.campaign-view-tabs.e-tab > .e-tab-header { margin-bottom: 18px; border-color: var(--line); }
.campaign-view-tabs.e-tab > .e-tab-header .e-toolbar-item .e-tab-wrap { border-radius: 8px 8px 0 0; }
.campaign-view-tabs.e-tab > .e-tab-header .e-toolbar-item.e-active .e-tab-wrap { background: var(--soft); }
.campaign-view-tabs.e-tab > .e-tab-header .e-toolbar-item .e-tab-text { font-size: 13px; font-weight: 500; }
.campaign-view-tabs.e-tab > .e-tab-header .e-toolbar-item.e-active .e-tab-text { color: var(--forest); }
.campaign-view-tabs.e-tab > .e-tab-header .e-indicator { background: var(--forest); }
.campaign-view-tabs.e-tab > .e-content > .e-item { min-width: 0; }

/* Compact task fields and anchored mobile dropdowns. Leave notes multiline. */
.harvest-dialog .production-material-row > .e-btn { align-self: end; height: 36px; }
@media (max-width: 640px) {
  .harvest-dialog .production-material-row > .e-btn { grid-column: 2; grid-row: 3; height: 40px; }
}
.campaign-task-dialog .e-input-group.e-control-wrapper:not(.e-multi-line-input) {
  height: 36px;
  min-height: 36px;
  padding: 0;
}
.campaign-task-dialog .e-input-group.e-control-wrapper:not(.e-multi-line-input) input.e-input {
  height: 100%;
  min-height: 0;
  padding: 6px 10px;
  line-height: 20px;
  font-size: 13px;
}
.campaign-task-dialog .e-input-group .e-input-group-icon {
  min-height: 0;
  min-width: 32px;
}
.campaign-task-dialog .form-grid { gap: 14px 16px; }
.campaign-task-dialog .form-grid > label { gap: 6px; }
.campaign-task-dialog .task-form-section { padding: 12px 14px; }
.campaign-task-dialog .task-form-sections { gap: 14px; }
.campaign-task-select.e-popup {
  max-width: calc(100vw - 32px);
}
.campaign-task-select.e-popup .e-content {
  max-height: min(240px, 40dvh) !important;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.campaign-task-select.e-popup .e-list-item {
  height: auto;
  min-height: 36px;
  padding: 8px 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
@media (max-width: 600px) {
  .campaign-task-dialog .e-input-group.e-control-wrapper:not(.e-multi-line-input) {
    height: 40px;
    min-height: 40px;
  }
  /* A 16px input prevents Safari zooming the form when the field receives focus. */
  .campaign-task-dialog .e-input-group.e-control-wrapper:not(.e-multi-line-input) input.e-input,
  .campaign-task-dialog .e-input-group textarea.e-input,
  .campaign-task-select.e-popup .e-input-group input.e-input {
    font-size: 16px;
  }
  .campaign-task-select.e-popup .e-list-item { min-height: 40px; font-size: 14px; }
}
