/* opt callback */

.opt-callback {
  margin-bottom: clamp(60px, 6vw, 100px);
  max-height: 95vh;
  overflow-y: auto;
}

.opt-callback.head-popup{
	width: 70%;
}

@media (max-width: 550px) {
  .opt-callback.active{
    width: 95%;
  }
}

.pad-20{
	padding: 20px !important;
}

.opt-callback-title {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: clamp(24px, 2vw, 32px);
  color: #383838;
  margin-bottom: clamp(20px, 2vw, 40px);
}

.opt-callback-container {
  border-radius: 8px;
  background: #f9f9f9 url('/upload/opt/bg-arrow.svg') no-repeat;
  background-size: contain;
  background-position: center right;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0;
}

.container.opt-callback-container:after, .container.opt-callback-container:before{
  content: inherit;
}

.opt-callback-lside {
  padding: 60px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt-form-row {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.opt-form-row input {
  flex: 1 1 300px;

  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 11px 26px;

  font-family: var(--font-family);
  font-weight: 400;
  font-size: 14px;
  line-height: 129%;
  color: #383838;
}

.opt-form-row input:focus {
  outline-color: #e31f25;
}

.opt-form-row textarea {
  flex: 1 1 300px;

  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 11px 26px;

  font-family: var(--font-family);
  font-weight: 400;
  font-size: 14px;
  line-height: 129%;
  color: #383838;
  resize: none;
  height: 80px;
}

.opt-form-row input::placeholder {
  opacity: 0.6;
}

.opt-form-row textarea::placeholder {
  opacity: 0.6;
}

.opt-form-row textarea:focus {
  outline-color: #e31f25;
}

.opt-form-file-bottom {
  margin-top: 30px;
}

.opt-form-file-bottom .opt-form-btn {
  width: 100%;
  margin-bottom: 10px;
  padding: 16px;
}

.opt-form-file-bottom .btn--accent {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 14px;
  line-height: 129%;
  text-align: center;
  color: #fff;
  border-radius: 2px;
  padding: 11px 26px;
  background: #e31f25;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

@media (any-hover: hover) {
  .opt-form-file-bottom .btn--accent:hover {
    background-color: #000;
  }
}

.opt-form-btn {
  width: 100%;
  margin-bottom: 10px;
  padding: 16px;
}

.opt-form-policy {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: flex-start;
  gap: 8px;
}

.opt-form-text {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 14px;
  color: #383838;
  text-wrap: balance;
}

.opt-form-text a {
  font-weight: 700;
  transition: color 0.2s ease;
  color: #383838;
  text-decoration: none;
}

.opt-form-checkbox {
  position: relative;
}

.opt-form-checkbox input {
  position: absolute;
  inset: 0;
  appearance: none;
  opacity: 0;
  z-index: 2;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.opt-form-checkbox-custom {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid #e31f25;
  display: flex;
  align-items: center;
  justify-content: center;
}

.opt-form-checkbox-custom:before {
  content: '';
  width: 10px;
  height: 10px;
  background-color: #e31f25;
  opacity: 0;
  visibility: hidden;
}

.opt-form-checkbox input:checked + .opt-form-checkbox-custom:before {
  opacity: 1;
  visibility: visible;
}

.opt-callback-rside {
  position: relative;
}

.opt-callback-img {
  height: 100%;
  display: flex;
  justify-content: end;
}

.opt-callback-img img {
  display: block;
}

.opt-callback-soc {
  position: absolute;
  bottom: 20px;
  left: 40px;
  background: #fff;
  max-width: 500px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  box-shadow: 2px 3px 10px 2px rgba(56, 56, 56, 0.15);
  background: #fff;
  border-radius: 4px;
}

.opt-callback-phone {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: clamp(24px, 2.5vw, 32px);
  text-align: center;
  color: #383838;
  text-decoration: none;
  transition: color 0.2s ease;
}

.opt-callback-soc .socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.opt-callback-soc .socials a {
  transition: 0.2s ease;
}

.opt-callback-map {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  color: #383838;
}

.opt-form-file {
  position: relative;
}

.opt-form-file .input-file {
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
}

.input-file-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.input-file-btn .icon {
  min-width: 24px;
  transition: 0.4s ease;
}

.input-file-btn .text {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 14px;
  color: #383838;
}

/*собственно магия попапа*/
/* Стили для попапа */
.opt-callback {
    display: none; /* По умолчанию попап скрыт */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    background: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Затемнение фона */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

/* Анимация открытия попапа */
.opt-callback.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Анимация закрытия попапа */
.opt-callback.hide {
    animation: fadeOut 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

.opt_phones{
  display: none;
}

.from_opt .opt_phones{
  display: block;
}

.from_opt .usual_phones{
  display: none;
}