/* --- General Styles --- */
html {
    overflow-y: scroll;
}
body, html {
    font-family: "Helvetica", sans-serif;
    font-size: 1.2em;
    margin: 0;
    padding: 0;
}
body {
    /* Centering for register_en.php, register.php, edit-contact.php, login.php, export.php */
    /* display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 90vh; */
    /* If you want only the form centered, use a wrapper div instead */
    /* 
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 90vh;
    */
}
h1 {
    font-size: 2.0em;
    align-self: start;
    padding: 0 0 1.0rem 2.0rem;
}
h2 {
    font-size: 2.0em;
    margin: 0;
    margin-bottom: 0.5em;
}
h3 {
    padding: 0 0 0.5rem 0.5rem;
    margin: 0;
    margin-bottom: 0.7em;
}
.header {
    align-self: start;
    width: 100%;
}
.header-GTlogo {
    float: right;
    top: 0;
    right: 0;
    width: 8.0rem;
    padding: 1.0rem;
    padding-top: 1.5rem;
}
.body-container {
    display: grid;
    align-items: center;
    justify-items: center;
    width: 100%;
    min-height: 70vh;
    margin: 0;
}
.form-container {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    width: 50vw;
    min-height: 50vh;
    background-color: White;
    box-shadow: 0 0 1.0rem 1.0rem LightGrey;
    justify-items: center;
    align-items: center;
}
.form-grid {
    display: grid;
    padding: 3% 2% 3% 2%;
    grid-template-columns: 1.1fr 5fr;
}
.form-header {
    grid-column: 1 / -1;
    padding: 1.0rem 0.0rem;
    margin: 0 0 2.0rem 0;
}
.grid {
    display: grid;
    padding: 3% 2% 3% 2%;
    grid-template-columns: 1fr;
}
.centered-grid {
    justify-items: center;
    align-items: center;
}
.grid-cell {
    margin: 0.5rem;
}
.label-cell {
    margin: 1.1rem 0 0 0;
    text-align: right;
}

    #container-start {
        display: none;
    }
    #container-form {
        display: revert;
    }
    #container-tandcs {
        display: none;
    }
    #container-finish {
        display: none;
    }

