/* -------------------------------------------------------------------------
   Authentication Styles & Top-Right Button Placement
   ------------------------------------------------------------------------- */

/* Site Auth Top-Right Container
   - On the homepage (body.home): stays fixed even when scrolling carousel
   - On other pages (body:not(.home)): moves up with the page when scrolling
   - Does not push down or displace any other page elements
*/
.site-auth-container {
    top: calc(0.875rem + 1.75vw - 5.6px);
    right: calc(3.75vw + 8px);
    z-index: 10005;
    pointer-events: auto;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.home .site-auth-container {
    position: fixed;
}

body:not(.home) .site-auth-container {
    position: absolute;
}

/* Site Auth Button */
.site-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 18px;
    font-family: var(--global--font-family-headings, "Oswald", sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff !important;
    background-color: rgba(26, 43, 41, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    line-height: 1.2;
    user-select: none;
    box-sizing: border-box;
}

.site-auth-btn:hover,
.site-auth-btn:focus {
    color: #ffffff !important;
    background-color: #a38451;
    border-color: #a38451;
    box-shadow: 0 0 12px rgba(163, 132, 81, 0.4);
    transform: translateY(-1px);
}

.site-auth-btn:active {
    transform: translateY(0);
}

.site-auth-btn--admin {
    padding: 3px 10px;
    font-size: 0.75rem;
    background-color: rgba(163, 132, 81, 0.25);
    border: 1px solid #a38451;
    color: #e5c38c !important;
}

.site-auth-btn--admin:hover,
.site-auth-btn--admin:focus {
    background-color: #a38451;
    border-color: #a38451;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(163, 132, 81, 0.5);
}

/* Authenticated User Badge & Logout */
.site-auth-user-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(26, 43, 41, 0.85);
    padding: 4px 6px 4px 14px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.site-auth-user {
    font-family: var(--global--font-family-base, "Roboto", sans-serif);
    font-size: 0.8125rem;
    color: #a38451;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a.site-auth-user {
    cursor: pointer;
}

a.site-auth-user:hover,
a.site-auth-user:focus {
    color: #e5c38c;
    text-shadow: 0 0 8px rgba(229, 195, 140, 0.5);
    text-decoration: underline;
}

.site-auth-form {
    margin: 0;
    padding: 0;
    display: inline;
}

.site-auth-btn--logout {
    padding: 5px 12px;
    font-size: 0.75rem;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.site-auth-btn--logout:hover {
    background-color: #d9534f;
    border-color: #d9534f;
    box-shadow: 0 0 10px rgba(217, 83, 79, 0.4);
}

/* -------------------------------------------------------------------------
   Auth Page Layout (Login & Register Cards)
   ------------------------------------------------------------------------- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.auth-wrapper--settings {
    max-width: 500px;
}

.auth-card {
    background-color: rgba(22, 35, 33, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 36px 32px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-header {
    margin-bottom: 24px;
    text-align: center;
}

.auth-title {
    font-family: var(--global--font-family-headings, "Oswald", sans-serif);
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.auth-subtitle {
    font-family: var(--global--font-family-base, "Roboto", sans-serif);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.4;
}

.auth-group {
    margin-bottom: 18px;
}

.auth-label {
    display: block;
    font-family: var(--global--font-family-base, "Roboto", sans-serif);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    background-color: rgba(14, 23, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: var(--global--font-family-base, "Roboto", sans-serif);
    font-size: 0.9375rem;
    color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #a38451;
    box-shadow: 0 0 0 2px rgba(163, 132, 81, 0.25);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.auth-input--readonly {
    background-color: rgba(14, 23, 22, 0.45);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.55);
    cursor: default;
    user-select: none;
}

.auth-input--readonly:focus {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.auth-hint {
    display: block;
    font-family: var(--global--font-family-base, "Roboto", sans-serif);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    line-height: 1.3;
}

.auth-group--checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    margin-bottom: 0;
}

.auth-checkbox {
    accent-color: #a38451;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auth-error {
    display: block;
    font-size: 0.75rem;
    color: #ff6b6b;
    margin-top: 4px;
}

.auth-alert {
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-size: 0.84375rem;
}

.auth-alert--danger {
    background-color: rgba(217, 83, 79, 0.15);
    border: 1px solid rgba(217, 83, 79, 0.4);
    color: #ff8585;
}

.auth-alert--success {
    background-color: rgba(40, 167, 69, 0.18);
    border: 1px solid rgba(40, 167, 69, 0.45);
    color: #75dd8b;
}

.auth-alert ul {
    margin: 0;
    padding-left: 18px;
}

.auth-actions {
    margin-top: 22px;
}

.auth-btn {
    display: block;
    width: 100%;
    padding: 12px 18px;
    text-align: center;
    font-family: var(--global--font-family-headings, "Oswald", sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 4px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.auth-btn--primary {
    background-color: #a38451;
    color: #ffffff !important;
    border-color: #a38451;
}

.auth-btn--primary:hover,
.auth-btn--primary:focus {
    background-color: #bfa068;
    border-color: #bfa068;
    box-shadow: 0 4px 14px rgba(163, 132, 81, 0.35);
}

.auth-btn--secondary {
    background-color: transparent;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.auth-btn--secondary:hover,
.auth-btn--secondary:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-divider span {
    padding: 0 12px;
    font-family: var(--global--font-family-headings, "Oswald", sans-serif);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.auth-register-section {
    text-align: center;
}

.auth-register-text {
    font-size: 0.84375rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}
