/* Home page (mobile.hbs) specific styles */

.organizer-banner {
    display: none;
    font-family: sans-serif;
    font-size: 1rem;
    color: var(--highlightColor);
    opacity: 0.8;
    text-align: center;
    padding: 4px 16px;
    margin-top: 8px;
}

.organizer-banner::before {
    content: '';
    display: block;
    width: 50%;
    border-top: 2px solid var(--highlightColor);
    opacity: 0.7;
    margin: 0 auto 8px;
}

content {
    font-family: 'Covered By Your Grace', cursive;
    font-size: 30pt;
    color: black;
    display: flex;
    flex-direction: column;
    padding: 12px 6px;
    margin: 12px 4px;
}

#homeContent {
    display: none;
}

#signInView {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
}

.signin-page-title {
    font-family: 'Racing Sans One', sans-serif;
    font-size: 3rem;
    color: var(--highlightColor);
    text-align: center;
    margin: 0 0 8px;
}

#signInMain {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.sign-in-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    max-width: 33%;
    aspect-ratio: 2 / 3;
    background-color: var(--neutralColor);
    border-radius: 999px;
    overflow: hidden;
    padding: 32px 20px;
    box-shadow: 4px 8px 16px 4px rgba(0, 0, 0, 0.25);
    margin: 24px;
}

.tag-hole {
    background-color: whitesmoke;
    width: 10%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.38);
    box-shadow: inset 3px 3px 4px 2px rgba(0, 0, 0, 0.55);
    flex-shrink: 0;
}

.sign-in-tag-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0px;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    box-shadow: inset 2px 2px 6px 2px rgba(0, 0, 0, 0.55);
    border-radius: 4%;
}

.returning-tag-body {
    overflow: hidden;
    gap: 10px;
}

.sign-in-prompt {
    font-family: 'Racing Sans One', sans-serif;
    font-size: 1.6rem;
    color: var(--highlightColor);
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 24px;
}

.sign-in-input {
    font-family: 'Covered By Your Grace', cursive;
    font-size: 1.5rem;
    border: 2px solid var(--highlightColor);
    border-radius: 8px;
    padding: 4px 12px;
    text-align: center;
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.sign-in-input:disabled {
    opacity: 0.4;
    background: #eee;
    cursor: not-allowed;
}

#newPlayerForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 94%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.fields-scroll-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.fields-scroll-wrapper::after {
    content: '↓';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(transparent, var(--neutralColor));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    font-size: 2.8rem;
    color: var(--highlightColor);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.25s;
    animation: scroll-bounce 1.2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(4px); }
}

.fields-scroll-wrapper.at-bottom::after {
    opacity: 0;
}

.new-player-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
}

.new-player-fields::-webkit-scrollbar {
    display: none;
}

.sign-in-submit {
    font-family: 'Racing Sans One', sans-serif;
    font-size: 1.5rem;
    background-color: var(--highlightColor);
    color: white;
    border-radius: 8px;
    padding: 6px;
    width: 90%;
    align-self: center;
    cursor: pointer;
    flex-shrink: 0;
}

.sign-in-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pin-hint {
    font-family: sans-serif;
    font-size: 1.2rem;
    color: var(--highlightColor);
    opacity: 0.6;
    text-align: center;
    line-height: 1.4;
}

.sign-in-error {
    color: red;
    font-family: sans-serif;
    font-size: 0.8rem;
    text-align: center;
    flex-shrink: 0;
}

.sign-in-stats {
    font-family: sans-serif;
    font-size: 1rem;
    color: var(--highlightColor);
    text-align: center;
    margin-top: 16px;
    opacity: 0.8;
}

/* Returning Player tag stage containers */
.returning-stage {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 94%;
    gap: 8px;
}

.returning-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 2px solid var(--highlightColor);
    border-radius: 8px;
    background: white;
    display: flex;
    flex-direction: column;
}

