@-ms-viewport {
  width: device-width;
}

html {
  box-sizing: border-box;
  -ms-overflow-style: scrollbar;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

.scale-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.layout {
  width: 320px;
  height: 568px;
  transform-origin: center top;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.layout.layout_visible {
  opacity: 1;
  visibility: visible;
}

.body_modal .scale-wrapper {
	position: relative;
	z-index: 2;
}

.body_modal .scale-wrapper::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	background: #000;
	opacity: 0.85;
	z-index: 999;
}

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
*::-webkit-input-placeholder { 
	color: #666;
	opacity: 1;
}
*:-moz-placeholder {
	color: #666;
	opacity: 1;
}
*::-moz-placeholder {
	color: #666;
	opacity: 1;
}
*:-ms-input-placeholder {
	color: #666;
	opacity: 1;
}

body {
	font-family: "Roboto";
	font-size: 13px;
	line-height: normal;
	color: #000;
	overflow-x: hidden;
	margin: 0;
	background-color: #fff;
}
button {
	cursor: pointer;
}
button, input, optgroup, select, textarea {
	font-family: inherit;
}
input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
button,
textarea,
input.text,
input[type="text"],
input[type="button"],
input[type="number"],
input[type="submit"] {
  -webkit-appearance: none;
}
*:link, 
*:visited, 
*:hover, 
*:focus,
*:active {
	outline: 0;
	-webkit-tap-highlight-color: transparent;
}
a, button, input, img {
	transition: all 0.3s;
}
h1,h2,h3,h4,h5,h6 {
	padding: 0;
	margin: 0;
	font-weight: normal;
}
.wrapper {
	padding-bottom: 35px;
	overflow: hidden;
}
a {
	text-decoration: none;
	outline: none;
}
* {
	outline: none !important;
}
ul {
	padding: 0;
	margin: 0;
}
ul li {
	list-style-type: none;
	outline: none;
}
img {
	outline: none;
	display: block;
}
p {
	padding: 0;
	margin: 0;
}
form {
	margin: 0;
}
html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0; 
  padding: 0; 
  overflow: hidden;
}

.main-content {
  flex-grow: 1; 
}

.header__wrapper {
	padding: 3px 15px;
	padding-left: 12px;
	max-width: 1000px;
	gap: 20px;
	margin: 0 auto;
	display: flex;
	align-items: center;
}
.logo img {
	width: 88px;
	height: auto;
}
.header__title {
	padding: 2px 7px;
	height: 25px;
	box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.06);
	border-radius: 3px;
	border: 1px solid #f0da2f;
	white-space: nowrap;
    overflow: hidden;
	flex: 1;
	position: relative;
}
.theme-change {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
}
.theme-change #sun,
.theme-change #moon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: transparent;
	border: none;
	outline: none;
}
.theme-change #sun {
	background-color: #000;
	border-radius: 0;
	box-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
}
.theme-change #sun svg {
	background-color: #000;
	border: none;
	outline: none;
	box-shadow: none;
	width: 20px;
	height: 20px;
}
.theme-change #sun svg * {
	stroke: #ffffff;
}
.theme-change svg {
	width: 20px;
	height: 20px;
	display: block;
	border: none;
	outline: none;
}
.theme-change #sun svg {
	background-color: #000;
	border: none;
	outline: none;
	box-shadow: none;
}
.theme-change #sun svg path {
	stroke: none;
	fill: #ffffff;
}
.theme-change #sun svg g {
	stroke: none;
	fill: #ffffff;
}
.marquee {
  display: flex;
  white-space: nowrap;
  position: absolute;
  will-change: transform;
  animation: marqueeAnim linear infinite;
}

