body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', 'Trebuchet MS', Verdana, sans-serif;
    overflow-y: auto;
}

h1 {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', 'Trebuchet MS', Verdana, sans-serif;
}

.bold-text {
    font-weight: 700;
}

.wrap {
    position: relative;
    width: auto;
    margin: 0 auto;
    text-align: center;
    font-family: 'Open Sans', 'Trebuchet MS', Verdana, sans-serif;
    user-select: none;
}

#sr_announce {
    position: absolute;
    left: -999px;
    opacity: 0.0;
    z-index: 998;
    pointer-events: none;
    outline: 0px
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #D5E6FD;
    z-index: 6;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    background-image: url(../img/splash-background-light.png);
    background-repeat: no-repeat;
    background-position: center;
}

#splash-screen-body {
    width: fit-content;
    height: fit-content;
    z-index: 2;
}

#splash-screen-header-bubble {
    position: absolute;
    width: fit-content;
    border: 1.5px solid #c6cfdf;
    border-radius: 10px;
    background-color: #fff;
    padding-top: 9px;
    padding-bottom: 22px;
    padding-left: 13px;
    padding-right: 13px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -47px;
    color: #2773b1;
    overflow-y: hidden;
}

#splash-screen-header-bubble h1 {
    font-size: 23px;
}

#splash-screen-logo-text {
    color: #336699;
    font-weight: normal;
}

#splash-screen-word-search-logo-bg {
    position: absolute;
    z-index: 2;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

#splash-screen-word-search-logo {
    position: relative;
    z-index: 4;
}

#splash-screen-word-search-logo div {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 38px;
    border: 1.5px solid transparent;
    color: #000;
    background-color: transparent;
    font-family: 'Open Sans', 'Trebuchet MS', Verdana, sans-serif;
    font-size: 19px;
    text-align: center;
    font-weight: 500;
    line-height: 35px;
    margin: 0;
    padding: 0;
    vertical-align: top;
    margin-left: -2px;
}

#splash-screen-word-search-logo-bg div {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 38px;
    border: 1.5px solid #c6cfdf;
    color: #000;
    background-color: #fff;
    font-family: 'Open Sans', 'Trebuchet MS', Verdana, sans-serif;
    font-size: 19px;
    text-align: center;
    font-weight: 500;
    line-height: 35px;
    margin: 0;
    padding: 0;
    vertical-align: top;
    margin-left: -2px;
}

#splash-screen-word-search-logo-highlight {
    position: absolute;
    width: 350px;
    height: 26px;
    background-color: #73FFA5;
    border-radius: 5px;
    opacity: 0.3;
    z-index: 3;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    margin-left: -1px;
}

#splash-screen-body ol {
    position: relative;
    width: 257px;
    padding-left: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 15px;
}

#splash-screen-body li {
    width: 100%;
    margin-left: 0;
    font-size: 18px;
    list-style-type: none;
    font-weight: 500;
}

.custom-switch {
    padding-left: 2.25rem;
    display: inline;
    float: right;
}

.custom-control-input-checked::before {
    background-color: #00aebe !important;
    border-color: #004E56 !important;
}

.white-focus-ring::before {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 1) !important;
}

.custom-control-label {
    cursor: pointer;
}

.splash-screen-toggle-label {
    position: relative;
    top: -2px;
    font-size: 16px;
    font-weight: normal;
}

#splash-screen-play-button {
    background-color: #2f7ac0;
    color: white;
    width: 265px;
    height: 40px;
    text-align: center;
    cursor: pointer;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
    border: 0;
    font-size: 16px;
    font-weight: 500;
    outline-width: 2px !important;
}

#splash-screen-play-button:hover,
.close-dialog:hover {
    filter: brightness(1.1);
}

#puzzle-header {
    position: relative;
    width: 100%;
    height: 64px;
    top: 0;
    left: 0;
    color: #4e4d4d;
    font-weight: normal;
    background-color: #D5E6FD;
    border-bottom: 1px solid #b6c1db;
    display: flex;
    justify-content: center;
    align-items: center;
}

