/* .new-game-dialog * {
    border: 1px solid red;
} */


.new-game-dialog {
    position: fixed;
    inset: 0;
    z-index: 9001;
}

#new-game-dialog.new-game-hidden {
    display: none;
}

.new-game-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9000;
}

.new-game-dialog-window {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin: 10vh auto;
    background: var(--color-background-main);
    padding: 25px;
    width: 90%;
    z-index: 9002;
    max-width: 500px;
    max-height: 80vh;
    border: 6px solid var(--color-background-around);
    border-radius: var(--radius);
    box-shadow: var(--main-shadow-inset);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.new-game-dialog-window::-webkit-scrollbar {
    display: none;
}


.new-game-dialog-header {
    margin-bottom: 30px;
}

.new-game-dialog-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

.numbers {
    display: inline-grid;
    grid-template-columns: max-content 35px 4rem 35px;
    row-gap: 5px;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-background-around);
}


.form-row {
    display: contents;
}

.form-row label {
    margin-right: 5px;
}

.form-row input {
    text-align: right;
    border: none;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-background-around);
    padding: 6px 0;
    background: transparent;
    font-size: 1.2rem;
}

.form-row input:focus {
    outline: none;
}

.form-row button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-backgound-field-button);
    color: var(--color-field-button);
    font-size: 20px;
    cursor: pointer;
    border-radius: 1.5rem;
}

button img {
  vertical-align: middle
}

#number-of-objects.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.number-minus:disabled img,
.number-plus:disabled img {
    opacity: 0.5;
    cursor: auto;
}

.new-game-dialog-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 15px 0px 5px;
    text-align: center;
}

.new-game-dialog-body label {
    display: block;
    margin: 4px 0;
}

.new-game-dialog-body label:has(input[name="guestMode"]) {
    margin-top: 10px;
    text-align: center;
}

.new-game-dialog-body input[name="guestMode"] {
    font-size: 2rem;
}


/* Help dialog */
.help-icon {
    font-family: Arial, Helvetica, sans-serif;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.2rem;
    height: 1.2rem;
    border: 1px solid var(--color-help-icon-border);
    color: var(--color-help-icon-text);
    border-radius: 50%;
    font-size: 0.8rem;
    cursor: help;
    margin-left: 6px;
    transform: translateY(-1px);
    /* position: relative; */
    padding-top: 1px;
    /* z-index: 9998; */
}

.help-icon.active {
    border-width: 2px;
}

.help-icon::after {
    content: attr(data-help);
    position: fixed;
    /* left: 50%; */
    /* top: -300%; */
    top: -3.3rem;
    /* transform: translateX(-50%); */
    background: var(--color-dialog-backgroud);
    color: var(--color-text-dialog);
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 0.8rem;
    /* white-space: nowrap; */
    min-width: 250px;
    max-width: 70dvw;
    display: none;
    /* z-index: 9999; */
}

.help-icon.active::after {
    display: block;
}


/* Radio button */
input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-radio-border);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    /* border: 1px solid red; */
}

input[type="radio"]:checked {
    border-color: var(--color-radio-border-checked);
}

input[type="radio"]:checked::after {
    content: "";
    width: 6px;
    height: 6px;
    background-color: var(--color-radio-checked);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* Checkbox */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    min-width: 16px;
    height: 16px;
    border: 2px solid var(--color-radio-border);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

input[type="checkbox"]:checked {
    /* background-color: #ff6600; */
    border-color: var(--color-radio-border-checked);
}

input[type="checkbox"]:checked::after {
    content: "✕"; /* ✕, ✔, ●, ★ */
    color: var(--color-radio-checked);
    font-size: 11px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}



#btn-new-game-open {
    /* font-family: 'Cinzel';
    font-weight: 600; */
    font-size: 1.2rem;
    width: 6rem;
    height: 3rem;
    min-height: 3rem;
    border-radius: 3rem;
    border: none;
    margin: 20px 0 5px;
    background: var(--color-backgound-field-button);
    color: var(--color-field-button);
}
#btn-new-game-open:hover {
    background-color: var(--color-backgound-field-button-hover);
    cursor: pointer;
}


@media (max-height: 770px) {
    .new-game-dialog-header {
        display: none;
    }
}

@media (max-height: 900px) {
    .new-game-dialog-window {
        margin: 5vh auto;
    }
}




