/* ==========================================================================
   The Nest — Login Page Styles
   Component styles for use within the main site layout (main/base)
   ========================================================================== */

:root {
    --nest-lilac: #c9a8e8;
    --nest-rose: #e8a8b8;
    --nest-mint: #a8e8c8;
    --nest-buttercup: #e8d8a8;
    --nest-text: #e0d8e8;
    --nest-text-dim: #a098b0;
    --nest-glow: rgba(201, 168, 232, 0.12);
    --nest-border: rgba(201, 168, 232, 0.12);
}

/* --- Container --- */
.nest-realm {
    position: relative;
    padding: 1rem 0 2rem;
}

.nest-interior {
    max-inline-size: 100%;
}

/* --- Typography --- */
.nest-heading {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
    font-size: 1.35rem;
    font-weight: normal;
    color: var(--nest-text);
    margin-block-end: 0.75rem;
}

.nest-intro {
    color: var(--nest-text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    margin-block-end: 1.5rem;
}

.nest-welcome {
    margin-block-end: 1rem;
    text-align: center;
}

/* --- Form --- */
.nest-form {
    background:
        radial-gradient(
            ellipse 80% 60% at 50% 40%,
            rgba(201, 168, 232, 0.04) 0%,
            transparent 100%
        ),
        rgba(0, 0, 0, 0.25);
    border: 1px solid var(--nest-border);
    border-radius: 8px;
    padding: 1.5rem;
    max-inline-size: 24rem;
    margin-inline: auto;
}

.nest-field {
    margin-block-end: 1rem;
}

.nest-field label {
    display: block;
    font-size: 0.85rem;
    color: var(--nest-text-dim);
    margin-block-end: 0.3rem;
    letter-spacing: 0.02em;
}

.nest-field input {
    display: block;
    inline-size: 100%;
    padding: 0.55rem 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--nest-border);
    border-radius: 4px;
    color: var(--nest-text);
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nest-field input:focus {
    outline: none;
    border-color: rgba(201, 168, 232, 0.4);
    box-shadow: 0 0 0 2px rgba(201, 168, 232, 0.1);
}

.nest-field input::placeholder {
    color: rgba(160, 152, 176, 0.5);
}

.nest-field--invite input {
    border-color: rgba(232, 216, 168, 0.2);
    letter-spacing: 0.06em;
}

.nest-field--invite input:focus {
    border-color: rgba(232, 216, 168, 0.4);
    box-shadow: 0 0 0 2px rgba(232, 216, 168, 0.1);
}

/* --- Error States --- */
.nest-error-message {
    font-size: 0.85rem;
    color: var(--nest-rose);
    min-block-size: 0;
    overflow: hidden;
    transition: min-block-size 0.2s, padding 0.2s, opacity 0.2s;
    opacity: 0;
}

.nest-error-message.visible {
    min-block-size: 1.2em;
    padding-block: 0.4rem;
    opacity: 1;
}

.nest-error {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--nest-text-dim);
}

.nest-error p {
    margin-block-end: 1rem;
}

/* --- Loading --- */
.nest-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 1rem;
}

.nest-loading p {
    color: var(--nest-text-dim);
    font-size: 0.9rem;
    font-style: italic;
}

.nest-loading-glow {
    inline-size: 36px;
    block-size: 36px;
    border-radius: 50%;
    background: radial-gradient(circle,
        var(--nest-lilac) 0%,
        rgba(201, 168, 232, 0.3) 40%,
        transparent 70%
    );
    animation: nest-pulse 2s ease-in-out infinite;
}

@keyframes nest-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50%      { opacity: 0.8; transform: scale(1.1); }
}

/* --- Buttons --- */
.nest-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: var(--nest-glow);
    border: 1px solid var(--nest-border);
    border-radius: 6px;
    color: var(--nest-text);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nest-btn:hover {
    background: rgba(201, 168, 232, 0.18);
    border-color: rgba(201, 168, 232, 0.3);
    box-shadow: 0 0 12px rgba(201, 168, 232, 0.1);
}

.nest-btn:active {
    background: rgba(201, 168, 232, 0.24);
}

.nest-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nest-form .nest-btn {
    inline-size: 100%;
    margin-block-start: 0.25rem;
}

/* --- Toggle Link --- */
.nest-toggle {
    text-align: center;
    font-size: 0.82rem;
    color: var(--nest-text-dim);
    margin-block-start: 1rem;
}

.nest-toggle a {
    color: var(--nest-lilac);
    text-decoration: none;
    border-block-end: 1px solid transparent;
    transition: border-color 0.2s;
}

.nest-toggle a:hover {
    border-block-end-color: rgba(201, 168, 232, 0.4);
}