/* Appliance next-revision configurator (ČSN 33 1600) — compact */
.vr-ai-overlay {
  position: fixed; inset: 0; z-index: 12000;
  background: rgba(0,0,0,.55);
  display: none; align-items: flex-start; justify-content: center;
  padding: 12px 8px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.vr-ai-overlay.is-open { display: flex; }

.vr-ai-modal {
  width: min(460px, 100%);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: #151a22;
  color: #e8eef7;
  border: 1px solid #334155;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  margin: auto;
  padding: 12px 12px 10px;
  box-sizing: border-box;
}
html[data-vr-theme="light"] .vr-ai-modal {
  background: #fff; color: #0f172a; border-color: #c8d4e5;
}

.vr-ai-modal h2 {
  margin: 0 0 2px; font-size: 1rem; font-weight: 700; line-height: 1.25;
}
.vr-ai-modal .vr-ai-sub {
  margin: 0 0 10px; color: #94a3b8; font-size: .78rem; line-height: 1.3;
}
html[data-vr-theme="light"] .vr-ai-modal .vr-ai-sub { color: #64748b; }

.vr-ai-section { margin-bottom: 8px; }
.vr-ai-section > label {
  display: block; font-weight: 700; margin-bottom: 4px; font-size: .8rem;
}
.vr-ai-hint {
  display: block; margin-top: 2px; color: #94a3b8; font-size: .72rem; line-height: 1.3;
}
html[data-vr-theme="light"] .vr-ai-hint { color: #64748b; }

.vr-ai-options {
  display: grid; gap: 4px;
}
.vr-ai-options[data-ai-opts="groups"],
.vr-ai-options[data-ai-opts="kinds"] {
  grid-template-columns: 1fr 1fr;
}
.vr-ai-options[data-ai-opts="classes"] {
  grid-template-columns: repeat(3, 1fr);
}

.vr-ai-option {
  display: flex; gap: 6px; align-items: flex-start;
  border: 1px solid #334155; border-radius: 8px; padding: 5px 7px;
  cursor: pointer; background: #0f141c;
  min-height: 0;
}
html[data-vr-theme="light"] .vr-ai-option {
  background: #f8fafc; border-color: #d3deeb;
}
.vr-ai-option:hover { border-color: #3b82f6; }
.vr-ai-option.is-active {
  border-color: #22c55e; box-shadow: inset 0 0 0 1px #22c55e;
}
.vr-ai-option input {
  margin: 2px 0 0; flex: 0 0 auto; width: 14px; height: 14px;
}
.vr-ai-option .vr-ai-opt-title {
  font-weight: 650; font-size: .8rem; line-height: 1.25;
}
.vr-ai-option .vr-ai-opt-hint {
  display: none;
  font-size: .68rem; color: #94a3b8; margin-top: 2px; line-height: 1.25;
}
.vr-ai-option.is-active .vr-ai-opt-hint { display: block; }
html[data-vr-theme="light"] .vr-ai-option .vr-ai-opt-hint { color: #64748b; }

.vr-ai-options[data-ai-opts="classes"] .vr-ai-option {
  align-items: center; justify-content: center;
  padding: 6px 4px; text-align: center;
}
.vr-ai-options[data-ai-opts="classes"] .vr-ai-option input { display: none; }
.vr-ai-options[data-ai-opts="classes"] .vr-ai-opt-title { font-size: .85rem; }

.vr-ai-row {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px;
}

.vr-ai-section input[type="date"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 180px;
  height: 32px;
  padding: 0 8px;
  font-size: .85rem;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #0f141c;
  color: inherit;
}
html[data-vr-theme="light"] .vr-ai-section input[type="date"] {
  background: #fff; border-color: #c8d4e5;
}

.vr-ai-result {
  border: 1px solid #22c55e55;
  background: linear-gradient(180deg, #12301f, #0f1a14);
  border-radius: 8px; padding: 8px 10px; margin: 8px 0;
}
html[data-vr-theme="light"] .vr-ai-result {
  background: #ecfdf5; border-color: #86efac;
}
.vr-ai-result.is-warn {
  border-color: #f59e0b88;
  background: linear-gradient(180deg, #3a2a10, #1a140a);
}
html[data-vr-theme="light"] .vr-ai-result.is-warn {
  background: #fffbeb; border-color: #fcd34d;
}
.vr-ai-result .vr-ai-big {
  font-size: 1.05rem; font-weight: 800; margin-top: 2px; line-height: 1.25;
}
.vr-ai-result .vr-ai-meta { font-size: .75rem; color: #cbd5e1; margin-top: 2px; line-height: 1.3; }
html[data-vr-theme="light"] .vr-ai-result .vr-ai-meta { color: #475569; }

.vr-ai-actions {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 6px;
}
.vr-ai-actions .btn {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
}

.vr-next-badge {
  display: inline-block; margin-left: 8px; font-size: .78rem; color: #93c5fd; font-weight: 600;
}
.vr-next-badge em { font-style: normal; opacity: .75; font-weight: 500; }
html[data-vr-theme="light"] .vr-next-badge { color: #1d4ed8; }

.app-bulk-pick { display: inline-flex; align-items: center; margin-right: 4px; }
.app-bulk-pick input { width: auto; }

.vr-app-interval {
  border: 1px dashed #334155; border-radius: 8px; padding: 8px; margin-bottom: 4px;
}
html[data-vr-theme="light"] .vr-app-interval { border-color: #cbd5e1; background: #f8fafc; }
.vr-app-interval .btn {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 560px) {
  .vr-ai-overlay { padding: 8px 6px; align-items: stretch; }
  .vr-ai-modal {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 10px;
    padding: 10px 10px 8px;
  }
  .vr-ai-row { grid-template-columns: 1fr; gap: 6px; }
  .vr-ai-options[data-ai-opts="groups"],
  .vr-ai-options[data-ai-opts="kinds"] {
    grid-template-columns: 1fr 1fr;
  }
  .vr-ai-options[data-ai-opts="kinds"] {
    grid-template-columns: 1fr;
  }
  .vr-ai-actions {
    flex-direction: column-reverse;
  }
  .vr-ai-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    height: 40px;
  }
  .vr-ai-section input[type="date"] {
    max-width: 100%;
  }
}
