.Root {
  font-family: YS Text, Arial, sans-serif;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.Calculator {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

.Calculator-Screen {
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
}

.RadioList {
  display: inline-flex;
  margin-bottom: 12px;
}

.Radiobox-Radio {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-right: 12px;
}

.Radiobox-Box {
  position: relative;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  background: #fff;
}

.Radiobox-Radio_checked .Radiobox-Box {
  border-color: #ffdb4d;
  background: #ffdb4d;
}

.Radiobox-Radio_checked .Radiobox-Box::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
}

.Radiobox-Control {
  position: absolute;
  opacity: 0;
}

.Radiobox-Text {
  font-size: 13px;
  color: #333;
}

.CalculatorDisplay {
  min-height: 20px;
  font-size: 14px;
  color: #707070;
  text-align: right;
  margin-bottom: 4px;
  white-space: pre-wrap;
  word-break: break-all;
}

.Textinput {
  position: relative;
}

.Textinput-Control {
  width: 100%;
  padding: 8px 0;
  font-size: 28px;
  line-height: 1.3;
  text-align: right;
  color: #000;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  overflow: hidden;
  min-height: 40px;
  white-space: pre-wrap;
  word-break: break-all;
}

.Textinput-Box {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: #fff;
}

.CalculatorButtons {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e0e0e0;
  padding: 1px;
}

.Button {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 16px 8px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  background: #fff;
  transition: background 0.2s;
  color: #000; /* Добавляем явное указание черного цвета текста */
}

.Button:hover {
  background: #f5f5f6;
  color: #000; /* Явно указываем черный цвет при наведении */
}

.Button_view_default {
  background: #f5f5f6;
  color: #000;
}

.Button_view_default:hover {
  background: #e6e6e6;
  color: #000;
}

.Button_view_pseudo {
  background: #fff;
  color: #000;
}

.Button_view_pseudo:hover {
  background: #f5f5f6;
  color: #000;
}

.Button_view_action {
  background: #1e43cb;
  color: #000;
}

.Button_view_action:hover {
  background: #1937a5;
  color: #000;
}
.Button-Text {
  display: inline-block;
  vertical-align: middle;
}

.FeedbackFooter {
  padding: 12px 16px;
  text-align: center;
  border-top: 1px solid #e0e0e0;
}

.Link {
  color: #707070;
  font-size: 13px;
  cursor: pointer;
}

.Link:hover {
  color: #333;
}

/* Добавляем в конец файла */
.CalculatorDisplay {
    min-height: 60px; /* Увеличиваем минимальную высоту */
    max-height: 120px; /* Ограничиваем максимальную высоту */
    overflow-y: auto; /* Добавляем прокрутку если много строк */
    font-size: 16px;
    line-height: 1.5;
    padding: 4px 0;
}

.CalculatorDisplay div {
    margin: 2px 0;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* История вычислений */
#calc-history {
    min-height: 60px;
    padding: 8px 0;
    text-align: right;
    font-size: 15px;
}

.history-item {
    margin: 4px 0;
    line-height: 1.4;
}

.history-expression {
    color: #666;
}

.history-result {
    color: #000;
    font-weight: bold;
    margin-left: 5px;
}

/* Поле ввода */
.Textinput-Control {
    min-height: 40px;
    max-height: 200px;
    overflow-y: auto !important;
}