/* Основные стили для полей ввода */ /*Размер блока, цвет, отступы, границы*/ .c-input { background-color: var(--input-bg); border: 2px solid var(--с-border-gray); width: 100%; height: 57px; padding-left: 16px; border-radius: 8px; } /*Шрифт*/ .c-input { font-family: Manrope, sans-serif; font-size: 18px; color: var(--с-gray); } /*Анимация*/ .c-input { transition: border 0.3s ease, color 0.3s ease } @keyframes focus-border-animation { from { border-color: var(--с-border-gray); } to { border-color: var(--c-primary); } } .c-input:focus { color: var(--с-dark); border: 2px solid var(--c-primary); outline: none; animation: focus-border-animation 0.3s forwards; } /*Лейбл поля*/ /*Отступы*/ .c-label { padding: 0 16px 4px 16px; } /*Текст*/ .c-label { color: var(--с-gray); font-size: 14px; font-family: Manrope, sans-serif; } /*Анимация*/ .c-label { transition: color 0.3s ease; cursor: pointer; } /*Контейнер поля ввода и лейбла*/ .c-labeled-input { user-select: none; /* Для современных браузеров */ -moz-user-select: none; /* Для Firefox */ -webkit-user-select: none; /* Для Safari */ -ms-user-select: none; /* Для Internet Explorer/Edge */ } /*Анимация лейбла при фокусе поля*/ .c-labeled-input:focus-within .c-label { color: var(--c-primary); } /*Валидация*/ .invalid > .c-input { border: 2px solid var(--c-danger); } .invalid > .c-input::placeholder { color: var(--c-danger-light) ; } .invalid > .c-label { color: var(--c-danger); } /*_____________*/ /*Поле ввода числа*/ /*Отключение кнопок управления*/ input[type="number"] { -webkit-appearance: textfield; -moz-appearance: textfield; appearance: textfield; } input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; } /*Поле ввода даты*/ /*Позиционирование иконки*/ .calendar-icon { position: absolute; right: 15px; margin-top: 15px; pointer-events: none; font-size: 18px; color: #555; } .input-with-icon { position: relative; display: inline-block; } /*Цвет иконки*/ .calendar-icon { color: var(--с-gray); } /*Анимация фокуса*/ .calendar-icon { transition: color 0.3s ease; } .input-with-icon:focus-within .calendar-icon { color: var(--c-primary); }