/********************/
/* GENERAL ELEMENTS */
/********************/

:root {
    --max-width: 820px;
    --color-error: #f44336;
    --color-error-text: #f44336;
    --color-required: #f44336;
    --color-input-error: #f443366b;
    --color-success: #2bd572c8;
    --color-anchor: #015dc0;
    --color-label: #929292;
    --color-input: #00000029;
    --color-input-focus: #007bffa3;
    --color-info-2: #3472bd;
    --color-light: #000000;
    --color-breakline: #0000001e;
    --color-signatureline: #00000029;
    --color-signature-pad: #00000029;
    --color-button-plus: #cffbcf;
    --color-button-plus-hover: #b1fbb1;
    --color-button-minus: #fbcfcf;
    --color-button-minus-hover: #fbb1b1;
    --color-textarea: #00000029;
    --color-content-frame: #00000029;
    --color-file-upload-button: #b1fbb194;
    --color-file-upload-button-hover: #b1fbb1cc;
    --color-file-upload-button-active: #00000029;
    --color-file-upload-label: #808080;
}

html {
    font-family: "Open Sans", sans-serif;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 120px;
    width: 100%;
    margin: 0;
}

h1 {
    font-size: 22px;
    margin: 0;
    padding-top: 20px;
    padding-bottom: 20px;
}

h2 {
    font-size: 19px;
    margin: 0;
    padding-top: 15px;
    padding-bottom: 15px;
}

h3 {
    font-size: 17px;
    margin: 0;
    padding-top: 10px;
    padding-bottom: 15px;
}

h4 {
    font-size: 16px;
    margin: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    color: rgba(24, 23, 41, 0.55);
}

h5 {
    font-size: 10px;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: var(--color-anchor);
    padding-bottom: 10px;
}

label {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-label);
    padding-bottom: 10px;
}

input[type="date"] {
    height: 40px;
    padding: 10px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
}