#header-bubble {
    width: fit-content;
    height: 38px;
    border: 1.5px solid #c6cfdf;
    border-radius: 15px;
    background-color: #fff;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 2px;
}

#header-bubble h1 {
    font-size: 25px;
}

#puzzle-navigation {
    position: relative;
    top: 0;
    left: 0;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
    margin-top: 0;
    height: 37px;
    list-style: none;
    padding-top: 6px;
    margin-bottom: 50px;
    color: #666;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}

#puzzle-navigation ul {
    margin-top: 0;
}

#puzzle-navigation li {
    display: inline;
    margin-right: 10px;
}

#puzzle-navigation li a {
    outline-offset: 3px !important;
    border-radius: 1px;
    color: #006cf0;
}

#logo-text {
    color: #336699;
    font-weight: normal;
}

#puzzle-container {
    position: relative;
    width: fit-content;
    margin: auto;
}

#ws-words {
    position: relative;
    min-width: 220px;
    margin-right: 30px;
    font-size: 20px;
    color: #333;
    border-radius: 8px;
}

#ws-words:focus-visible {
    outline: 2px solid !important;
    outline-offset: 2px !important;
}

#word-list-header {
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 102px;
    font-size: 19px;
    text-align: right;
    width: 100%;
    height: 34px;
    background-color: #d5e6fd;
    border-radius: 8px 8px 0 0;
    border: 1px solid #ccc;
    color: #333;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
}

#found-word-count {
    height: 35px;
    font-size: 16px !important;
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
    background-color: #eeeeee;
    display: flex;
    justify-content: left;
    align-items: center;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    outline-offset: -1px !important;
}

#found-word-count:focus-visible {
    border-radius: 4px;
}

#found-word-count:focus-visible #word-count-bubble {
    border: 1px solid #4F4F4F;
}

#word-count-bubble {
    padding-left: 6px;
    padding-right: 6px;
    margin: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #bcb7b7;
    border-radius: 5px;
    color: #666;
}

#ws-words ul {
    list-style-type: none;
    padding-bottom: 8px;
    text-align: right;
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    width: 100%;
    padding-left: 0;
    margin-bottom: 0;
}

#ws-words li {
    padding-left: 6px;
    list-style-type: none;
    font-size: 18px;
}

#ws-words li:first-child {
    margin-top: 7px;
}

#ws-words li .custom-checkmark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 1px;
    margin-left: 2px;
    margin-right: 8px;
    margin-top: -4px;
    border: 1px solid #cccccc;
    background: #fff;
    color: white;
    font-size: 14px;
    vertical-align: middle;
}

.word-list-terms {
    margin-right: 4px;
}

.word-list-links {
    margin-right: 4px;
    color: #0068ec;
    outline: none;
}

.light-word-list-items:focus-visible {
    background-color: #ceffd3;
    outline: 0;
}

.dark-word-list-items:focus-visible {
    background-color: #495057 !important;
    outline: 0;
}

#ws-words dark-list-items {
    background-color: #4a654d;
}

.dark-word-list-items a {
    color: #ffc9ff !important;
}

.dark-word-list-items a:hover {
    color: #ddaedd !important;
}

#word-list-endcap {
    margin-top: 0;
    margin-right: 102px;
    font-size: 20px;
    width: 100%;
    height: 34px;
    background-color: #d5e6fd;
    border-radius: 0 0 8px 8px;
    border: 1px solid #ccc;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wordsearch-container {
    position: relative;
    display: block;
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: 12px;
    /* Dangerfield, Dominic: Remove the force touch ability on the grid for iOS */
    user-select: none;
    -webkit-user-select: none;
}

.standard-wordsearch-container-padding {
    padding-top: 4px !important;
    padding-left: 4px !important;
}

#wordsearch-canvas {
    z-index: 3;
    pointer-events: none;
}