.returning-player-btn {
    background: none;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 10px 14px;
    text-align: left;
    font-family: 'Covered By Your Grace', cursive;
    font-size: 1.6rem;
    color: #333;
    cursor: pointer;
    flex-shrink: 0;
}

.returning-player-btn:last-child {
    border-bottom: none;
}

.returning-player-btn.selected {
    background-color: var(--highlightColor);
    color: white;
}

.returning-no-results {
    padding: 10px 14px;
    font-family: sans-serif;
    font-size: 0.9rem;
    color: #999;
    text-align: center;
}

.returning-selected-display {
    font-family: 'Covered By Your Grace', cursive;
    font-size: 1.8rem;
    color: var(--highlightColor);
    text-align: center;
    padding: 8px 10px;
    border: 2px dashed var(--highlightColor);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    opacity: 0.85;
    flex-shrink: 0;
}

.clear-returning-btn {
    font-family: sans-serif;
    font-size: 1.75rem;
    color: var(--highlightColor);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    text-decoration: underline;
    align-self: flex-start;
    padding: 0;
    margin-bottom: 42px;
    flex-shrink: 0;
}

.how-to-play {
    padding: 16px 20px;
    margin: 0 16px 20px;
    border-radius: 10px;
    border: 2px solid var(--highlightColor);
    background-color: white;
    color: var(--highlightColor);
    font-family: 'Covered By Your Grace', cursive;
}

.how-to-play-nav {
    font-size: 0.75em;
    opacity: 0.7;
    margin: 4px 0 8px;
    font-family: sans-serif;
}

.how-to-play ol {
    margin: 8px 0 0;
    padding-left: 24px;
    line-height: 1.8;
}

.mobile-title {
    color: black;
    font-size: 36pt;
    padding-bottom: 0;
}

.mobile-content {
    margin-top: 0;
    padding-top: 0;
    line-height: 1.1;
}

.info-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.info-box {
    font-size: 42pt;
    font-weight: bold;
    line-height: 1.2;
    padding: 20px;
    border: 4px solid var(--highlightColor);
    border-radius: 10px;
    background-color: var(--headerColor);
    color: var(--footerColor);
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .5);
}

.players-container .player-circle {
    font-size: 2rem;
    padding: 3px;
    width: 44px;
    height: 44px;
    min-width: 40px;
    min-height: 40px;
    flex: 0 0 40px;
    overflow: hidden;
}

@media screen and (orientation: landscape) {
    .sign-in-tag {
        flex: 0 0 auto;
        height: min(60vh, calc(100vh - 180px));
        max-height: none;
        width: auto;
        max-width: none;
        padding: 60px 16px;
        margin: 12px;
        gap: 50px;
    }
    .sign-in-tag-body {
        padding: 12px 0;
        gap: 8px;
    }
    .sign-in-prompt {
        margin-bottom: 12px;
    }
}

@media screen and (orientation: portrait) {
    .signin-page-title {
        font-size: 4.4rem;
    }
    .sign-in-prompt {
        font-size: 2.4rem;
    }
    .sign-in-input {
        font-size: 3rem;
        padding: 10px 12px;
    }
    .returning-player-btn {
        font-size: 3.6rem;
        padding: 12px 14px;
    }
    .sign-in-submit {
        font-size: 3rem;
        padding: 14px;
    }
    .sign-in-stats {
        font-size: 1.6rem;
        margin-top: 20px;
    }
    .organizer-banner {
        font-size: 1.6rem;
    }
    .pin-hint {
        font-size: 2rem;
    }
    .returning-selected-display {
        font-size: 2rem;
        padding: 10px 12px;
    }

    /* Carousel layout */
    #signInMain {
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        box-sizing: border-box;
        padding: 24px 20vw;
        gap: 16px;
        scrollbar-width: none;
    }
    #signInMain::-webkit-scrollbar {
        display: none;
    }
    .sign-in-tag {
        flex: 0 0 60vw;
        max-width: 60vw;
        margin: 0;
        padding: calc(15vw - 48px) 30px;
        gap: 70px;
        scroll-snap-align: center;
    }
}
