.contact-popup {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 95%;
  max-width: 650px;
  max-height: 90vh;
  border: var(--border-standard);
  border-radius: 20px;
  background: var(--bg-body);
  box-shadow: var(--shadow-dark);
  animation: pixelIn 0.5s ease forwards;
}

@keyframes pixelIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(12px);
  }
  40% {
    opacity: 1;
    filter: blur(4px);
  }
  100% {
    transform: scale(1);
    filter: blur(0);
  }
}

.closing {
  animation: pixelOut 0.4s ease forwards;
}

@keyframes pixelOut {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(12px);
  }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: var(--border-standard);
  background: var(--bg-dark-elements);
}

.popup-header label {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 100;
}

.popup-close-button {
  border: none;
  color: var(--text-accent-blue);
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}
.popup-close-button:hover {
  color: var(--text-primary);
  transform: translateY(-3px);
}

.popup-content {
  padding: 30px 20px;
  overflow-y: auto;
  scrollbar-width: none;
}
.popup-content::-webkit-scrollbar {
  display: none;
}

.server-response {
  display: none;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
}

.server-response.success {
  display: block;
  color: var(--text-success);
}

.server-response.failed {
  display: block;
  color: var(--text-error)
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group {
  position: relative;
  width: 100%;
  margin-bottom: 25px;
}

.form-group.small {
  flex: 1.3;
}

.form-group.large {
  flex: 2.1;
}

input, textarea {
  width: 100%;
  padding: 14px;
  padding-right: 40px;
  box-sizing: border-box;
  border: var(--border-standard);
  border-radius: 6px;
  color: var(--text-primary);
  background: transparent;
  box-shadow: var(--shadow-blue-off);
  font-size: 16px;
  outline: none;
  transition: 0.25s;
}

textarea {
  height: 120px;
  resize: none;
  font-family: inherit;
}

input:focus, textarea:focus {
  border-bottom: var(--border-button-outline);
  box-shadow: var(--shadow-blue-on);
}

.form-group label {
  position: absolute;
  left: 14px;
  top: 14px;
  color: var(--text-disabled);
  pointer-events: none;
  transition: 0.2s;
}

input:focus + label,
input:not(:placeholder-shown) + label,
textarea:focus + label,
textarea:not(:placeholder-shown) + label {
  top: -14px;
  color: var(--text-accent-blue);
  font-size: 12px;
}

.form-footer {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.privacy {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.privacy input {
  width: auto;
}

.privacy label {
  position: static;
  pointer-events: auto;
  color: var(--text-secondary) !important;
}

.privacy a {
  color: var(--text-secondary) !important;
}

.form-footer button {
  padding: 11px 19px;
  border: var(--border-button-outline);
  border-radius: 20px;
  color: var(--text-accent-blue);
  background: transparent;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow-blue-off);
  transition: 0.3s;
}
.form-footer button:hover {
  transform: translateY(-3px);
  color: var(--text-primary);
  background: var(--bg-button-outline-on);
  box-shadow: var(--shadow-blue-on);
}
.form-footer button:disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* laptop 1600–1919px */
@media (min-width: 1600px) and (max-width: 1919px) {

}

/* laptop 1366–1599px */
@media (min-width: 1366px) and (max-width: 1599px) {
  .contact-popup {
    max-width: 600px;
  }

  .popup-header {
    padding: 12px 20px;
  }

  .popup-header label {
    font-size: 14px;
  }

  .popup-close-button {
    font-size: 15px;
  }

  .popup-content {
    padding: 25px 20px;
  }

  .server-response {
    font-size: 15px;
  }

  input, textarea {
    padding: 13px;
    font-size: 15px;
  }

  .form-group label {
    left: 13px;
    top: 13px;
    font-size: 15px;
  }

  .form-footer button {
    padding: 8px 15px;
    font-size: 16px;
  }
}

/* laptop 1280–1365px */
@media (min-width: 1280px) and (max-width: 1365px) {
  .contact-popup {
    max-width: 600px;
  }

  .popup-header {
    padding: 12px 20px;
  }

  .popup-header label {
    font-size: 14px;
  }

  .popup-close-button {
    font-size: 15px;
  }

  .popup-content {
    padding: 25px 20px;
  }

  .server-response {
    font-size: 15px;
  }

  .form-group.small {
    flex: 1.4;
  }

  .form-group.large {
    flex: 2;
  }

  input, textarea {
    padding: 13px;
    font-size: 15px;
  }

  .form-group label {
    position: absolute;
    left: 13px;
    top: 13px;
    font-size: 15px;
  }

  .form-footer button {
    padding: 8px 15px;
    font-size: 16px;
  }
}

/* tablet */
@media (min-width: 768px) and (max-width: 1279px) and (orientation: portrait) {

}
@media (min-width: 768px) and (max-width: 1279px) and (orientation: landscape) {
  .contact-popup {
    max-width: 600px;
  }

  .popup-header {
    padding: 12px 20px;
  }

  .popup-header label {
    font-size: 14px;
  }

  .popup-close-button {
    font-size: 15px;
  }

  .popup-content {
    padding: 25px 20px;
  }

  .server-response {
    font-size: 15px;
  }

  .form-group.small {
    flex: 1.4;
  }

  .form-group.large {
    flex: 2;
  }

  input, textarea {
    padding: 13px;
    font-size: 15px;
  }

  .form-group label {
    left: 13px;
    top: 13px;
    font-size: 15px;
  }

  .form-footer button {
    padding: 8px 15px;
    font-size: 16px;
  }
}

/* smartphone */
@media (max-width: 767px) and (orientation: portrait) {
  .popup-header {
    padding: 12px 18px;
  }

  .popup-header label {
    font-size: 14px;
  }

  .popup-close-button {
    font-size: 15px;
  }

  .popup-content {
    padding: 25px 20px;
  }

  .server-response {
    margin-bottom: 15px;
    font-size: 14px;
  }

  .form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  input, textarea {
    padding: 13px;
    font-size: 14px;
  }

  .form-group label {
    left: 13px;
    top: 13px;
    font-size: 14px;
  }

  .form-footer {
    flex-direction: column;
    justify-content: center;
  }

  .form-footer button {
    padding: 8px 15px;
    font-size: 14px;
  }
}
@media (max-width: 767px) and (orientation: landscape) {
  .contact-popup {
    max-width: 500px;
  }

  .popup-header {
    padding: 12px 18px;
  }

  .popup-header label {
    font-size: 14px;
  }

  .popup-close-button {
    font-size: 15px;
  }

  .popup-content {
    padding: 25px 20px;
  }

  .server-response {
    font-size: 14px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  input, textarea {
    padding: 13px;
    font-size: 14px;
  }

  .form-group label {
    left: 13px;
    top: 13px;
    font-size: 14px;
  }

  .form-footer button {
    padding: 8px 15px;
    font-size: 14px;
  }
}
@media (min-width: 768px) and (max-width: 915px) and (max-height: 500px) and (orientation: landscape) {
  .contact-popup {
    max-width: 600px;
  }

  .popup-header {
    padding: 12px 20px;
  }

  .popup-header label {
    font-size: 14px;
  }

  .popup-close-button {
    font-size: 15px;
  }

  .popup-content {
    padding: 25px 20px;
  }

  .server-response {
    font-size: 15px;
  }

  .form-group.small {
    flex: 1.4;
  }

  .form-group.large {
    flex: 2;
  }

  input, textarea {
    padding: 13px;
    font-size: 15px;
  }

  .form-group label {
    left: 13px;
    top: 13px;
    font-size: 15px;
  }

  .form-footer button {
    padding: 8px 15px;
    font-size: 15px;
  }
}