/* Updated (Dangerfield, Dominic): Added this item to display for users to see what letter is under their finger on touch events */
#touchIndicator {
    display: none;
    position: fixed;
    z-index: 4;
    width: 3rem;
    height: 3rem;
    line-height: 3rem;
    background-color: #c6c7c9;
    border: 1px solid #292929;
    border-radius: 5px;
    font-size: larger;
    font-family: 'Open Sans', 'Trebuchet MS', Verdana, sans-serif;
}

.ws-area {
    display: block;
    min-width: 540px;
    padding: 10px;
    background-color: #eeeeee;
    border-radius: 10px;
    font-family: 'Open Sans', 'Trebuchet MS', Verdana, sans-serif;
    box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.3);
    margin-bottom: 18px;
    margin-right: auto;
}

.ws-area-focus-indicator {
    outline: 2px solid !important;
    outline-offset: 2px !important;
}

#ws-area table {
    border-collapse: collapse;
    outline: 0;
}

#ws-area td {
    position: static;
    width: 35px;
    height: 35px;
    padding: 0;
    border: 1px solid #999;
    background-color: white;
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
    color: #333;
    user-select: none;
    line-height: 35px;
}

#ws-area td:focus-visible {
    z-index: 2;
    outline: 4px solid #000;
    border-radius: 3px;
}

#ws-area tr th[scope="row"] {
    padding-right: 8px;
}

#ws-area tr th[scope="col"] {
    padding-bottom: 7px;
}

.cell-content {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.cell-shadow {
    position: absolute;
    width: 35px;
    height: 35px;
    left: 0;
    top: 0;
    z-index: 3;
}

.selected-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    margin: 2px;
    background-color: green;
    border-radius: 50%;
    z-index: 1;
}

.selected-dark-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 5px;
    margin: 2px;
    background-color: #FFF;
    border-radius: 50%;
    z-index: 1;
}

#completion-message {
    margin-bottom: 10px;
}

#completion-ribbon {
    width: 60px;
    margin-bottom: 20px;
}

#view-definitions {
    width: 140px;
}

#terms-definition-link {
    font-size: 16px;
    font-weight: 500;
    background: #2f7ac0;
    color: white;
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 2.5px;
    padding-top: 1px;
    border-radius: 20px;
    margin-top: 8px;
}

.completion-message-first-line {
    font-weight: 500;
}

.dialog-box {
    width: 580px;
    height: 425px;
    background-color: white;
    border-radius: 5px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    display: flex;
    flex-direction: column;
    user-select: none;
}

dialog {
    padding: 0;
    border: none;
}

#definition-dialog-box,
#instruction-dialog-box,
#completion-dialog-box {
    visibility: hidden;
}

.instruction-container li {
    margin-bottom: 15px;
}

.dialog-header {
    background-color: #2f7ac0;
    text-align: center;
    width: 100%;
    height: 40px;
    border-radius: 5px 5px 0 0;
}

.dialog-header h2 {
    font-size: 20px;
    color: white;
    font-weight: 500;
    margin: 0;
    padding: 0;
    line-height: 40px;
}

.dialog-body {
    padding: 15px;
}

#dialog-definition-body,
#dialog-completion-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

#dialog-instruction-body {
    text-align: left;
    height: calc(100% - 125px);
    overflow-y: scroll;
}

#dialog-instruction-body:focus-visible {
    outline-offset: -2px;
}

#dialog-instruction-body h3:first-child {
    margin-top: 0;
}

#dialog-instruction-body h3 {
    font-weight: 500;
    font-size: 20px
}

#word-total-list-item {
    display: none;
}

#popup-word {
    font-size: 30px;
    text-align: center;
    font-style: normal;
}

#popup-definition,
#completion-message,
#completion-sub-title {
    font-size: 18px;
    text-align: center;
}

.dialog-footer {
    width: 100%;
    height: 85px;
    border-radius: 0 0 5px 5px;
    position: relative;
    background-color: #eee;
    border-top: 1px solid #cfcdcd;
}

