@font-face {
    font-family: 'Karla';
    src: url('assets/fonts/Karla-VariableFont_wght.ttf') format('truetype');
}

:root {
    font-family: "Karla", sans-serif;
    --green-light: hsl(147, 60%, 83%);
    --green-dark: hsl(169, 82%, 27%);
    --green-darker: hsl(169, 82%, 17%);
    --grey-light: hsl(186, 15%, 59%);
    --grey-dark: hsl(187, 24%, 22%);
    --red: hsl(0, 66%, 54%);
    --white: hsl(0, 0%, 100%);
}

::selection {
    background-color: var(--green-dark);
    color: white;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--green-light);
    color: var(--grey-dark);
}

.mainContent {
    background-color: var(--white);
    padding: 40px;
    border-radius: 30px;
    width: 35%;
    margin: 50px auto;
    box-shadow: 5px 5px 5px var(--green-dark);
}

h1 {
    margin-top: 0;
}

label  {
    color: var(--grey-dark);
    font-size: 18px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.contactForm-column {
    display: flex;
    flex-direction: column;
}

.contactForm-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
}

.contactForm-names {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 250px;
}

.contactForm-consent {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    justify-content: start;
    width: 100%;
}

textarea {
    font-family: "Karla", sans-serif;
    border-radius: 8px;
    border: 1px solid var(--grey-dark);
    width: 96.5%;
    height: 150px;
    resize: none; 
    padding: 10px;
    font-size: 16px;
    color: var(--grey-dark);
}

textarea:focus {
    outline: none;
    border: 1px solid var(--green-dark);
}

.radioInputContainer {
    border: 1px solid var(--grey-dark);
    padding: 14px;
    border-radius: 8px;
    width: 100%;
}

.radioInputContainer:hover {
    cursor: pointer;
    border: 1px solid var(--green-dark);
}

.radioInputContainer label {
    margin-left: 10px;
}

input[type="radio"] {
    accent-color: var(--green-dark);
}

input[type="radio"]:hover {
    cursor: pointer;
}

input[type="checkbox"] {
    accent-color: var(--green-dark);
    margin-right: 10px;
    width: 18px;
}

input[type="checkbox"]:hover {
    cursor: pointer;
}

input[type="email"] {
    font-family: "Karla", sans-serif;
    border: 1px solid var(--grey-dark);
    padding: 14px;
    border-radius: 8px;
    width: 95%;
}

input[type="email"]:focus {
    outline: none;
    border: 1px solid var(--green-dark);
}

input[type="text"] {
    font-family: "Karla", sans-serif;
    border: 1px solid var(--grey-dark);
    padding: 14px;
    border-radius: 8px;
    width: 295px;
}

input[type="text"]:hover {
    border: 1px solid var(--green-dark);
    padding: 14px;
    border-radius: 8px;
    width: 295px;
}

input[type="text"]:focus {
    outline: none;
    border: 1px solid var(--green-dark);
}

button[type="submit"]{
    font-family: "Karla", sans-serif;
    font-weight: 700;
    background-color: var(--green-dark);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 18px;
    padding: 15px;
    margin-top: 20px;
    width: 100%;
    transition: background-color 0.1s ease;
}

button[type="submit"]:hover{
    background-color: var(--green-darker);
    cursor: pointer;
}

.errorMessage {
    color: var(--red);
    margin-bottom: 0;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: hsl(169, 82%, 17%);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  display: none;
  z-index: 10;
  animation: fadein 0.5s, fadeout 0.5s 3s;
}

@keyframes fadein {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

@keyframes fadeout {
  from {opacity: 1; transform: translateY(0);}
  to {opacity: 0; transform: translateY(-10px);}
}

@media (max-width: 1900px) {
    .mainContent {
        width: 70%;
        padding: 30px;
    }

    .contactForm-names {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    #first-name {
        width: 99%;
    }

    #last-name {
        width: 97%;
    }

    #email {
        width: 97%;
    }

    #message {
        width: 97%;
    }
}


@media (max-width: 900px) {
    .mainContent {
        width: 70%;
        padding: 30px;
    }

    .contactForm-names {
        flex-direction: column;
        width: 100%;
    }

    #first-name {
        width: 96.5%;
    }

    #last-name {
        width: 92.5%;
    }

    #email {
        width: 92.5%;
    }

    .contactForm-row {
        flex-direction: column;
    }

    .radioInputContainer {
        width: 92.5%;
        margin-bottom: 10px;
    }

    textarea {
        width: 93.5%;
    }
}

@media (max-width: 600px) {
    body {
        background-color: var(--green-light);
        margin: 0;
    }

    .mainContent {
        width: 80%;
        padding: 20px;
        margin: 30px auto;
        border-radius: 20px;
        box-shadow: none;
    }

    h1 {
        font-size: 24px;
        text-align: center;
    }

    label {
        font-size: 16px;
    }

    #first-name {
        width: 95%;
    }

    #last-name {
        width: 90%;
    }
    
    #email {
        width: 90%;
    }

    #message {
        width: 93%;
    }

    .radioInputContainer {
        width: 90%;
    }

    button[type="submit"] {
        font-size: 16px;
        padding: 12px;
    }
}