input[type="date"] {
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* CRITICAL: Hide ALL browser date placeholder text */
input[type="date"]::-webkit-datetime-edit {
    opacity: 0 !important;
    color: transparent !important;
}

input[type="date"]::-webkit-datetime-edit-text {
    opacity: 0 !important;
    color: transparent !important;
}

input[type="date"]::-webkit-datetime-edit-month-field {
    opacity: 0 !important;
    color: transparent !important;
}

input[type="date"]::-webkit-datetime-edit-day-field {
    opacity: 0 !important;
    color: transparent !important;
}

input[type="date"]::-webkit-datetime-edit-year-field {
    opacity: 0 !important;
    color: transparent !important;
}

/* Show real date when field has value */
input[type="date"]:valid::-webkit-datetime-edit {
    opacity: 1 !important;
    color: inherit !important;
}

input[type="date"]:valid::-webkit-datetime-edit-text,
input[type="date"]:valid::-webkit-datetime-edit-month-field,
input[type="date"]:valid::-webkit-datetime-edit-day-field,
input[type="date"]:valid::-webkit-datetime-edit-year-field {
    opacity: 1 !important;
    color: inherit !important;
}

input[type="date"]::placeholder {
    color: #aaa;
    font-style: italic;
    cursor: pointer;
}

input[type="radio"] {
    height: 16px !important;
    width: 16px !important;
    flex-shrink: 0;
}

input[type="checkbox"] {
    height: 16px !important;
    width: 16px !important;
    margin-top: 1px;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 10px;
    cursor: pointer;
}

ul {
    padding-left: 40px;
    margin-top: 5px;
    margin-bottom: 10px;
}

ol {
    padding-left: 40px;
    margin-top: 5px;
    margin-bottom: 10px;
}

/***************************/
/* GENERAL CUSTOM EFFEKTS */
/***************************/

.slide-in {
    display: block;
    animation: slideDown 0.5s ease-out forwards;
}

@keyframes slideDown {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-out {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

/***************************/
/* GENERAL CUSTOM ELEMENTS */
/***************************/

.hidden {
    display: none;
    opacity: 0;
}

.p_info_1 {
    padding-bottom: 10px;
}

.p_info_2 {
    color: var(--color-info-2);
    padding-bottom: 10px;
}

.p_info_3 {
    width: 60%;
}

.form__comments-note {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--color-breakline);
    /* border-left: 3px solid rgba(52, 114, 189, 0.45); */
    border-radius: 6px;
    background-color: rgba(52, 114, 189, 0.05);
    color: rgba(24, 23, 41, 0.72);
    font-size: 14px;
    line-height: 1.45;
    box-sizing: border-box;
}

.form__comments-note strong {
    color: rgba(24, 23, 41, 0.88);
}

.required {
    color: var(--color-required);
}

.light {
    color: rgb(0, 0, 0);
}

.error-text {
    color: var(--color-error-text);
    font-size: 0.9rem;
    margin-top: 5px;
    margin-bottom: 5px;
}

.breakline {
    width: 100%;
    height: 1.5px;
    background-color: var(--color-breakline);
    margin-bottom: 15px;
}

.signatureline {
    border-bottom: 1.5px solid var(--color-signatureline);
    width: 100%;
    margin-left: 90px;
}

.signature-pad {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

input[type="checkbox"]:checked + label + .form__content-box--row .signature-pad {
    display: block; /* Show canvas when checkbox is checked */
}

/*************************/
/* GENERAL FORM ELEMENTS */
/*************************/

.form__content-box--row {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.form__content-box--row-static {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.form__content-box--column {
    display: flex;
    flex-direction: column;
}

.form__radio,
.form__checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
}

.form__inputfield {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-bottom: 10px;
}

.form__input {
    height: 40px;
    border: 1.5px solid var(--color-input);
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    padding-inline: 10px;
    box-sizing: border-box;
    font-size: 16px;
}

.form__selectfield {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
    width: 100%;
}

.form__select {
    height: 40px;
    border: 1.5px solid var(--color-input);
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    padding-inline: 10px;
    box-sizing: border-box;
    font-size: 16px;
    width: 100%;
}

.form__select.error,
.form__input.error,
.form__access-input-room.error,
.form__access-select-building.error,
#form__applicant-photo-container.error {
    border-color: var(--color-input-error);
}

.form__select option {
    font-size: 16px;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    border-color: var(--color-input-focus);
    outline: none; /* no default outline */
}

.form__buttonfield {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
}

.form__button-plus,
.form__button-minus {
    height: 40px;
    width: 40px;
    border: 1.5px solid #00000029;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 200;
    font-size: 22px;
    margin-bottom: 10px;
    color: gray;
}

.form__button-plus {
    background-color: rgb(207, 251, 207);
}

.form__button-plus:hover {
    background-color: rgb(177, 251, 177);
}

.form__button-minus {
    background-color: rgb(251, 207, 207);
}

.form__button-minus:hover {
    background-color: rgb(251, 177, 177);
}

.form__textarea {
    height: 100px;
    max-width: 100%;
    min-width: 100%;
    padding: 10px;
    padding-inline: 10px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    border-radius: 5px;
    border: 1.5px solid #00000029;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.form__content-frame {
    height: auto;
    border: 1.5px solid #00000029;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    padding-inline: 10px;
    padding-block: 10px;
    box-sizing: border-box;
    font-size: 16px;
    font-style: italic;
    color: gray;
    margin-bottom: 10px;
}

.file-upload__button {
    width: 120px;
    -webkit-appearance: none;
    background-color: rgba(177, 251, 177, 0.579);    
    border: 1px solid #00000029;
    border-radius: 5px;
    outline: none;
    padding: 10px;
    font-size: 15px;
    cursor: pointer;
}

.file-upload__button:hover {
    background-color: rgba(177, 251, 177, 0.8);    
}

.file-upload__button:active {
    background-color: #00000029;
}

.file-upload__label {
    font-size: 16px;
    color: gray;
}

/********************/
/* APPLICATION FORM */
/********************/

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.form__content-area {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* HEADER */

.form__header {
    display: flex;
    flex-direction: column;
}

/* 1. SUBMITTER */

.form__submitter {
    display: flex;
    flex-direction: column;
}

.form__submitter-selection {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
}

.form__submitter-is-requester {
    display: flex;
    flex-direction: column;
}

.form__submitter-affiliation {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.form__submitter-affiliation .form__selectfield {
    flex: 1;        /* Jede form__selection beansprucht dadurch nur einen Drittel. */
    min-width: 0;   /* Verhindert, dass das Element breiter wird. */
    padding-bottom: 10px;
}

.form__submitter-function {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

/* 2. APPLICANT */

.form__applicant {
    display: flex;
    flex-direction: column;
}

#form__applicant-photo {
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    padding-bottom: 10px;
}

.form__applicant-photo-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

#form__applicant-photo--preview {
    width: auto;
    height: 140px;
    object-fit: cover;
    border: 1px solid #c1c1c1;
    border-radius: 5px;
}

#form__applicant-photo--error {
    color: red;
    font-size: 14px;
    font-weight: 600;
}

/* 3. Professional Details */

.form__profession {
}

/* 4. Requests */

.form__campus-account-info {
    font-size: 14px;
    color: rgb(100, 100, 100);
    margin-bottom: 12px;
}

.form__unicard-access-info {
    font-size: 14px;
    color: rgb(100, 100, 100);
    margin-bottom: 12px;
}

.form__access {
}

.form__access-building-group {
    display: flex;
    width: 100%;
    gap: 10px;
}

.form__access-select-building,
.form__access-input-room {
    height: 40px;
    width: 100%;
    border: 1.5px solid #00000029;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    padding-inline: 10px;
    box-sizing: border-box;
    font-size: 16px;
}

.form__subscriptions {
}

.form__comments {
}

.form__consent-privacy {
}

.form__submit {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
}

.submit-button {
    background-color: #4CAF50;
    color: white;
    font-size: 18px;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #45a049;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.submit-button:active {
    background-color: #3e8e41;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.important_text {
    margin-top: 20px;
    margin-bottom: 20px;
}

::placeholder {
    color: rgb(163, 163, 163);
    font-family: 'Open Sans', sans-serif;
    opacity: 1;
    font-style: italic;
    font-size: 14px;
}

.d_none {
    display: none;
}

.footer {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.8rem;
    color: #888;
}

.footer__link {
    color: #888;
    text-decoration: none;
}

.footer__link:hover {
    text-decoration: underline;
}