/* Калькулятор «Сумма прописью» — web-calculator.ru
   Следует общему паттерну сайта (inputs-style.css), как математические калькуляторы. */

#propis-calc { font-size: 16px; position: relative; }

#propis-calc .tab-content { display: none; }
#propis-calc .tab-content.active { display: block; }

/* (3,4) Отступ под табами — единый ритм 8px, чтобы не прилипали к полю */
#propis-calc .tabs { margin-bottom: 8px; }

/* (6) Поля ввода — точный паттерн сайта: label плавает поверх инпута,
   шрифт наследуется (16px Unbounded), высота 64px из inputs-style. */
#propis-calc .calculator__input {
    font-size: inherit;
    width: 100%;
    padding: 26px 16px 10px;
    border: 1px solid #ccc;
    border-radius: 16px;
    box-sizing: border-box;
    margin: 0;
    background: #fff;
    color: #000;
}

/* (4) Единый вертикальный ритм 8px между блоками */
#propis-calc .form-group { margin-bottom: 8px; }

/* (1,2) Строка «сумма + валюта»: инпут и селект одной высоты,
   селект шире, чтобы валюта помещалась в одну строку */
#propis-calc .form-group__wrapper { align-items: stretch; gap: 8px; margin-bottom: 8px; }
#propis-calc .form-group__wrapper .form-group { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
#propis-calc #currencySelect { flex: 0 0 250px; max-width: 250px; margin-bottom: 0; }
#propis-calc #currencySelect .custom-select__selected { white-space: nowrap; }

/* Строка результата */
#propis-calc .propis-row { padding: 12px 0; border-bottom: 1px solid #ddd; }
#propis-calc .propis-row:last-child { border-bottom: none; }
#propis-calc .propis-row__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
#propis-calc .propis-row__cap {
    font-family: 'Unbounded', serif;
    font-size: 10px;
    line-height: 14px;
    color: #000;
    opacity: .5;
}
#propis-calc .propis-out {
    margin: 0;
    padding: 0;
    font-family: 'Unbounded', serif;
    font-size: 16px;
    line-height: 22px;
    color: #000;
}

/* Кнопка копирования */
#propis-calc .propis-copy {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #000;
    font-size: 10px;
    line-height: 12px;
    font-family: 'Unbounded', serif;
    cursor: pointer;
    transition: all .25s;
}
#propis-calc .propis-copy:hover { background: #000; color: #fff; border-color: #000; }

/* (5) Выбор рода — чипы с галочкой, в стиле дизайна */
#propis-calc .propis-gender { margin-bottom: 8px; }
#propis-calc .propis-gender > .label-text { margin-bottom: 8px; }
#propis-calc .propis-gender__options { display: flex; flex-wrap: wrap; gap: 8px; }

#propis-calc .propis-chip { position: relative; cursor: pointer; margin: 0; }
#propis-calc .propis-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
#propis-calc .propis-chip__box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    color: #000;
    font-family: 'Unbounded', serif;
    font-size: 12px;
    line-height: 1;
    transition: all .2s;
}
/* Кружок-индикатор с галочкой */
#propis-calc .propis-chip__box::before {
    content: '';
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1px solid #bbb;
    border-radius: 50%;
    box-sizing: border-box;
    transition: all .2s;
}
#propis-calc .propis-chip input:checked + .propis-chip__box {
    border-color: #000;
    background: #f3f3f3;
}
#propis-calc .propis-chip input:checked + .propis-chip__box::before {
    border-color: #000;
    background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4L19 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
#propis-calc .propis-chip input:hover + .propis-chip__box { border-color: #999; }
#propis-calc .propis-chip input:focus-visible + .propis-chip__box { outline: 2px solid #000; outline-offset: 2px; }

/* Тост «Скопировано» */
#propis-calc .propis-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 18px;
    background: #000;
    color: #fff;
    border-radius: 12px;
    font-family: 'Unbounded', serif;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 1000;
}
#propis-calc .propis-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* (2) Мобильная версия: блоки в столбик, селект валюты на всю ширину */
@media screen and (max-width: 767px) {
    #propis-calc .form-group__wrapper { flex-direction: column; gap: 8px; }
    #propis-calc #currencySelect { flex: 1 1 auto; width: 100%; max-width: 100%; }
    #propis-calc .propis-out { font-size: 15px; }
}
