/**
 * Phone input with country selector (IMask).
 */

.phone-input-wrapper {
  display: flex;
  width: 100%;
  border-radius: 6px;
  overflow: visible;
}

.phone-input-wrapper .phone-country-select {
  position: relative;
  flex-shrink: 0;
}

.phone-input-wrapper select.phone-country {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.phone-input-wrapper .phone-country-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  min-width: 56px;
  padding: 0 10px;
  font-family: "Proxima Nova Rg", sans-serif;
  font-size: 18px;
  border: 1px solid #d9d9d9;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: #fff;
  color: var(--color1);
  cursor: pointer;
  transition: background 0.2s;
}

.phone-input-wrapper .phone-country-trigger:hover {
  background: #f5f5f5;
}

.phone-input-wrapper .phone-country-trigger .phone-code {
  display: none;
}

.phone-input-wrapper .phone-country-trigger::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8b8b89;
}

.phone-input-wrapper .phone-flag {
  flex-shrink: 0;
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.phone-input-wrapper .phone-country-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 100%;
  margin-top: 2px;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.phone-input-wrapper .phone-country-list.is-open {
  display: block;
}

.phone-input-wrapper .phone-country-select .phone-country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  font-family: "Proxima Nova Rg", sans-serif;
  font-size: 14px;
  text-align: left;
  background: #fff;
  border: 0;
  color: var(--color1);
  cursor: pointer;
  transition: background 0.2s;
}

.phone-input-wrapper .phone-country-select .phone-country-option:hover {
  background: #f5f5f5;
}

.phone-input-wrapper .phone-country-select .phone-country-option img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.phone-input-wrapper .phone-number {
  flex: 1;
  min-width: 0;
  border: 1px solid #d9d9d9;
  border-radius: 0 6px 6px 0;
  padding: 10px 30px 10px 10px !important;
  font-family: "Proxima Nova Rg", sans-serif;
  font-size: 18px;
}

/* Callback modal */
.callback-modal-form .phone-input-wrapper .phone-country-trigger,
.callback-modal-form .phone-input-wrapper .phone-number {
  height: 64px;
}

.callback-modal-form .phone-input-wrapper .phone-number {
  border-radius: 0 6px 6px 0;
}

@media (max-width: 575px) {
  .callback-modal-form .phone-input-wrapper .phone-country-trigger,
  .callback-modal-form .phone-input-wrapper .phone-number {
    height: 54px;
    font-size: 16px;
  }
}

/* Discuss project form (dark) */
.discuss-project-form-fields .phone-input-wrapper .phone-country-trigger,
.discuss-project-form-fields .phone-input-wrapper .phone-number {
  height: 80px;
  border: 0;
  background: #3f3e48;
  color: #fff;
  font-size: 24px;
}

.discuss-project-form-fields .phone-input-wrapper .phone-country-trigger {
  border-radius: 8px 0 0 8px;
  color: rgba(255, 255, 255, 0.9);
}

.discuss-project-form-fields button.phone-country-trigger {
  padding: 0 14px 0 30px !important;
}

.discuss-project-form-fields .phone-input-wrapper .phone-country-trigger:hover {
  background: #4a4952;
}

.discuss-project-form-fields .phone-input-wrapper .phone-country-trigger::after {
  border-top-color: rgba(255, 255, 255, 0.7);
}

.discuss-project-form-fields .phone-input-wrapper .phone-country-list {
  background: #fff;
  border-color: #d9d9d9;
}

.discuss-project-form-fields .phone-input-wrapper .phone-number {
  border-radius: 0 8px 8px 0;
}

.discuss-project-form-fields .phone-input-wrapper .phone-number::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

@media screen and (max-width: 1199px) {
  .discuss-project-form-fields .phone-input-wrapper .phone-country-trigger,
  .discuss-project-form-fields .phone-input-wrapper .phone-number {
    height: 60px;
  }
}

@media (max-width: 991px) {
  .discuss-project-form-fields .phone-input-wrapper .phone-country-trigger,
  .discuss-project-form-fields .phone-input-wrapper .phone-number {
    height: 60px;
    font-size: 16px;
  }
}

@media (max-width: 475px) {
  .discuss-project-form-fields .phone-input-wrapper .phone-country-trigger,
  .discuss-project-form-fields .phone-input-wrapper .phone-number {
    background: #fff;
    color: var(--color1);
  }

  .discuss-project-form-fields .phone-input-wrapper .phone-country-trigger:hover {
    background: #f5f5f5;
  }

  .discuss-project-form-fields .phone-input-wrapper .phone-country-trigger::after {
    border-top-color: #8b8b89;
  }

  .discuss-project-form-fields .phone-input-wrapper .phone-country-list {
    background: #fff;
  }

  .discuss-project-form-fields .phone-input-wrapper .phone-number::placeholder {
    color: rgba(47, 45, 51, 0.3);
  }
}