.marquee span {
  padding-right: 10px; 
}
@keyframes marqueeAnim {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.billbord {
	text-align: center;
}
.billbord__image {
	padding-top: 7px;
	background: #fff;
}
.billbord__image img {
	max-width: 600px;
	margin: 0 auto;
	width: 100%;
	height: auto;
}
.billbord__content {
	padding: 15px;
	padding-bottom: 5px;
}
.billbord__title {
	font-size: 24px;
	margin-bottom: 6px;
	font-style: italic;
	line-height: normal;
}
.billbord__descr {
	font-size: 14px;
	margin-bottom: 20px;
	line-height: normal;
}
.btn-main {
	font-size: 16px;
	height: 39px;
	padding: 0 33px;
	background: #2aabed;
	border-radius: 5px;
	font-weight: 500;
	font-family: "Roboto";
	text-align: center;
	border: none;
	color: #fff;
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.btn-main::before {
    content: "";
    width: 94px;
    height: 39px;
    background-image: url(../img/glow.svg);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
    -webkit-animation-delay: .05s;
    animation-delay: .05s;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    -webkit-animation-timing-function: ease-in-out;
    animation-timing-function: ease-in-out;
    -webkit-transition: all .2s;
    -o-transition: all .2s;
    transition: all .2s;
    -webkit-animation-name: slideme;
    animation-name: slideme;
    -webkit-animation-duration: 3s;
    animation-duration: 3s;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
}
@keyframes slideme {
    0% {
        left: -30px;
        margin-left: 0
    }

    30% {
        left: 110%;
        margin-left: 80px
    }

    100% {
        left: 110%;
        margin-left: 80px
    }
}

.footer {
	padding-bottom: 1vh;
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	text-align: center;
}
.link-page {
	font-size: 2vh;
	line-height: normal;
	text-decoration: underline;
	color: #000;
	transition: initial;
}

.modal {
	padding: 15px;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	-webkit-perspective: 1000px;
    perspective: 1000px;
	-webkit-transition: 0.3s;
    transition: 0.3s;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-top: 30px;
}
.modal.active {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}
.modal__content {
	padding: 20px !important;
	max-width: 370px !important;
	width: 100% !important;
	margin: 0 auto !important;
	border-radius: 10px !important;
	box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.15) !important;
	background: #fff !important;
	position: relative;
	transform: none;
	z-index: 9999;
}
.modal__close {
	top: 0;
	right: 0;
    width: 35px;
    height: 35px;
	cursor: pointer;
	position: absolute;
	background-image: url(../img/close.svg);
	background-repeat: no-repeat;
	background-position: center;
	z-index: 10;
}
.progressbar {
	height: 9px;
	margin-right: 25px;
	margin-bottom: 14px;
	border-radius: 90px;
	position: relative;
	background: #e8e8e8;
}
.progressbar__value {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	transition: all 0.3s;
	background: #f0da2f;
	border-radius: 90px;
}
.modal__title {
	font-size: 16px !important;
	font-weight: 500 !important;
	margin-bottom: 15px !important;
	text-align: left !important;
}
.checkbox label,
.radio label {
	display: flex;
	align-items: center;
	position: relative;
	cursor: pointer;
}
.checkbox__fake,
.radio__fake,
.checkbox label input,
.radio label input {
	width: 13px;
	height: 13px;
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	margin: 0;
	margin-right: 12px;
}
.checkbox__fake::before,
.checkbox__fake::after,
.radio__fake::before,
.checkbox input::after,
.checkbox input::before,
.radio input::after,
.radio input::before {
	position: absolute;
    display: block;
	content: " ";
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	transition: .2s;
}
.radio__fake{
	flex: none!important;
}
.radio__fake::before,
.radio input::before {
	background-image: url(../img/radio.svg);
}
.radio input::after {
	opacity: 0;
	background-image: url(../img/radio_active.svg);
}
.checkbox__fake::before,
.checkbox input::before {
	background-image: url(../img/checkbox.svg);
}
.checkbox__fake::after,
.checkbox input::after {
	opacity: 0;
	background-image: url(../img/checkbox_active.svg);
}
.checkbox_another.active .checkbox__fake::before,
.checkbox input:checked:before,
.radio input:checked:before {
	opacity: 0;
}
.checkbox_another.active .checkbox__fake::after,
.checkbox input:checked:after,
.radio input:checked:after {
	opacity: 1;
}
.checkbox_another.active .checkbox__fake + span,
.checkbox input:checked + span,
.radio input:checked + span {
	font-weight: 500;
}
.checkbox__click {
	position: absolute !important;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}
.checkbox__fake {
	flex: none !important;
}
.checkbox_another.active input {
	z-index: 10;
	visibility: visible;
	opacity: 1;
}
.checkbox,
.radio {
	margin-bottom: 10px;
}
.checkbox {
	margin-bottom: 8px;
}
.checkbox:last-child,
.radio:last-child {
	margin-bottom: 0;
}
.checkbox span {
	flex: 1;
	position: relative;
}
.checkbox span input {
	font-size: 13px;
	color: #000;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	padding: 0;
	border: none;
	font-family: "Roboto";
}
.checkbox input:checked + span input {
	visibility: visible;
	opacity: 1;
}
.modal__buttons {
	display: flex !important;
	justify-content: space-between !important;
	margin-top: 15px !important;
}
.item-form + .modal__buttons {
	padding-top: 7px;
}
.btn-page {
	padding: 8px 15px !important;
	border-radius: 5px !important;
	font-size: 14px !important;
	font-weight: normal !important;
	display: flex !important;
	align-items: center !important;
}
.btn-page_border {
	border: 1px solid #ccc !important;
	background: transparent !important;
}
.btn-page img {
  filter: brightness(0%);
}
.modal__buttons .btn-page_border img {
	transform: rotate(180deg);
}
.item-form input,
.item-form textarea {
	width: 100%;
	height: 39px;
	border: 1px solid #e5e5e5;
	border-radius: 3px;
	padding: 0 15px;
	font-size: 13px;
	line-height: 39px;
	box-sizing: border-box;
	max-width: 100%;
	font-family: "Roboto";
	color: #000;
	background: transparent;
	display: block;
}
.item-form textarea {
	height: auto;
	min-height: 125px;
	padding: 10px 15px;
	line-height: normal;
	resize: none;
}
.item-form *::-webkit-input-placeholder {
	color: #000;
	opacity: 0.7;
}
.item-form *:-moz-placeholder {
	color: #000;
	opacity: 0.7;
}
.item-form *::-moz-placeholder {
	color: #000;
	opacity: 0.7;
}
.item-form *:-ms-input-placeholder {
	color: #000;
	opacity: 0.7;
}
.item-form {
	margin-bottom: 15px !important;
}
.title-success {
	font-size: 24px;
	max-width: 239px;
	margin: 0 auto;
	margin-top: 22px;
	line-height: 108%;
	text-align: center;
	font-weight: 500;
}
.icon-success img {
	max-width: 66px;
	margin: 0 auto;
    margin-top: 25px;
    margin-bottom: 15px;
	height: auto;
	width: auto;
}
.icon-share img {
	max-width: 86px;
	margin: 0 auto;
    margin-top: 17px;
    margin-bottom: 12px;
	height: auto;
	width: auto;
}
.title-share {
	font-size: 16px;
	max-width: 247px;
	margin: 0 auto;
    margin-bottom: 20px;
	line-height: normal;
	text-align: center;
	font-weight: 500;
}
.share-unit {
	padding-left: 10px;
	margin-bottom: 10px;
	border: 1px solid #e6e6e6;
	border-radius: 3px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	cursor: pointer;
	position: relative;
}
.share-unit__btn {
	width: 42px;
	height: 39px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.share-unit__value {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.copy-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.copy-tooltip.active {
  opacity: 1;
}
.flip-in .modal__content {
  animation: flipIn 0.6s forwards ease-out;
}
.flip-out .modal__content {
  animation: flipOut 0.6s forwards ease-in;
}
.zoom-in .modal__content {
    -webkit-animation: ZoomIn 0.5s forwards;
    animation: ZoomIn 0.5s forwards;
}
.zoom-out .modal__content {
    -webkit-animation: ZoomOut 0.5s forwards;
    animation: ZoomOut 0.5s forwards;
}
.modal:first-child .modal__content {
	animation-duration: 0.4s;
}
@-webkit-keyframes flipOut {
  0% {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
  }
  50% {
    -webkit-transform: rotateX(-195deg);
            transform: rotateX(-195deg);
  }
  to {
    -webkit-transform: rotateX(-180deg);
            transform: rotateX(-180deg);
  }
}
@keyframes flipOut {
  0% {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
  }
  50% {
    -webkit-transform: rotateX(-195deg);
            transform: rotateX(-195deg);
  }
  to {
    -webkit-transform: rotateX(-180deg);
            transform: rotateX(-180deg);
  }
}

@keyframes flipIn {
  0% {
    -webkit-transform: rotateX(-180deg);
            transform: rotateX(-180deg);
  }
  50% {
    -webkit-transform: rotateX(15deg);
            transform: rotateX(15deg);
  }
  to {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
  }
}
@-webkit-keyframes flipIn {
  0% {
    -webkit-transform: rotateX(-180deg);
            transform: rotateX(-180deg);
  }
  50% {
    -webkit-transform: rotateX(15deg);
            transform: rotateX(15deg);
  }
  to {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
  }
}
@keyframes flipIn {
  0% {
    -webkit-transform: rotateX(-180deg);
            transform: rotateX(-180deg);
  }
  50% {
    -webkit-transform: rotateX(15deg);
            transform: rotateX(15deg);
  }
  to {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
  }
}
@-webkit-keyframes ZoomOut {
  0% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  to {
    -webkit-transform: scale(0);
            transform: scale(0);
  }
}
@keyframes ZoomOut {
  0% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  to {
    -webkit-transform: scale(0);
            transform: scale(0);
  }
}
@-webkit-keyframes ZoomIn {
  0% {
    -webkit-transform: scale(0);
            transform: scale(0);
  }
  to {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
}
@keyframes ZoomIn {
  0% {
    -webkit-transform: scale(0);
            transform: scale(0);
  }
  to {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
}
.icon-share img:nth-child(2),
.logo img:nth-child(2) {
	display: none;
}
.theme-dark {
	background: #000;
	color: #fff;
}
.theme-dark .link-page {
	color: #fff;
}
.theme-dark .icon-share img:nth-child(1),
.theme-dark .logo img:nth-child(1) {
	display: none;
}
.theme-dark .icon-share img:nth-child(2),
.theme-dark .logo img:nth-child(2) {
	display: block;
}
.theme-dark .modal__content {
	background: #222 !important;
	color: #fff !important;
}
.theme-dark .modal__close {
  filter: brightness(0) invert(1);
}
.theme-dark .radio__fake::before,
.theme-dark .radio input::before {
	background-image: url(../img/radio2.svg);
}
.theme-dark .radio input::after {
	background-image: url(../img/radio_active2.svg);
}
.theme-dark .btn-page {
	border-color: #fff;
	color: #fff;
}
.theme-dark .btn-page.btn-page_border {
	color: #fff;
}
.theme-dark .btn-page img {
    filter: none;
}
.theme-dark .checkbox span input {
	background: #000;
	color: #fff;
}
.theme-dark .item-form textarea {
	background: transparent;
}
.theme-dark .item-form textarea,
.theme-dark .item-form input {
	color: #fff;
}
.theme-dark .item-form *::-webkit-input-placeholder {
	color: #fff;
	opacity: 0.7;
}
.theme-dark .item-form *:-moz-placeholder {
	color: #fff;
	opacity: 0.7;
}
.theme-dark .item-form *::-moz-placeholder {
	color: #fff;
	opacity: 0.7;
}
.theme-dark .item-form *:-ms-input-placeholder {
	color: #fff;
	opacity: 0.7;
}
.theme-dark .checkbox span *::-webkit-input-placeholder {
	color: #fff;
	opacity: 0.5;
}
.theme-dark .checkbox span *:-moz-placeholder {
	color: #fff;
	opacity: 0.5;
}
.theme-dark .checkbox span *::-moz-placeholder {
	color: #fff;
	opacity: 0.5;
}
.theme-dark .checkbox span *:-ms-input-placeholder {
	color: #fff;
	opacity: 0.5;
}
.title-modal {
	font-size: 22px;
	max-width: 258px;
	margin: 0 auto;
	margin-bottom: 10px;
	line-height: 108%;
	font-weight: 500;
	text-align: center;
}
.modal_form {
	overflow: auto;
}
.modal_form .modal__content {
	padding: 30px 15px;
	padding-bottom: 20px;
}
.modal_form input[type="text"],
.modal_form input[type="tel"],
.modal_form textarea {
	width: 100%;
	box-sizing: border-box;
	max-width: 100%;
}
.descr-modal {
    font-size: 13px;
    margin: 0 auto;
    margin-bottom: 14px;
    max-width: 211px;
	line-height: normal;
	text-align: center;
}
.item-form__title {
	margin-bottom: 9px;
	font-weight: 500;
}
.modal__callback .item-form {
	margin-bottom: 12px;
}
.modal__content .btn-main {
	width: 100%;
}
.agree-form {
	font-size: 10px;
	max-width: 227px;
	margin: 0 auto;
	margin-top: 20px;
	text-align: center;
	line-height: normal;
}
.agree-form a {
	color: inherit;
	text-decoration: underline;
}
.radios-socials {
	max-width: 320px;
	gap: 5px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
}
.radio-social {
	max-width: 55px;
}
.radio-social__content {
	padding: 6px;
	width: 55px;
	max-width: 100%;
	padding-bottom: 8px;
	display: block;
	border-radius: 2px;
	border: 1px solid transparent;
	transition: all 0.3s;
	cursor: pointer;
}
.radio-social__icon img {
	height: 31px;
	width: auto;
	margin: 0 auto;
}
.radio-social__icon {
	display: block;
}
.radio-social__title {
	margin-top: 5px;
	font-size: 8px; 
	line-height: normal;
	display: block;
	text-align: center;
}
.radio-social label {
	display: block;
	position: relative;
}
.radio-social label input {
	padding: 0;
	border: none;
	width: 0;
	height: 0;
	position: absolute;
	top: 0;
	left: 0;
	visibility: hidden;
	opacity: 0;
}
.radio-social_call input:checked + .radio-social__content {
	border-color: #f0da2f;
}
.radio-social_wp input:checked + .radio-social__content {
	border-color: #25d366;
}
.radio-social_tg input:checked + .radio-social__content {
	border-color: #039be5;
}
.radio-social_vk input:checked + .radio-social__content {
	border-color: #4d76a1;
}

.modal_main .title-modal {
	margin-bottom: 20px;
	max-width: 100%;
}
.btn-main img {
	height: 70%;
	width: auto;
}
.btn-main_tg img {
	left: 5px;
	position: relative;
}
.billbord__buttons {
	gap: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.btn-main_tg {
	padding-right: 15px;
	padding-left: 25px;
	background: #27a7e8;
}
.btn-main_vk {
	padding-left: 15px;
	padding-right: 10px;
	background: #4e7199;
}
.billbord__buttons .btn-main {
	height: 45px;
	width: 260px;
	gap: 7px;
}
.billbord__buttons .btn-main::before {
	display: none;
}
.no-filled .next-modal {
	visibility: hidden;
	opacity: 0;
}
.filled .next-modal {
	opacity: 1;
	visibility: visible;
}
.billbord .header__title {
	margin-top: 25px;
}
.header__wrapper .header__title {
	top: -2px;
}
.hight-ratio .billbord__content {
	padding-top: 25px;
}
.hight-ratio .billbord__title {
	margin-bottom: 14px;
}
.hight-ratio .billbord__descr {
	margin-bottom: 33px;
}
.hight-ratio .billbord .header__title {
	margin-top: 40px;
}
.hight-ratio .billbord__buttons {
	gap: 20px;
}
.hight-ratio .layout {
	height: 700px;
}

@media (hover: hover) {
	.billbord__buttons .btn-main:hover {
		opacity: 0.9;
	}
}

@media (hover: none) {
	.billbord__buttons .btn-main:active {
		opacity: 0.9;
	}
} 


.modal_form::-webkit-scrollbar {
  -webkit-appearance: none;
}
.modal_form::-webkit-scrollbar:vertical {
  width: 0;
}
.modal_form::-webkit-scrollbar:horizontal {
  height: 0;
}
.modal_form::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 10px;
}
.modal_form::-webkit-scrollbar-track {
  border-radius: 10px;
  background-color: transparent;
}

@media (max-width: 500px) {
.link-page {
    font-size: 1.6vh;
}
}

@media screen and (max-height: 600px) {
	.modal__content {
		top: 0;
		transform: none;
		margin: 15px auto;
	}
}

/* Стили для поддержки открытой клавиатуры */
.keyboard-open .modal {
	align-items: center;
	overflow-y: auto;
	padding-top: 0;
}

.keyboard-open .modal__content {
	margin: 0 auto;
	position: relative;
	top: 50%;
	transform: translateY(-50%);
	max-height: 80vh;
}

.checkbox-write-other span {
    font-weight: normal;
    color: #000000; /* Черный цвет для текста вместо зеленого */
}

/* Модификация для опции "Другое (Написать)" при выборе */
.checkbox-write-other input:checked + span {
    color: #000000; /* Черный цвет при выборе */
}

/* Стили для модального окна ввода текста "Другое (Написать)" */
.other-text-input {
    width: 100%;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 8px 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    font-family: "Roboto" !important;
    font-size: 14px !important;
    resize: none;
    box-sizing: border-box !important;
    line-height: normal;
    overflow: hidden;
}

.theme-dark .other-text-input {
    background: #222;
    color: #fff;
    border-color: #444;
}

.theme-dark #modalOtherText .other-text-input {
    background: #222;
    color: #fff;
    border-color: #444;
    height: 39px;
    min-height: 39px;
    max-height: 39px;
}

/* Новые стили для формы 2 */
.form2-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form2-item {
    margin-bottom: 15px;
}

.form2-item__title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
}

.form2-item input[type="text"],
.form2-item input[type="email"] {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    box-sizing: border-box;
}

.form2-textarea {
    grid-column: 1 / span 2;
}

.form2-textarea textarea {
    width: 100%;
    min-height: 80px;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: "Roboto";
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

/* Mobile styles for form2 */
@media (max-width: 480px) {
    .form2-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form2-textarea {
        grid-column: 1;
    }
    
    .item-form input,
    .item-form textarea {
        width: 100%;
        box-sizing: border-box;
    }
    
    .input-phone {
        width: 100% !important;
        box-sizing: border-box;
    }
}

.theme-dark .checkbox-write-other span {
    color: #ffffff; /* Белый цвет для текста в темной теме */
}

.theme-dark .checkbox-write-other input:checked + span {
    color: #ffffff; /* Белый цвет при выборе в темной теме */
}

/* Предотвращение наложения модальных окон */
.modal.active {
    z-index: 600;
}

#modalOtherText.active {
    z-index: 700; /* Всегда поверх других модалок */
}

#modalOtherText .modal__buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

#modalOtherText .next-modal {
    display: flex !important;
}

#modal-form2 .modal__inner,
#modal-cooperation .modal__inner {
    max-width: 100%;
    box-sizing: border-box;
}

#modal-form2 .item-form,
#modal-cooperation .item-form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#modal-form2 textarea,
#modal-cooperation textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.modal_form.modal__callback {
    overflow: hidden;
}

