@font-face {
  font-family: "rubik";
  src: url("/wp-includes/fonts/Rubik-VariableFont_wght.ttf");
}

body {
  font-family: "rubik";
}

#analysis-form {
  display: grid;
  grid-template-columns: repeat(2, 172px);
  /* width: 50%; */
  /* justify-content: center; */
  justify-self: center;
  gap: 10px;
}

#analysis-form div {
  display: flex;
  flex-direction: column;
}

/* #analysis-form button[type="submit"] {
    border: 1px solid #e5b485;
    border-radius: 10px;
    color: #3d7fb8;
    background-color: white !important;
} */

#submit-button {
  justify-self: center;
  width: 85px;
  height: 26px;
  border-radius: 20px;
  border-width: 2px;
  border: 2px solid #000000;
  color: #000;
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}
#analysis-form div.submit-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 344px;
}
#analysis-form input::placeholder,
#analysis-form textarea::placeholder {
  color: #000;
}

#analysis-form input[type="email"],
#analysis-form input[type="phone"],
#analysis-form input[type="image"],
#analysis-form input[type="url"],
#analysis-form input[type="text"],
#analysis-form input[type="file"] {
  /* height: 40px; */
  padding: 5px;
  margin-bottom: 0;
  background: #ffffff !important;
  border: 1.5px solid #000000 !important;
  padding-right: 17px;
  border-radius: 5px;
  font-size: 12px;
  font-family: "rubik";
  color: #000;
  /* background-color: #e8f4ff !important; */
  /* border-bottom: 2px solid #346cad !important; */
}

/* #textblock {
  color: #000 !important;
} */

[class*="-input-wrapper"] {
  position: relative;
  display: inline-block;
}

[class*="-input-wrapper"]::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  background-size: cover;
  background-repeat: no-repeat;
}

.email-input-wrapper::before {
  background-image: url("/wp-content/plugins/analysis/images/Mail.svg");
  width: 14px;
  height: 12px;
}

.name-input-wrapper::before {
  background-image: url("/wp-content/plugins/analysis/images/person.svg");
  width: 11px;
  height: 13px;
}

.phone-input-wrapper::before {
  background-image: url("/wp-content/plugins/analysis/images/Phone.svg");
  width: 12px;
  height: 15px;
}

.source-input-wrapper::before {
  background-image: url("/wp-content/plugins/analysis/images/Link.svg");
  width: 11px;
  height: 11px;
}
/* .textblock-wrapper {
  position: relative;
}

.textblock-wrapper::before {
  content: "";
  position: absolute;
  z-index: 2;

  bottom: 10px;
  left: 5px;

  background-image: url("/wp-content/plugins/analysis/images/expand.svg");
  background-repeat: no-repeat;
  background-size: cover;
  width: 13px;
  height: 13px;
} */

#textblock {
  padding-left: 30px !important;
}

#analysis-form div:has(input[type="checkbox"]) {
  flex-direction: row;
  gap: 6px;
}

.info-icon {
  border-radius: 50%;
  /* display: inline-block; */
  /* border: 1px solid #346cad;
    color: #346cad; */
  /* width: 15px;
    height: 15px; */
  top: 4px;
  position: absolute;
  line-height: normal;
  text-align: center;
  font-size: 12px;
  padding-right: 1px;
  margin-right: 3px;
}

.info-icon:hover + .info-tooltip {
  opacity: 1;
  z-index: 5;
}

.info-tooltip {
  z-index: -1;
  font-size: 13px;
  position: absolute;
  background: white;
  color: #555;
  border: 1px solid gray;
  border-radius: 5px;
  text-align: center;
  opacity: 0;
  margin: 0 20px 0 0;
  font-weight: normal;
  transition: opacity 0.3s ease-in-out;
}

#textMeasure {
  padding: 8px;
  margin-bottom: 7px;
  border: 1px solid gray;
  border: 1.5px solid #000000 !important;
}

#analysis-form div textarea[name="content"] {
  min-height: 100px;
  width: 100%;
  overflow: hidden;
  background: #ffffff !important;
  border: 1.5px solid #000000 !important;
  transition: height 0.5s;
}

