/* --- Form Styling --- */

/* General styling for text, email, URL, tel, and date inputs */
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="number"] {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Specific width setting for date input */
input[type="date"] {
    width: auto;
}

/* Select dropdown styling */
.form-select {
    width: auto;
}

/* Checkbox and radio button styling */
.form-item.form-type-checkbox,
.form-item.form-type-radio {
    margin-bottom: 0 !important;
}

.form-item.form-item.form-type-checkbox > label {
    display: inline-block;
    width: calc(100% - 25px);
    vertical-align: top;
}

/* Label styling */
.form-label {
    font-weight: bold;
}

.form-label.option {
    font-weight: normal;
    margin-left: 5px;
}

/* Required field indicator */
.form-label.form-required::after,
.fieldset-legend.form-required::after {
    content: ' *';
    color: red;
}

/* Fieldset styling */
fieldset.form-wrapper {
    border: 1px solid #BE820E;
    padding: 0 20px;
    margin: 40px 0 20px;
}

fieldset.form-wrapper > legend {
    margin-top: -20px;
    margin-bottom: 10px;
}

fieldset.form-wrapper > legend > .fieldset-legend {
    background: #FFF;
    padding: 0 10px;
}

/* Nested fieldset level 2 styling */
fieldset.fieldset-level-2 > legend {
    font-size: 1.2rem;
}

/* Details form wrapper */
details.form-wrapper {
    border: 1px solid #CCCCCC;
    padding: 0 20px;
    margin: 20px 0;
}

details.form-wrapper > summary {
    margin-top: -15px;
    background: #FFF;
    width: fit-content;
    padding: 0 10px;
}

/* Webform composite table styling */
.form-type-webform-custom-composite table {
    margin-bottom: 15px;
}

.form-type-webform-custom-composite table thead {
    display: none;
}

.form-type-webform-custom-composite table tbody {
    border: none !important;
}

.form-type-webform-custom-composite table > tbody > tr > td {
    padding: 1rem;
    background-color: rgb(248, 249, 250);
    border-top: 10px solid #FFF;
    border-bottom: none;
}

/* Webform actions styling */
.webform-actions {
    margin: 1rem 0;
}

/* --- Science Search Form (for "Research projects" and "Find a degree") --- */

.science-search-form .form-wrapper {
    padding: 15px;
}

.science-search-form form {
    font-size: 1.08rem !important;
    line-height: 1.5rem !important;
    position: relative;
}

.science-search-form form button {
    overflow: visible;
    position: absolute;
    right: 0;
    border: 0;
    padding: 8px;
    cursor: pointer;
    height: 40px;
    color: #fff;
    text-transform: uppercase;
    background: #BE830E;
    width: 12%;
    border-radius: 0 5px 5px 0;
    font-size: 0.8rem;
}

.science-search-form form input[type="text"] {
    height: 40px;
    padding: 10px;
    font-size: 1rem;
    border: 0;
    background: #FFF;
    width: 87%;
    border-radius: 5px 0 0 5px;
    display: inline-block;
}
