/* Auth pages: login, register, profile, reset-password, public player page */

.big-squash-auth-page {
    max-width: 520px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.big-squash-auth-page h1 {
    margin: 0 0 1rem;
    font-size: 1.75rem;
}

.big-squash-auth-page form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.big-squash-auth-page form label > span:first-child {
    font-size: 0.875rem;
    font-weight: 600;
}

.big-squash-auth-page input[type="email"],
.big-squash-auth-page input[type="password"],
.big-squash-auth-page input[type="text"],
.big-squash-auth-page input[type="tel"],
.big-squash-auth-page input[type="date"],
.big-squash-auth-page select,
.big-squash-auth-page textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #d0d4d9;
    border-radius: 6px;
    font: inherit;
    box-sizing: border-box;
}

.big-squash-auth-page textarea {
    resize: vertical;
    min-height: 5rem;
}

.big-squash-checkbox {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
}

.big-squash-honeypot {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.big-squash-btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    border: 1px solid #d0d4d9;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    color: inherit;
}

.big-squash-btn--primary {
    background: #1f4ed8;
    color: #fff;
    border-color: #1f4ed8;
}

.big-squash-btn--primary:hover {
    background: #1740b8;
}

.big-squash-btn-link {
    background: none;
    border: 0;
    padding: 0.25rem 0;
    color: #1f4ed8;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

.big-squash-form-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.big-squash-form-success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.big-squash-auth-notice {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.big-squash-auth-notice--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.big-squash-auth-notice--error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.big-squash-auth-links {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.big-squash-forgot-form {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
}

.big-squash-forgot-form form {
    display: flex;
    gap: 0.5rem;
}

.big-squash-forgot-form input {
    flex: 1;
}

/* "Resend verification" lives inside the login form, under the error box */
.big-squash-resend-inline {
    margin: -0.25rem 0 0.75rem;
    font-size: 0.9375rem;
}

.big-squash-resend-inline .big-squash-auth-notice {
    display: block;
    margin: 0.5rem 0 0;
}

.big-squash-candidate-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.big-squash-candidate-list li {
    margin-bottom: 0.5rem;
}

.big-squash-candidate-list .big-squash-btn {
    width: 100%;
    text-align: left;
}

.big-squash-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.big-squash-search-status {
    margin: 0.5rem 0;
    color: #475569;
    font-size: 0.95rem;
    min-height: 1.25rem;
}

.big-squash-search-hint {
    margin-top: 1rem;
    color: #475569;
}

.big-squash-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Password field with a show / hide toggle (login modal and page) */
.big-squash-password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.big-squash-password-field input[type="password"],
.big-squash-password-field input[type="text"] {
    flex: 1 1 auto;
    width: 100%;
    padding-right: 2.5rem;
}

.big-squash-password-field .big-squash-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.25rem;
    width: 2rem;
    height: 2rem;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
    box-shadow: none;
    transform: translateY(-50%);
    opacity: 0.7;
    cursor: pointer;
}

.big-squash-password-field .big-squash-password-toggle:hover,
.big-squash-password-field .big-squash-password-toggle:focus-visible {
    background-color: transparent;
    opacity: 1;
}

.big-squash-password-field .big-squash-password-toggle:focus-visible {
    outline: 2px solid #1f4ed8;
    outline-offset: 1px;
}

.big-squash-password-field .big-squash-password-toggle[aria-pressed="true"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

/* reCAPTCHA checkbox slot in the login forms; empty (and hidden) unless the
   Login No Captcha reCAPTCHA plugin is configured and the bundle renders into it */
.big-squash-captcha {
    margin-bottom: 1rem;
}

.big-squash-captcha:empty {
    display: none;
}

.big-squash-captcha--failed {
    font-size: 0.9rem;
    color: #b91c1c;
}

/* The widget is 304px wide: shrink it where the panel is narrower than that */
@media (max-width: 400px) {
    .big-squash-modal__panel {
        padding: 1.25rem 1rem;
    }

    .big-squash-captcha > div {
        transform: scale(0.86);
        transform-origin: 0 0;
    }
}

/* Modal */
html.big-squash-modal-open {
    overflow: hidden;
}

.big-squash-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.big-squash-modal[hidden] {
    display: none;
}

.big-squash-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.big-squash-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    width: min(420px, 92vw);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.big-squash-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    width: 2rem;
    height: 2rem;
}

/* Profile sections */
.big-squash-profile-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.big-squash-profile-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.big-squash-profile-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
}

.big-squash-profile-section__hint {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 0.75rem;
}

.big-squash-profile-info {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 0 0 1rem;
}

.big-squash-profile-info dt {
    font-weight: 600;
    color: #475569;
}

.big-squash-profile-info dd {
    margin: 0;
    color: #0f172a;
}

.big-squash-account-action {
    margin: 0.75rem 0 0;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.big-squash-account-action[open] {
    background: #f8fafc;
}

.big-squash-account-action summary {
    cursor: pointer;
    font-weight: 600;
}

.big-squash-account-action form {
    margin-top: 0.75rem;
}

/* Profile edit */
.big-squash-profile-avatar-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.big-squash-profile-avatar-wrap {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #94a3b8 url('../img/avatar-placeholder.svg') center/cover no-repeat;
}

.big-squash-profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.big-squash-avatar-status {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
}

.big-squash-avatar-status[data-kind="success"] {
    color: #15803d;
}

.big-squash-avatar-status[data-kind="error"] {
    color: #b91c1c;
}

/* Public player page */
.big-squash-player-page {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.big-squash-player-page__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.big-squash-player-page__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    flex-shrink: 0;
}

.big-squash-player-page__avatar--placeholder {
    background: #94a3b8 url('../img/avatar-placeholder.svg') center/cover no-repeat;
}

.big-squash-player-page__name {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
}

.big-squash-player-page__club,
.big-squash-player-page__country {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.big-squash-player-page__rating {
    margin: 0.25rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.2;
}

.big-squash-player-page__rating-value {
    font-weight: 700;
    font-size: 2rem;
    color: #4a90e2;
}

.big-squash-player-page__rating-meta {
    color: #94a3b8;
    font-size: 0.9rem;
}

.big-squash-player-page__bio {
    margin: 1.5rem 0;
    color: #1e293b;
}

.big-squash-player-page__history h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.big-squash-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.big-squash-history-table th,
.big-squash-history-table td {
    text-align: left;
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid #e2e8f0;
}

.big-squash-history-change.is-positive {
    color: #15803d;
    font-weight: 600;
}

.big-squash-history-change.is-negative {
    color: #b91c1c;
    font-weight: 600;
}

.big-squash-empty {
    color: #64748b;
    font-style: italic;
}

/* My tournaments (profile page) */
.big-squash-my-entries {
    list-style: none;
    margin: 0;
    padding: 0;
}

.big-squash-my-entries__item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e5e7eb;
}

.big-squash-my-entries__item:first-child {
    border-top: 0;
}

.big-squash-my-entries__name {
    font-weight: 600;
}

.big-squash-my-entries__meta,
.big-squash-my-entries__note,
.big-squash-my-entries__hint {
    font-size: 0.9rem;
    color: #4b5563;
}

.big-squash-my-entries__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    white-space: nowrap;
}

.big-squash-my-entries__status {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
}

.big-squash-my-entries__status.is-in {
    color: #1e7e34;
}

.big-squash-my-entries__status.is-checked-in {
    color: #1e7e34;
}

.big-squash-my-entries__status.is-waiting {
    color: #b26a00;
}

@media (max-width: 600px) {
    .big-squash-my-entries__item {
        flex-direction: column;
    }

    .big-squash-my-entries__side {
        align-items: flex-start;
    }
}