.modal_form.modal__callback .modal__content {
    min-height: 450px;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal_form.modal__callback .modal__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal_form.modal__callback form {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.modal_form.modal__callback .agree-form {
    margin-top: 10px;
}

.modal_form.modal__callback .btn-main {
    margin-top: 15px;
    position: relative;
}

/* Убедимся, что модальное окно не сжимается слишком сильно */
@media screen and (max-height: 500px) {
    .modal_form.modal__callback {
        align-items: flex-start;
        padding-top: 10px;
        overflow-y: auto;
    }
    
    .modal_form.modal__callback .modal__content {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

/* Стили для мобильных устройств */
@media screen and (max-width: 480px) {
    .modal_form.modal__callback .modal__content {
        min-height: 480px;
        max-height: 90vh;
    }
    
    .modal_form.modal__callback .radios-socials {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 5px;
    }
    
    .modal_form.modal__callback .radio-social {
        flex: 0 0 auto;
    }
    
    .modal_form.modal__callback .btn-main {
        margin-top: 20px;
    }
}

/* Стили для очень маленьких экранов */
@media screen and (max-height: 550px) {
    .modal_form.modal__callback .modal__content {
        min-height: auto;
        max-height: 85vh;
    }
    
    .modal_form.modal__callback .item-form {
        margin-bottom: 10px;
    }
    
    .modal_form.modal__callback .item-form__title {
        margin-bottom: 5px;
    }
    
    .modal_form.modal__callback .btn-main {
        padding: 8px 15px;
    }
    
    .modal_form.modal__callback .agree-form {
        font-size: 11px;
    }
}

/* Стили для модальных окон - гарантируем, что они всегда поверх */
.modals-wrap {
	position: fixed;
	z-index: 9999; /* Высокий z-index */
	width: 100%;
	height: 100%;
	pointer-events: none;
	top: 0;
	left: 0;
}

/* Дополнительные стили для модальных окон */
.modal {
	padding: 15px;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	-webkit-perspective: 1000px;
    perspective: 1000px;
	-webkit-transition: 0.3s;
    transition: 0.3s;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-top: 30px;
}

.modal.active {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

/* Затемнение применяется к дочернему контейнеру вместо body */
.body_modal .scale-wrapper::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	background: #000;
	opacity: 0.85;
	z-index: 999; /* Ставим z-index меньше, чем у модалки, но больше, чем у остальных элементов */
}

/* Убедимся, что layout не перекрывает модалку */
.layout {
	width: 320px;
	height: 568px;
	transform-origin: center top;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
	z-index: 1; /* Явно указываем низкий z-index для layout */
}

/* Улучшенная центровка модальных окон */
.modal {
	padding: 15px;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	-webkit-perspective: 1000px;
    perspective: 1000px;
	-webkit-transition: 0.3s;
    transition: 0.3s;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* Стили для режима открытой клавиатуры */
.keyboard-open .modal {
	align-items: center;
	overflow-y: auto;
	padding-top: 0;
}

.keyboard-open .modal__content {
	margin: 0 auto;
	position: relative;
	top: 50%;
	transform: translateY(-50%);
	max-height: 80vh;
}

/* Улучшенные стили для мобильных устройств с маленьким экраном */
@media screen and (max-height: 500px) {
	.keyboard-open .modal__content {
		max-height: 90vh;
	}
}

/* Исправление для iPhone и других мобильных устройств */
@supports (-webkit-touch-callout: none) {
	.keyboard-open .modal {
		position: absolute;
		height: 100%;
	}
	
	.keyboard-open .modal__content {
		transform: none;
		top: 20px;
		margin-bottom: 20px;
	}
}

/* Стили для центрирования первых модалок и форм */
#modalinteres,
#modalrepeat,
#modal-form1,
#modal-form2,
#modal-cooperation,
#modal-callback {
    display: flex;
    align-items: center !important; /* Принудительное центрирование */
    justify-content: center;
    padding-top: 0 !important; /* Отменяем верхний отступ */
}

#modalinteres .modal__content,
#modalrepeat .modal__content,
#modal-form1 .modal__content,
#modal-form2 .modal__content,
#modal-cooperation .modal__content,
#modal-callback .modal__content {
    margin: 0 auto !important; /* Центрирование по горизонтали */
    position: relative !important;
    top: auto !important; /* Отменяем верхнюю позицию */
    transform: none !important; /* Отменяем трансформацию */
}

/* Стили для режима клавиатуры для этих модалок */
.keyboard-open #modalinteres,
.keyboard-open #modalrepeat,
.keyboard-open #modal-form1,
.keyboard-open #modal-form2,
.keyboard-open #modal-cooperation,
.keyboard-open #modal-callback {
    align-items: center !important;
}

.keyboard-open #modalinteres .modal__content,
.keyboard-open #modalrepeat .modal__content,
.keyboard-open #modal-form1 .modal__content,
.keyboard-open #modal-form2 .modal__content,
.keyboard-open #modal-cooperation .modal__content,
.keyboard-open #modal-callback .modal__content {
    margin: 0 auto !important;
    position: relative !important;
    top: 50% !important;
    transform: translateY(-50%) !important; /* Центрируем по вертикали в видимой области */
    max-height: 80vh !important;
}

/* Исправление для модальных окон на iOS */
@supports (-webkit-touch-callout: none) {
    .keyboard-open #modalinteres,
    .keyboard-open #modalrepeat,
    .keyboard-open #modal-form1,
    .keyboard-open #modal-form2,
    .keyboard-open #modal-cooperation,
    .keyboard-open #modal-callback {
        position: absolute !important;
        height: 100% !important;
    }
    
    .keyboard-open #modalinteres .modal__content,
    .keyboard-open #modalrepeat .modal__content,
    .keyboard-open #modal-form1 .modal__content,
    .keyboard-open #modal-form2 .modal__content,
    .keyboard-open #modal-cooperation .modal__content,
    .keyboard-open #modal-callback .modal__content {
        top: 50% !important;
        margin: 0 auto !important;
        transform: translateY(-50%) !important;
    }
}

