/* =========================================================
   Access Form – Theme-kompatible Version
   ========================================================= */

/* ---------- Root / Variablen (nur Struktur, keine festen Farben) ---------- */

:root {
    --access-radius: 10px;
    --access-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* ---------- Wrapper ---------- */

.access-form-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: inherit; /* Theme bestimmt Hintergrund */
}

/* ---------- Form Container ---------- */

.access-form {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    text-align: center;
}

/* ---------- Headings ---------- */

.access-form__title {
    font-size: 1.6rem;
    font-weight: 600;
    color: inherit;
    margin-bottom: 0.5rem;
}

.access-form__description {
    font-size: 0.95rem;
    opacity: 0.7; /* statt fester Grau-Farbe */
    margin-bottom: 2rem;
}

/* ---------- Input ---------- */

.access-form input[type="text"] {
    width: 100%;
}

.access-form input[type="text"]::placeholder {
    opacity: 0.5;
}

.access-form input[type="text"]:focus {
    outline: none;
}

/* ---------- Button ---------- */

.access-form button {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.access-form button:hover {
    opacity: 0.85;
}

.access-form button:active {
    transform: translateY(1px);
}

.access-form button:focus {
    outline: none;
}

/* ---------- Loading State ---------- */

.access-form button.is-loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.access-form button.is-loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    animation: access-spin 0.8s linear infinite;
    border-top:1px solid #fff;
}

@keyframes access-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Messages ---------- */

.access-form__message {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Erfolg / Fehler nur Akzent über currentColor */

.access-form__message--success {
    color: inherit;
    border-left: 4px solid currentColor;
    padding-left: 8px;
}

.access-form__message--error {
    color: inherit;
    border-left: 4px solid currentColor;
    padding-left: 8px;
}

/* ---------- Auto Redirect Hint ---------- */

.access-form__redirect-info {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {

    .access-form {
        padding: 2rem 1.5rem;
    }

    .access-form__title {
        font-size: 1.4rem;
    }
}