/* Typography */
h2 {
    margin-top: 0.25rem;
}

#existing-member {
    display: none;
}

#registration-wall {
    /* width: 100%; */
    /* height: 100vh; */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    font-family: 'Roboto', sans-serif;
    display: block;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.modal-content {
    /* margin: 15% auto; */
    padding: 20px;
    /* border: 1px solid #888; */
    max-width: 640px;
    max-height: 90vh;
    width: 90%;
    background-color: #fefefe;
    overflow: auto;
}

.modal-title {
    color: #9f3e52;
    text-align: left;
    margin-bottom: 0.5rem;
}

/* Create grid layout for .field-grid */
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    row-gap: 0.5rem;
}

/* Col span two in the grid for fields that have class .col-span-2 */
.field-grid .col-span-2 {
    grid-column: 1 / span 2;
}

.error-message {
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 1.4rem;
    padding: 1rem 0;
}

#registration-form input {
    font-family: 'Roboto', sans-serif;
    font-size: 1.4rem;
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    column-gap: 1rem;
    row-gap: 0.5rem;
}

.checkbox-container {
    margin-bottom: 0.35rem;
    display: flex;
    column-gap: 1rem;
    justify-content: flex-start;
    align-items: center;
}

.checkbox-container *:hover {
    cursor: pointer;
}

/* Form elements */

.form-label {
    margin-bottom: 0.25rem;
}

.checkbox-label {
    margin: 0;
    font-size: 1.6rem;
}

.interests-label {
    margin: 1rem 0;
}

input[type=text],
input[type=email],
select {
    width: 100%;
    padding: 0.78rem;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

input[type=text]:focus,
input[type=email]:focus,
input[type=checkbox]:focus {
    outline: none;
    border-color: #9f3e52;
    box-shadow: 0 0 0 2px rgba(159, 62, 82, 0.2);
}

input[type=submit] {
    width: 100%;
    font-weight: 600;
    font-size: 1.2rem;
    background-color: #9f3e52;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: #8d3749;
}

#pageContent {
    transition: filter 0.3s;
}

.toggle-button {
    color: #9f3e52;
    display: block;
    margin-bottom: 1rem;
}

.intro-text {
    text-align: left;
    margin-bottom: 20px;
}

/* Tooltips */

.tooltip {
    position: relative;
    display: inline-block;
    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-color: #5d5d5d;
    text-decoration-thickness: 1px;
    font-weight: bold;
}

.tooltip:hover {
    cursor: help;
    color: #9f3e52;
}

.field-name-body {
    position: relative;
}

.side-annotation {
    padding-top: 1rem;
    margin-top: 0;
    position: absolute;
    left: 105%;
    width: 100%;
    max-width: 30rem;
    border-top: .1rem solid #000;
    transition: opacity 0.2s ease-in, opacity 0.5s ease-out;
    /* Add transitions with different timing functions */
    will-change: opacity;
}

.modal-annotation,
.modal-annotation.active {
    display: none;
}

/* Responsive breakpoints */

@media screen and (max-width: 1250px) {
    .side-annotation {
        width: 25%;
    }
}

@media screen and (max-width: 1150px) {
    .side-annotation {
        width: 20%;
    }
}

@media screen and (max-width: 1050px) {
    .modal-content {
        position: relative;
        background-color: #fff;
        padding: 2rem;
        margin: auto 2rem;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    }

    .side-annotation {
        display: none;
    }

    .modal-annotation {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        justify-content: center;
        align-items: center;
    }

    /* Show the modal box when the class 'active' is added */
    .modal-annotation.active {
        display: flex;
    }

    .modal-close {
        position: absolute;
        font-size: 3rem;
        top: -6px;
        right: 8px;
        cursor: pointer;
    }

    .modal-close:hover {
        color: red;
    }

    .modal-content {
        margin: 0;
        max-width: unset;
    }
}

@media screen and (max-width: 500px) {
    #registration-wall {
        padding: 0;
        margin: 0;
        height: auto;
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }

    .modal-content {
        overflow: auto;
        width: 100%;
        max-width: 100%;
        /* height: 100vh;
        min-height: 100vh; */
        height: auto;
        /* min-height: -webkit-fill-available; */
        padding: 1rem;
    }

    .interest-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        column-gap: 0.5rem;
        row-gap: 0.25rem;
    }

    .checkbox-container * {
        font-size: 1.2rem;
    }

    .title-text {
        font-size: 1.2rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .modal-title,
    .intro-text {
        text-align: left;
        margin-top: 1rem;
    }

    #existing-member label,
    #new-registration label {
        font-size: 0.9rem;
    }

    #existing-member input:not([type="submit"]),
    #new-registration input:not([type="submit"]) {
        font-family: 'Roboto', sans-serif;
        font-size: 1.1rem;
        padding: 0.25rem 0.4rem;
        margin-bottom: 0.25rem;
    }

    #existing-member input[type="submit"],
    #new-registration input[type="submit"] {
        margin-top: 0.7rem;
        padding: 0.5rem;
    }
}