#dialog-instruction-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 85px;
    border-radius: 0 0 5px 5px;
    background-color: #eee;
    border-top: 1px solid #cfcdcd;
}

.close-dialog {
    background-color: #2f7ac0;
    color: white;
    width: 97px;
    height: 42px;
    text-align: center;
    cursor: pointer;
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
    border: 0;
    font-size: 16px;
    outline-offset: 3px;
}

#accordion-button {
    background-color: #2f7ac0;
    color: white;
    text-align: center;
    cursor: pointer;
    width: 25%;
    border-radius: 5px;
    border: 0;
    margin: 5px;
    outline-offset: 3px;
}

.focus-indicator-dark:focus-visible {
    outline: 2px solid #FFFFFF !important;
    outline-offset: 2px !important;
}

.focus-indicator:focus-visible {
    outline: 2px solid #000000 !important;
    outline-offset: 2px !important;
}

#disabled-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    opacity: 0.8;
    z-index: 4;
    display: none;
}

.disabled {
    pointer-events: none;
}

#footer {
    position: relative;
    margin-bottom: 15px;
}

#footer nav ul {
    list-style-type: none;
}

#footer a {
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

#definition-list {
    position: absolute;
    top: 150px;
    left: 0;
    right: 0;
    margin: auto;
    width: 680px;
    min-height: 500px;
    background-color: white;
    color: #333;
    text-align: left;
    z-index: 5;
    border-radius: 8px;
    border: 1.5px solid #d5d5d5;
    display: none;
}

#definition-list ol {
    outline: 0;
}

#definition-list-header {
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 102px;
    font-size: 19px;
    text-align: right;
    width: 100%;
    height: 34px;
    background-color: #d5e6fd;
    border-radius: 8px 8px 0 0;
    border-bottom: 1.5px solid #ccc;
    color: #333;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
}

#definition-list ol {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-right: 20px;
}

#definition-list li {
    font-weight: bold;
    margin-bottom: 20px;
}

#definition-list li span {
    font-weight: normal;
}

#definition-list dfn {
    font-style: normal;
}

#definition-list-endcap {
    margin-top: 0;
    margin-right: 102px;
    font-size: 20px;
    width: 100%;
    height: 34px;
    background-color: #d5e6fd;
    border-radius: 0 0 8px 8px;
    border-top: 1.5px solid #ccc;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

#back-to-top-container {
    position: relative;
    width: 100%;
    height: fit-content;
    text-align: center;
    padding-bottom: 15px;
}

#back-to-top-link {
    color: #0070f4;
    border-radius: 2px;
}

/* Updated (Dangerfield, Dominic): Added all below allow for more mobile friendly layouts */
@media screen and (max-width: 599px) {
    .dialog-box {
        width: 100%;
        height: 50%;
    }

    #completion-dialog-box {
        height: 55%;
        /* Specific for mobile */
    }

    #completion-dialog-box button {
        background-color: #2f7ac0;
        color: white;
        width: fit-content;
        /* Specific for iPhones */
        height: 42px;
        text-align: center;
        cursor: pointer;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 5px;
        border: 0;
        font-size: 16px;
        outline-offset: 3px;
    }

    #definition-list {
        width: 100%;
    }

    #puzzle-navigation {
        margin-bottom: 50px;
    }

    #words-list {
        columns: 2;
    }

    .ws-area {
        font-size: 14px;
        margin-left: 0;
        padding-left: 0;
        padding-right: 0;
        min-width: 0;
    }

    #ws-words {
        float: '';
        font-size: 15px;
        width: 100%;
        height: auto;
    }

    footer {
        margin-left: 0;
        margin-bottom: 0;
    }
}

@media screen and (min-width: 600px) {
    .ws-area {
        min-width: 540px;
        margin-left: 260px;
    }

    #words-list {
        columns: 1;
    }

    #ws-words {
        float: left;
        display: inline-block;
        height: fit-content;
    }

    footer {
        margin-left: 260px;
        margin-bottom: 15px;
    }
}