/* Принудительное центрирование для всех модальных окон */
.modal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 0 !important;
}

/* Исправление для модальных окон первого шага с профессиями */
#modalprofession .modal__content {
    margin: 0 auto !important;
    position: relative !important;
    top: auto !important;
    transform: none !important;
}

.keyboard-open #modalprofession .modal__content {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Унификация стилей для всех модальных окон */
.modal__content {
    padding: 20px !important;
    max-width: 370px !important;
    width: 100% !important;
    margin: 0 auto !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.15) !important;
    background: #fff !important;
}

.modal__inner {
    padding: 0 !important;
}

.modal__title {
    font-size: 16px !important;
    font-weight: 500 !important;
    margin-bottom: 15px !important;
    text-align: left !important;
}

.modal__buttons {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 15px !important;
}

.btn-page {
    padding: 8px 15px !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    font-weight: normal !important;
    display: flex !important;
    align-items: center !important;
}

.btn-page_border {
    border: 1px solid #ccc !important;
    background: transparent !important;
}

.next-modal {
    background: #f0da2f !important;
    border: none !important;
}

/* Стили для текстовых полей ввода */
.text, .other-text-input {
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 8px 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    font-family: "Roboto" !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

/* Стили для модалки с вводом года рождения */
#modalbirth_year .text {
    border: 1px solid #ccc !important;
    padding: 8px 10px !important;
}

/* Стили для модалки с вводом профессии */
#modalprofession .text {
    border: 1px solid #ccc !important;
    padding: 8px 10px !important;
}

/* Стили для модалки с вводом текста "Другое" */
#modalOtherText .other-text-input {
    border: 1px solid #ccc !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 8px 10px !important;
}

#modalOtherText .modal__buttons {
    margin-top: 15px !important;
}

/* Унификация стилей для всех модальных окон с текстовым вводом */
.item-form {
    margin-bottom: 15px !important;
}

.item-form input[type="text"],
.item-form input[type="number"],
.item-form input[type="tel"],
.item-form textarea {
    width: 100% !important;
    padding: 8px 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

/* Темная тема для всех модальных окон */
.theme-dark .modal__content {
    background: #222 !important;
    color: #fff !important;
}

.theme-dark .text,
.theme-dark .other-text-input,
.theme-dark .item-form input[type="text"],
.theme-dark .item-form input[type="number"],
.theme-dark .item-form input[type="tel"],
.theme-dark .item-form textarea {
    background: #333 !important;
    color: #fff !important;
    border-color: #444 !important;
}

