*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

html:focus-within {
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  text-rendering: optimizeSpeed;
  font-family: inherit;
}

h1,
h2,
h3,
h4,
button,
input,
label {
  line-height: 1.1;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

img,
picture {
  max-width: 100%;
  display: block;
}

input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}
/* 
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #007bff;
} */

input:focus,
textarea:focus {
  outline: none;
  border: 2px solid var(--clr-Green-600-medium);
}

textarea:not([rows]) {
  min-height: 9em;
}

:target {
  scroll-margin-block: 5ex;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}
:root {
  --clr-Green-200-lighter: hsl(148, 38%, 91%);
  --clr-Green-600-medium: hsl(169, 82%, 27%);
  --clr-Red: hsl(0, 66%, 54%);
  --clr-White: hsl(0, 0%, 100%);
  --clr-Grey-500-medium: hsl(186, 15%, 59%);
  --clr-Grey-900-darker: hsl(187, 24%, 22%);

  --ff: "Karla", sans-serif;
  --fs: 16px;

  --fw-400: 400;
  --fw-700: 700;
}
body {
  font-family: var(--ff);
  font-size: var(--fs);
  font-weight: var(--fw-400);

  background-color: var(--clr-Green-200-lighter);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  gap: 1rem;
}
.container {
  max-width: fit-content;

  background-color: var(--clr-White);
  border-radius: 1rem;

  padding: 2rem;
}
.sr-only {
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
input {
  padding: 10px 20px;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.name_div {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  width: 50%;
}

.firstName,
.lastName {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.email_div {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.email_sec,
.query_sec {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.query_div {
  display: flex;
  gap: 1rem;
}
.general_query,
.support_query {
  display: flex;
  gap: 0.4rem;
  width: 50%;
  border: 1px solid var(--clr-Grey-500-medium);
  border-radius: 8px;
  padding: 10px;
}

.general_query:has(input:checked),
.support_query:has(input:checked) {
  background-color: var(--clr-Green-200-lighter);
}

.message_sec {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

textarea,
button {
  width: 100%;
}
.checkbox_div {
  display: flex;
  gap: 0.4rem;
}
button {
  padding: 16px 20px;
  background-color: var(--clr-Green-600-medium);
  border: none;
  border-radius: 8px;
  color: var(--clr-White);
  font-weight: var(--fw-700);

  margin-top: 1rem;
}
textarea {
  resize: none;
}
.error {
  color: var(--clr-Red);
  font-weight: var(--fw-700);
}

.after_submit {
  position: fixed;
  top: 1rem;
  background-color: var(--clr-Grey-900-darker);
  color: var(--clr-White);

  display: none;
  flex-direction: column;

  gap: 0.6rem;

  padding: 1rem;
  border-radius: 1rem;
}
.popup_heading {
  display: flex;
  gap: 1rem;
}

textarea.error {
  border: var(--clr-Red);
}


input,
textarea {
  border: 1px solid var(--clr-Grey-500-medium);
  border-radius: 8px;
}

input[type="radio"],
input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  appearance: none; /* Remove default styles */
  width:auto;
  height: auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain; /* Ensures the SVG fits inside */
  cursor: pointer;
  border: none;
  padding: 8px;
}
input[type="checkbox"]:checked {
  background-image: url("./assets/images/icon-checkbox-check.svg"); 
  /* background-clip: content-box; */
  background-position: center;
  
}
input[type="radio"]:checked {
  background-image: url("./assets/images/icon-radio-selected.svg"); /* Swap SVG when selected */
}

input.error-border,
textarea.error-border {
  border: 2px solid red;
  outline: none;
}



@media screen and (max-width: 375px) {
  .container {
    margin: 1em;
    padding: 1em;
  }
  .name_div {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .query_div {
    flex-direction: column;
    gap: 1rem;
  }
  .general_query,
  .support_query {
    width: 100%;
  }

}
