/* ============================
   FORM SUCCESS SECTION
   ============================ */
.form__success {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 200px;
    gap: 23px;

    h1 {
        color: green;
        margin-bottom: 0;
        font-family: ff-meta-web-pros;
    }
}

@media (min-width: 768px) {
    .form__success {
        flex-direction: row;
        align-items: center;
    }
}

/* ============================
   FORM BASE STYLING
   ============================ */
.form {
    border: 1.5px solid black;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================
   FORM CONTROL STYLING
   ============================ */
.form-control {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: bold;

    input, textarea {
        padding: 16px 12px;
        border: 1.5px solid black;
        border-radius: 9px;
        max-width: 601px;
        font-family: Roboto; /* Shared font for input and textarea */
    }

    textarea {
        height: 273px; /* Specific height for textarea */
    }
}

/* ============================
   ERROR STYLING FOR FORM CONTROL
   ============================ */
.form-control.form-error {
    input, input:focus, textarea, textarea:focus {
        border-color: red; /* Error border color */
    }

    input::placeholder, textarea::placeholder {
        color: red; /* Error placeholder color */
    }

    p {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        color: red; /* Error text color */
        margin-top: 4px;
        font-size: 14px;
        font-weight: normal;

        img {
            margin-right: 4px;
            margin-top: 0;
            margin-bottom: 0;
        }
    }
}

/* ============================
   CHECKBOX STYLING
   ============================ */
.form-control-checkbox {
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* Align checkbox and label */
}

input[type="checkbox"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 1.5px solid black;
    border-radius: 6px;
    background-color: white;
    display: grid;
    place-content: center;
    cursor: pointer;
    margin-right: 10px; /* Space between checkbox and label */
}

input[type="checkbox"]::before {
    content: "";
    width: 20px;
    height: 20px;
    transform: scale(0);
    background-color: black;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:checked {
    background-color: black;
    border-color: black; /* Change border and background when checked */
}

input[type="checkbox"]:checked::before {
    transform: scale(0.5); /* Scale checkmark */
    background-color: white; /* Checkmark color */
}

.form-label-checkbox {
    max-width: 565px; /* Label width */
    font-size: 16px; /* Label font size */
}

/* ============================
   BUTTON CONTROL STYLING
   ============================ */
.form-control-btn {
    max-width: 620px; /* Button container width */
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
}