#analysis-form div:has(textarea[name="content"]),
#analysis-form div:has(input[name="content"]) {
  grid-column: 1 / 3;
}

#analysis-form #anonymous-choice {
  display: flex;
  flex-direction: column;
  /* align-items: end; */
  /* padding-bottom: 15px; */
  position: relative;
  /* gap: 10px; */
  /* height: 60px; */
}

#anonymous-choice label {
  font-weight: 400;
  font-size: 12px;
}

#anonymous-choice input {
  vertical-align: middle;
}

#anonymous-choice input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Remove default browser styling */
  width: 18px;
  height: 18px;
  border: 2px solid #333;
  /* Border color (outer circle) */
  border-radius: 50%;
  /* Circular shape */
  background-color: #fff !important;
  /* Background when unselected */
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  margin: 0;
}

#anonymous-choice input[type="radio"]:checked {
  border-color: #000;
  /* Border color when checked */
  background-color: #000;
  /* Fill color when checked */
}

#anonymous-choice input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  /* Inner dot size */
  height: 13px;
  background-color: #000;
  border: 1px solid white;
  border-radius: 50%;
}

#analysis-form .loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  border-top: 3px solid #346cad;
  border-right: 3px solid transparent;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  display: none;
  justify-self: center;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#image-list {
  display: inline-grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  background: white;
}

/* .thumb {
    height: 50px !important;
    width: 80px !important;
    background-size: contain;
    opacity: 1 !important;
} */

form label {
  color: #fff;
}

.required-label::after {
  content: "*";
  /* color: red; */
}

.center-div {
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-content {
  background-image: url(/wp-content/plugins/analysis/images/content-background.svg);
  background-repeat: no-repeat;
  background-size: cover;
  width: fit-content;
  padding: 10px 50px;
}

#text-popup-content {
  background-image: url(/wp-content/plugins/analysis/images/content-background.svg);
  background-repeat: no-repeat;
  background-size: cover;
  /* width: fit-content; */
  border: 5px solid white;
}

h2 {
  color: #fff;
  font-weight: 500;
  font-size: 32px;
}

.box-label {
  color: #fff;
  font-weight: 400;
  font-size: 12px;
}

#text-word {
  color: #fff;
  font-weight: 400;
  font-size: 12px;
}

#text-word button {
  background: transparent;
  border: unset;
  width: fit-content;
  height: fit-content;
  padding: 0;
  margin: 0;
}

#text-word .arrow {
  font-weight: 400;
  font-size: 18px;
  text-align: right;
  vertical-align: middle;
}

#textarea label {
  font-size: 12px;
  font-weight: 400;
}

#textblock {
  font-family: "rubik";
  color: #000;
}
textarea#textblock::placeholder {
  color: rgba(0, 0, 0, 0.5);
}
label {
  margin: 0;
}

.file-upload-wrapper {
  position: relative;
  display: inline-block;
  line-height: 16px;
}

.file-input {
  display: none;
  /* Hide default file input */
}

.file-label {
  position: relative;
  display: inline-block;
  width: 152px;
  padding-right: 20px;
  padding-top: 4px;
  padding-bottom: 4px;
  color: #333;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid #000000 !important;
  border-radius: 5px;
  font-size: 12px;
}

.file-upload-wrapper .file-label::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  background-size: cover;
  background-repeat: no-repeat;
  width: 11px;
  height: 14px;
  background-image: url("/wp-content/plugins/analysis/images/document.svg");
}

#analysis-form div.add-image-place {
  width: 75px;
  height: 45px;
  border-radius: 9px;
  border-width: 1px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
}

#analysis-form div.image-add-remove {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  gap: 5px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10;
  display: none;
  transform: translate(0, 0) scale(1);
  justify-content: center;
  align-items: center;
}
.required-div {
  display: none;
}

#text-popup-overlay {
  display: none;
}

#expand-text-btn {
  /* position: absolute;
  transform: translate(-329px, 75px);
  z-index: 2;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer; */
  display: none;
}

#terms-and-conditions-checkbox-container {
  height: fit-content;
  position: relative;
}