input {
    padding: 0.5rem;
    font-size: 1.1rem;
    border: 0.2rem solid Grey;
}
input[type=button], input[type=submit], input[type=reset] {
    background-color: #04AA6D;
    border: 0.2rem solid #04AA6D;
    color: white;
    font-size: 1.2em;
    padding: 0.5rem 1.5rem 0.6rem 1.5rem;
    margin-right: 0.5rem;;
    text-decoration: none;
    cursor: pointer;
}
input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover {
    background-color: white;
    color: #04AA6D;
    border: 0.2rem solid #04AA6D;
}
input[type=button]:disabled, input[type=submit]:disabled, input[type=reset]:disabled {
    background-color: white;
    color: Grey;
    border: 0.2rem solid Grey;
    cursor: default;
}
.invalid {
    border: 0.2rem solid Red;
}
.autocomplete {
    position: relative;
    display: inline-block;
    width: 100%;
}
.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
}
.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #d4d4d4;
}
.autocomplete-items div:hover {
    background-color: #e9e9e9;
}
.autocomplete-active {
    background-color: DodgerBlue !important;
    color: #ffffff;
}
.ui-autocomplete-loading {
    background: white url("images/ui-anim_basic_16x16.gif") right center no-repeat;
}
#name, #email, #search_term {
    width: 95%;
}
#phone, .country-autocomplete-cell, #displayname {
    width: 50%;
}
#country_autocomplete {
    width: 100%;
}
#age {
    width: 10%;
}
#agree {
    margin: 0.9rem 1.0rem 0.9rem 0;
    float: left;
    transform: scale(2);
    accent-color: #04AA6D;
}
#cancel {
    float: left;
}
#back {
    float: left;
}
#next, #submit {
    float: right;
}
.reg_button {
    width: 100%;
    text-align: left;
    background-color: #04AA6D;
    border: 0.2rem solid #04AA6D;
    color: white;
    font-size: 1.2em;
    padding: 0.7rem 1.5rem 0.6rem 1.5rem;
    margin: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.reg_button:hover {
    background-color: white;
    color: #04AA6D;
    border: 0.2rem solid #04AA6D;
}
.lang_flag {
    width: 2.0rem;
    margin-right: 0.5rem;
}

/* --- T&Cs Scroller Styles --- */
.tcs-scroller {
    border: 1px solid #ccc;
    overflow-y: scroll;
    height: 30vh;
    width: 95%;
    padding-right: 1.0rem;
    padding-left: 0.5rem;
    font-size: 0.85em;           /* Decrease font size */
    line-height: 1.4;            /* Improve readability */
}

.tcs-scroller p,
.tcs-scroller li {
    margin-bottom: 0.8em;        /* Add spacing between paragraphs and list items */
}

.tcs-scroller ol,
.tcs-scroller ul {
    margin-bottom: 0.8em;        /* Add spacing after lists */
}
.tcs-scroller ol {
    list-style: none;
    counter-reset: item;
    margin-left: 0;
    padding-left: 2.2em;
}

.tcs-scroller ol > li {
    counter-increment: item;
    position: relative;
    margin-left: 0;
}

.tcs-scroller ol > li:before {
    content: counter(item) ". ";
    position: absolute;
    left: -3.0em;      /* Increased from -2em */
    width: 2.0em;      /* Increased from 2em */
    text-align: right;
}

/* Second-level: no indent */
.tcs-scroller ol > li > ol {
    counter-reset: subitem;
    margin-left: 0;
    padding-left: 0;
}

.tcs-scroller ol > li > ol > li {
    counter-increment: subitem;
    position: relative;
    margin-left: 0;
}

.tcs-scroller ol > li > ol > li:before {
    content: counter(item) "." counter(subitem) ". ";
    position: absolute;
    left: -3.2em;    /* Slightly more than before */
    width: 3.0em;
    text-align: right;
}

/* Third-level: indented and lettered */
.tcs-scroller ol > li > ol > li > ol {
    list-style-type: lower-alpha;
    margin-left: 2em;
    padding-left: 1.5em;
}

.tcs-scroller ol > li > ol > li > ol > li {
    position: relative;
}

.tcs-scroller ol > li > ol > li > ol > li:before {
    content: "";
    position: absolute;
    left: -1.5em;
}

/* --- Checkbox Label Container --- */
.checkbox-label-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1.0rem;
    margin-top: 1.0rem;
}

/* --- Record.php Specific --- */
.entry-form {
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    background-color: LightGrey;
}
#inner_container {
    display: flex;
    width: 100%;
}
.entryForm_column {
    display: inline-block;
    height: 5rem;
}
.editCompetitorButton {
    position: absolute;
    top: 1.0rem;
    right: 1.0rem;
}
#search_term {
    width: 30rem;
    font-size: 1.3em;
}
#time_wrapper {
    width: fit-content;
    margin: 0 5rem 3rem 5rem;
    position: relative;
    transform: scale(1.5);
}
.datatable {
    margin: 1.0rem;
}
.datatable th, td {
    padding: 0.1em 0.6em;
    height: 1.7em;
    text-align: left;
}
tr:hover {
    background: whitesmoke;
}
.void {
    text-decoration: line-through;
    color: grey;
}
input.voidButton {
    background-color: LightGrey;
    color: black;
    font-size: 0.9em;
    padding: 0.2rem 1.0rem 0.3rem 1.0rem;
    border: 0.1rem solid Grey;
}
input.voidButton:hover {
    background-color: white;
    color: #04AA6D;
    border: 0.1rem solid #04AA6D;
}


@media only screen and (max-width: 800px) {
    body, html {
        font-size: 1.0em;
    }
    .grid {
        padding: 5%;
    }
    .form-container {
        width: 100%;
        box-shadow: none;
    }
    .form-header {
        grid-column: 1;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .label-cell {
        text-align: left;
        margin: 0.7rem 0.7rem 0 0;
    }
    .grid-cell {
        margin: 0.5rem 0;
    }
    #phone, .country-autocomplete-cell, #displayname {
        width: 95%;
    }
}