/* ==========================================================================
   Community Plugin – Auth Forms
   ========================================================================== */

/* Wrapper */
.community-form-wrap {
    max-width: 440px;
    margin-inline: auto;
}

/* Formular-Karte */
.community-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.community-form__title {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.4em;
    text-align: center;
}

/* Felder */
.community-form__field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1.1rem;
}

.community-form__field label {
    font-size: 0.9em;
    font-weight: 600;
    color: #374151;
}

.community-form__field input[type="text"],
.community-form__field input[type="email"],
.community-form__field input[type="password"] {
    padding: .6rem .85rem;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.community-form__field input:focus {
    border-color: var(--community-primary);
    box-shadow: 0 0 0 3px rgba(90, 156, 156, .2);
}

/* Checkbox-Reihe */
.community-form__field--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: .5rem;
}

.community-form__field--checkbox label {
    font-weight: 400;
    font-size: 0.875em;
    color: #6b7280;
    line-height: 1.4;
}

.community-form__field--checkbox input[type="checkbox"] {
    margin-top: .15rem;
    flex-shrink: 0;
    accent-color: var(--community-primary);
}

/* Link zwischen Login und Registrierung */
.community-form__switch {
    text-align: center;
    font-size: 0.875em;
    color: #6b7280;
    margin-top: 1.25rem;
    margin-bottom: 0;
}

.community-form__switch a {
    color: var(--community-primary);
    text-decoration: none;
    font-weight: 600;
}

.community-form__switch a:hover {
    text-decoration: underline;
}

/* Erfolgs-State nach Registrierung */
.community-form--success {
    text-align: center;
}

.community-form__success-icon {
    font-size: 3em;
    margin-bottom: .5rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.community-btn {
    display: inline-block;
    padding: .65rem 1.5rem;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, opacity .15s;
    text-decoration: none;
    text-align: center;
}

.community-btn--primary {
    background: var(--community-primary);
    color: #fff;
    width: 100%;
    margin-top: .5rem;
}

.community-btn--primary:hover {
    background: var(--community-primary-hover);
}

.community-btn--primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.community-btn--secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.community-btn--secondary:hover {
    background: #e5e7eb;
}

/* ==========================================================================
   Notices
   ========================================================================== */

.community-notice {
    padding: var(--space-4) var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: 0;
    font-size: 0.9em;
    display: none;
}

.community-notice:not([hidden]) {
    display: block;
    margin-bottom: var(--space-4);
}

.community-notice--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.community-notice--success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.community-notice--info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1d4ed8;
}

/* ==========================================================================
   Verifikations-Banner (erscheint nach E-Mail-Bestätigung)
   ========================================================================== */

.community-verified-banner {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: #15803d;
    color: #fff;
    padding: .85rem 1.75rem;
    border-radius: 9px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    z-index: 9999;
    animation: communitySlideIn .3s ease;
}

@keyframes communitySlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==========================================================================
   Logout Confirmation Modal
   ========================================================================== */

.community-logout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    animation: communityFadeIn .2s ease;
}

.community-logout-modal.active {
    display: flex;
}

@keyframes communityFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.community-logout-modal__content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
    animation: communityScaleIn .3s ease;
}

@keyframes communityScaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.community-logout-modal__title {
    margin: 0 0 1rem;
    font-size: 1.25em;
    font-weight: 700;
    color: #111827;
}

.community-logout-modal__text {
    margin: 0 0 1.5rem;
    font-size: 0.95em;
    color: #6b7280;
    line-height: 1.5;
}

.community-logout-modal__buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.community-logout-modal__cancel {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: .6rem 1.5rem;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.community-logout-modal__cancel:hover {
    background: #e5e7eb;
}

.community-logout-modal__confirm {
    background: var(--community-error);
    color: #fff;
    border: none;
    padding: .6rem 1.5rem;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.community-logout-modal__confirm:hover {
    background: var(--community-error-text);
}

.community-logout-modal__confirm:disabled {
    opacity: .6;
    cursor: not-allowed;
}

