/* 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;
}

.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;
}

/* 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;
}
