/* Basic styling for the body */
body {
    margin: 30px 15px;
    background-color: hsl(148, 38%, 91%);
    /* font-family: 'Karla', sans-serif; */
}

/* Font-face definition for custom font */
@font-face {
    font-family: Karla;
    src: url("assets/fonts/static/karla-Italic-VariableFont_wght.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
}

/* Styling for the main contact form */
.contact-form {
    background-color: hsl(0, 0%, 100%);
    text-align: start;
    padding: 20px 0px;
    border-radius: 10px;
    margin: auto;
    max-width: 600px;
}

/* Styling for the 'Contact Us' heading */
.contact-us {
    font-weight: bold;
    font-size: 30px;
    opacity: 0.8;
    margin: 10px 0;
}

/* General styling for input groups */
.input-group {
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
    display: block;
}

/* Specific input group stylings */
.input-group.firstname,
.input-group.lastname,
.input-group.email {
    max-width: 120%;
    margin-left: auto;
    margin-right: auto;
    cursor: pointer;
}

.input-group textarea,
input[type="email"],
input[type="text"] {
    width: calc(100% - 26px);
}

.input-group.enquiry,
.input-group.request {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.input-group.input-group-message,
.input-group.input-group-consent {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.input-group input,
.input-group textarea {
    padding: 13px;
    font-size: 16px;
    border: 1.3px solid hsl(186, 15%, 59%);
    border-radius: 5px;
    margin-top: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.input-group textarea {
    padding-bottom: 10pc;
}


.input-group.enquiry,
.input-group.request {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1.3px solid hsl(186, 15%, 59%);
    border-radius: 5px;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Style the radio buttons */ 
input[type="radio"] { 
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none; 
    width: 20px; 
    height: 20px;  
    border-radius: 50%; 
    margin-top: -1px;
    padding: 0px;
    outline: none; 
    cursor: pointer; 
    transition: background 0.3s ease;
    display: inline-block; 
    position: relative; 
} 

input[type="radio"]:checked { 
    background-color: hsl(169, 82%, 27%); /* Green background when checked */ 
} 

input[type="radio"]:checked::after { 
    content: ''; 
    display: absolute; 
    width: 4px; 
    height: 4px; 
    border-radius: 50%; 
    background-color: hsl(169, 82%, 27%); /* Green dot inside */
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
}

/* Style the checkbox */ 
input[type="checkbox"] { 
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none; 
    width: 5px;
    height: 5px; 
    outline: none; 
    cursor: pointer; 
    transition: background 0.3s ease; 
    position: relative;
    padding: 5px; 
    border-radius: 15%;
    margin-top: -2px;
    background-color: white;
 } 
 
 input[type="checkbox"]:checked { 
    background-color: hsl(169, 82%, 27%); 
} 

input[type="checkbox"]:checked::after { 
    content: ''; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    width: 4px; 
    height: 9px;
    border: solid hsl(148, 38%, 91%);
    border-width: 0 2px 2px 0; 
    transform: translate(-50%, -50%) rotate(45deg)
}

/* Styling for labels */
label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    opacity: 0.5;
}

.query-label { 
    font-size: 16px;  
}

.input-group.consent {
    display: flex;
    align-items: center;
}

.input-group.consent label {
    margin-left: 10px;
}

/* Styling for buttons */
button {
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: hsl(169, 82%, 27%);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

button:hover {
    background-color: hsl(169, 82%, 40%);
}

/* Styling for error messages */
.error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

@keyframes fadeIn { 
    from { 
        opacity: 0; 
    } 
    
    to { 
        opacity: 2; 
    } 
}

.success-toast {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: hsl(187, 24%, 22%);
    color: hsl(148, 38%, 91%);
    padding: 1em;
    border-radius: 10px;
    z-index: 1000;
    max-width: 500px;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
    align-items: center;
    animation: fadeIn 0.7s ease-in-out;
}

.icon-and-message {
    display: flex;
}

.success-icon {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    margin-top: 4px;
}

.success-text {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.2;
}

.toast-message {
    font-size: 12px;
    margin-top: 10px;
    opacity: 0.8;
}

strong {
    font-size: 15px;
    opacity: 0.9;
}

.attribution {
    margin-top: 20px;
    text-align: center;
}

/* Error state for inputs */
input.error, textarea.error {
    border-color: hsl(0, 66%, 54%);
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Responsive Styles: */
/* Mobile (320px - 450px): */

@media screen and (max-width: 426px) { 
    body { 
        margin: 10px; 
    } 
    
    .contact-form { 
        padding: 20px; 
        margin: auto;
    } 

    .contact-us { 
        font-size: 20px; 
    } 
    
    .input-group input, 
    .input-group textarea { 
        font-size: 14px; 
    } 
    
    button { 
        font-size: 14px; 
        padding: 10px; 
    } 
    
    .success-toast { 
        font-size: 14px; 
        padding: 0.5em; 
        max-width: 90%; 
    }
    
    .icon-and-message { 
        flex-direction: column; 
        align-items: flex-start; 
    } 
    
    .success-icon { 
        width: 20px; 
        height: 20px; 
        margin-bottom: 5px; 
    } 
    
    .toast-message { 
        font-size: 12px;
    }
}

/* Tablet (768px): */

@media screen and (min-width: 768px) { 
    body { 
        margin: 40px; 
    } 
    
    .contact-form { 
        padding: 50px; 
    } 
    
    .contact-us { 
        font-size: 22px; 
    }

    .input-group.firstname,
    .input-group.lastname {
        width: 70%; 
    }

    .input-group.firstname,
    .input-group.lastname,
    .input-group.email {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    cursor: pointer;
}

.firstlast-name {
    display: flex;
    gap: 25px;
}
    
    .input-group.enquiry,
    .input-group.request {
    max-width: 100%;
}
    
    .input-group input, 
    .input-group textarea { 
        font-size: 15px;
        padding: 13px; 
    }
    
    button {
        font-size: 15px;
    }
}

/* Desktop (1024px - 1440px): */

@media screen and (min-width: 1024px) { 
    body { 
        margin: 50px;
    } 
     
    .contact-form { 
        text-align: start;
        padding: 30px 40px;
        border-radius: 10px;
        margin: auto;
        max-width: 600px;
    } 
    
    .contact-us { 
        font-size: 24px; 
    }
    
    .input-group { 
        margin-right: 50px;
        margin-top: 20px;
        margin-bottom: 15px;
    }

    .firstlast-name {
        display: flex;
    }
    
    .input-group input, 
    .input-group textarea { 
        font-size: 16px; 
    }
    
    .input-group.enquiry, 
    .input-group.request { 
        width: 100%;
    }

    .equiry-and-request {
        display: flex;
        gap: 20px;
    }
    
    .input-group textarea {
        padding-bottom: 3pc;
        width: 104%;
    }
    
    .input-group.consent { 
        max-width: 90%; 
    } 
    
    .input-group.message { 
        margin-right: 50px; 
    }

    .message-area { 
        width: 100%;
    }

    button { 
        font-size: 16px;
    }
}

/* 4K Screen (2560px): */

@media screen and (min-width: 2560px) { 
    body { 
        margin: 70px; 
    } 
    
    .contact-form { 
        padding: 30px; 
    } 
    
    .contact-us { 
        font-size: 26px; 
    } 
    
    .input-group input, 
    .input-group textarea { 
        font-size: 18px; 
    }
    
    .input-group.enquiry, 
    .input-group.request { 
        max-width: 45%; 
    } 
    
    .input-group.consent { 
        max-width: 90%; 
    } 

    .message-area { 
        width: 100%; 
    }
    
    button { 
        font-size: 18px 
    }
}