#terms-and-conditions-checkbox-container::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 110%;
  transform: translateX(50%);
  background-color: #346cad;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 10;
}

#terms-and-conditions-checkbox-container:has(
    input[name="tos"]:disabled
  ):hover::after {
  opacity: 1;
  visibility: visible;
}

@media screen and (width <= 600px) {
  .contact-content h2,
  #text-popup-content h3 {
    font-size: 20px;
    justify-self: center;
    color: white;
  }
  #analysis-form {
    display: flow;
    margin-top: 20px;
    width: 100%;
  }
  #analysis-form input::placeholder {
    color: rgba(0, 0, 0, 0.5);
    transform: translateX(-5%);
  }
  #analysis-form input[type="email"],
  #analysis-form input[type="phone"],
  #analysis-form input[type="image"],
  #analysis-form input[type="url"],
  #analysis-form input[type="text"],
  #analysis-form input[type="file"] {
    border: none !important;
    padding: 10px;
    width: 90%;
    padding-right: 25px !important;
  }
  .contact-content {
    width: 100%;
    padding: 10px 39px;
    border: 4px solid white;
    border-radius: 14px;
  }

  /* THIS IS THE COMBINED RULE */
  #analysis-form #anonymous-choice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
    position: relative;
    row-gap: 0px;
    column-gap: 18px;
    margin-top: 10px;
  }

  /* These next two rules are perfect, leave them as they are! */
  #anonymous-choice > .box-label {
    flex-basis: 100%;
    font-weight: 400;
    font-size: 12px;
  }

  #anonymous-choice span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .image-adder label {
    display: flex;
    place-items: center;
    gap: 24px;
  }
  .image-adder {
    margin-top: 20px;
    margin-bottom: 20px;
  }
  #analysis-form div.image-add-remove {
    display: ruby;
  }
  [class*="-input-wrapper"]::before {
    right: 8px;
  }
  svg#remove-image {
    transform: translateY(-80%);
  }
  .info-icon {
    display: none;
  }
  .file-label {
    width: 90%;
    padding: 10px;
    padding-right: 37px !important;
    border: none !important;
    color: rgba(0, 0, 0, 0.5);
  }
  .file-upload-wrapper .file-label::placeholder {
    transform: translateX(-5%);
  }
  .file-upload-wrapper .file-label::before {
    right: 5px;
  }
  .required-div {
    display: flex;
    margin-top: 5px;
    font-size: 12px;
  }
  .required-div input[type="checkbox"] {
    border: 1px solid black;
  }
  .required-div {
    margin-top: 12px;
    margin-bottom: 5px;
  }

  #text-popup-overlay {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;

    justify-content: center;
    align-items: center;
  }
  #text-popup-overlay {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;

    justify-content: center;
    align-items: center;
  }

  #text-popup-content {
    background-color: #fff;
    padding: 14px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }

  #popup-textarea {
    width: 100%;
    height: 60vh;
    margin-top: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    padding: 10px;
  }

  .textblock-wrapper {
    position: relative;
  }

  #expand-text-btn {
    display: flex;
    position: absolute;
    bottom: 10px;
    left: 6px;
    z-index: 2;

    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  #expand-text-btn img {
    width: 11px;
    height: 11px;
  }

  #textblock {
    padding-left: 30px !important;
  }
  #popup-textarea {
    color: #000 !important;
    background-color: #fff !important;
    border: 1px solid #ccc;
    padding: 10px;
    font-family: "rubik";
    font-size: 13px;
  }

  #text-popup-content #text-word {
    color: white;
    font-weight: 400;
    font-size: 12px;
  }
  .popup-textarea-wrapper {
    position: relative;
  }
  #popup-save-btn {
    position: absolute;
    transform: translate(20px, 13px);
    z-index: 2; /* Makes sure it's on top of the textarea */

    /* Remove default button styles */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  #popup-textarea {
    width: 100%;
    height: 60vh;
    padding: 10px;
    border-radius: 8px;
    /* Your other styles */
    color: #000;
    background-color: #fff;
    border: 1px solid #ccc;
  }
}

@media (max-width: 768px) {
  .envelope-link-close {
    right: 1em;
  }
}
