/* Формы */
fieldset {
    margin-bottom:10px;
    text-align:left;
}

fieldset input.error {
    color:red;
}

/* Формы end */

/* Базовые стили для всех инпутов, текстовых полей и селектов */

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input,
textarea,
select {
    transition: all ease 200ms;
}

fieldset input[type="datetime-local"],
fieldset input[type="date"],
fieldset input[type="password"],
fieldset input[type=tel],
fieldset input[type=number],
fieldset input[type=text],
fieldset textarea,
fieldset select {
    width: 100%;
}

input[type="datetime-local"],
input[type="date"],
input[type="password"],
input[type=tel],
input[type=number],
input[type=text],
textarea,
select {
    padding: 14px 20px;
    border: 2px solid #e5e5e7;
    border-radius: 12px;
    font-size: 18px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: #1d1d1f;
    font-weight: 400;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    min-width: 80px;
}

/* Стили для зеленого инпута */
input.green[type=tel],
input.green[type=number],
input.green[type=text],
textarea.green,
select.green {
    border-color: #34C759 !important;
    background: #f8fff96e !important;
}

input.green[type=tel]:focus,
input.green[type=number]:focus,
input.green[type=text]:focus,
textarea.green:focus,
select.green:focus {
    border-color: #34C759 !important;
    background: #ffffff !important;
    box-shadow:
            0 0 0 4px rgba(52, 199, 89, 0.1),
            0 4px 12px rgba(0, 0, 0, 0.05);
}

input.green[type="date"]:hover,
input.green[type="password"]:hover,
input.green[type=tel]:hover,
input.green[type=number]:hover,
input.green[type=text]:hover,
textarea.green:hover,
select.green:hover {
    border-color: #30a14e !important;
    background: #f0fff4 !important;
}

/* Альтернативный вариант с оберткой */
.price-input-wrapper {
    position: relative;
    display: inline-block;
}

.price-input-wrapper::after {
    content: "₽";
    position: relative;
    right: 26px;
    color: #6c757d;
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
}

/* Для инпута внутри обертки */
.price-input-wrapper input.pricefield {
    padding-right: 30px !important;
    position: relative;
    z-index: 1;
}

input.pricefield {
    text-align: right;
    width: 120px !important;
}

input.pricefield.mln {
    width: 140px !important;
}

/* Стили для фокуса всех инпутов (кроме чекбоксов и радио) */
input[type="date"]:focus,
input[type="password"]:focus,
input[type=tel]:focus,
input[type=number]:focus,
input[type=text]:focus,
textarea:focus,
select:focus {
    border-color: #55acee !important;
    background: #ffffff !important;
    box-shadow:
            0 0 0 4px rgba(0, 122, 255, 0.1),
            0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Стили для ховера всех инпутов (кроме чекбоксов и радио) */
input[type="date"]:hover,
input[type="password"]:hover,
input[type=tel]:hover,
input[type=number]:hover,
input[type=text]:hover,
textarea:hover,
select:hover {
    border-color: #c7c7cc;
    background: #fafafa;
}

/* Дополнительные стили для конкретных типов инпутов */
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"] {
    /* Наследуют все стили от базового input */
}

/* Стили для disabled состояний */
input:not([type="checkbox"]):not([type="radio"]):disabled,
textarea:disabled,
select:disabled {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.3;
    filter: grayscale(1);
}

/* Стили для invalid состояний */
input:not([type="checkbox"]):not([type="radio"]):invalid,
textarea:invalid,
select:invalid {
    border-color: #dc3545;
}

input:not([type="checkbox"]):not([type="radio"]):invalid:focus,
textarea:invalid:focus,
select:invalid:focus {
    border-color: #dc3545 !important;
    box-shadow:
            0 0 0 4px rgba(220, 53, 69, 0.1),
            0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Стили для placeholder */
input:not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

form.searchform input[type=text] {
    padding: 5px 15px !important;
    margin-top: 5px !important;
}

form.searchform input[type=submit] {
    background: url('/tpl/default/img/searchicon.png');
    background-repeat: no-repeat;
    width: 20px;
    height: 20px;
    border: none;
    position: absolute;
    right:-10px;
    text-indent: -9000px;
    top: 16px;
    cursor: pointer;
    margin: 0px;
    text-shadow: none;
    box-shadow: none;
    padding: 0px !important;
}