/* Телефон, вкладка «Как»: чипы выбора способа решения над редактором Pyodide. */

.ege-mobile-how-solutions {
  display: none;
}

@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) and (pointer: coarse) {
  body.ege-python-task-mobile.task-mobile-mode.task-mobile-pane-trainer.ege-task17-explain-panel-on
    #python-sandbox-editor-pane
    > .ege-mobile-how-solutions:not([hidden]) {
    --how-solutions-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(236, 253, 245, 0.94) 100%);
    --how-solutions-chip-bg: rgba(255, 255, 255, 0.9);
    --how-solutions-chip-text: #0f5132;
    --how-solutions-chip-border: rgba(16, 185, 129, 0.35);

    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
    min-width: 0;
    padding: 0.28rem 0.34rem;
    /* Длинные названия не переносим — листаем пальцем */
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--how-solutions-bg);
    border-bottom: 1px solid rgba(52, 211, 153, 0.28);
  }

  [data-theme="dark"]
    body.ege-python-task-mobile.task-mobile-mode.task-mobile-pane-trainer.ege-task17-explain-panel-on
    #python-sandbox-editor-pane
    > .ege-mobile-how-solutions:not([hidden]) {
    --how-solutions-bg: linear-gradient(180deg, rgba(22, 30, 38, 0.98) 0%, rgba(15, 23, 32, 0.96) 100%);
    --how-solutions-chip-bg: rgba(255, 255, 255, 0.04);
    --how-solutions-chip-text: #a7f3d0;
    --how-solutions-chip-border: rgba(52, 211, 153, 0.3);
  }

  .ege-mobile-how-solutions::-webkit-scrollbar {
    display: none;
  }

  .ege-mobile-how-solutions__chip {
    flex: 0 0 auto;
    min-height: 1.9rem;
    padding: 0.2rem 0.75rem;
    border: 1px solid var(--how-solutions-chip-border);
    border-radius: 999px;
    background: var(--how-solutions-chip-bg);
    color: var(--how-solutions-chip-text);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .ege-mobile-how-solutions__chip--active {
    border-color: transparent;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.35);
  }
}
