/* WordPress Private Access — Frontend Styles */

/* Forms */
.wpa-form {
    max-width: var(--wpa-form-width, 420px);
    margin: 40px auto;
    padding: 30px;
    background: var(--wpa-form-bg, #fff);
    color: var(--wpa-form-text, #1d2327);
    border: 1px solid var(--wpa-form-border, #ddd);
    border-radius: var(--wpa-form-radius, 6px);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.wpa-form h2 {
    margin: 0 0 20px;
    font-size: 22px;
    text-align: center;
    color: var(--wpa-form-text, #1d2327);
}
.wpa-form p {
    color: var(--wpa-form-text, #1d2327);
}
.wpa-field {
    margin-bottom: 16px;
}
.wpa-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
}
.wpa-field input[type="text"],
.wpa-field input[type="email"],
.wpa-field input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color .15s;
}
.wpa-field input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}
.wpa-field small {
    display: block;
    margin-top: 4px;
    color: #646970;
    font-size: 12px;
}
.wpa-field-checkbox label {
    display: inline;
    font-weight: 400;
}

/* Button — uses CSS custom properties for admin colour overrides */
.wpa-button {
    display: inline-block;
    width: 100%;
    padding: 10px 16px;
    background: var(--wpa-btn-bg, #2271b1);
    color: var(--wpa-btn-color, #fff);
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .15s, filter .15s;
}
.wpa-button:hover {
    filter: brightness(0.85);
    color: var(--wpa-btn-color, #fff);
}

/* Notices */
.wpa-notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}
.wpa-notice-error {
    background: #fce4e4;
    color: #8b1a1a;
    border: 1px solid #f5c6c6;
}
.wpa-notice-success {
    background: #e6f9ec;
    color: #1e7a3d;
    border: 1px solid #b8e6c8;
}
.wpa-notice-info {
    background: #e8f0fe;
    color: #1a4d8f;
    border: 1px solid #c1d9f5;
}
.wpa-notice ul {
    margin: 0;
    padding-left: 18px;
}

/* Form links */
.wpa-form-links {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}
.wpa-form-links a {
    color: var(--wpa-link-color, #2271b1);
    text-decoration: none;
}
.wpa-form-links a:hover {
    text-decoration: underline;
}

/* Standalone pages (access-denied, pending-approval) */
.wpa-standalone-page {
    background: #f0f0f1;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.wpa-standalone-wrap {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}
.wpa-card-centered {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.wpa-card-centered h1 {
    margin-top: 0;
    font-size: 24px;
}
.wpa-card-centered a {
    color: #2271b1;
    text-decoration: none;
}
.wpa-card-centered a:hover {
    text-decoration: underline;
}

/* Choice cards (grant type 'both') */
.wpa-choice-form {
    max-width: 500px;
}
.wpa-choice-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.wpa-choice-card {
    display: block;
    cursor: pointer;
    border: 2px solid var(--wpa-form-border, #ddd);
    border-radius: var(--wpa-form-radius, 6px);
    padding: 16px;
    transition: border-color .15s, box-shadow .15s;
}
.wpa-choice-card:hover {
    border-color: var(--wpa-btn-bg, #2271b1);
}
.wpa-choice-card input[type="radio"] {
    display: none;
}
.wpa-choice-card input[type="radio"]:checked ~ .wpa-choice-card-inner {
    color: var(--wpa-form-text, #1d2327);
}
.wpa-choice-card:has(input:checked) {
    border-color: var(--wpa-btn-bg, #2271b1);
    box-shadow: 0 0 0 1px var(--wpa-btn-bg, #2271b1);
    background: #f0f7ff;
}
.wpa-choice-card-inner strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--wpa-form-text, #1d2327);
}
.wpa-choice-card-inner span {
    font-size: 13px;
    color: var(--wpa-form-text, #646970);
    opacity: .75;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .wpa-form {
        margin: 20px 10px;
        padding: 20px;
    }
    .wpa-choice-form {
        max-width: 100%;
    }
    .wpa-auth-tabs {
        flex-direction: column;
    }
}

/* ============================================================
   Combined Auth Form (tabbed login + invite)
   ============================================================ */
.wpa-auth-form {
    max-width: var(--wpa-form-width, 440px);
    margin: 40px auto;
    background: var(--wpa-form-bg, #fff);
    color: var(--wpa-form-text, #1d2327);
    border: 1px solid var(--wpa-form-border, #ddd);
    border-radius: var(--wpa-form-radius, 8px);
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
}

/* Tabs bar */
.wpa-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e5e5e5;
    background: #fafafa;
}
.wpa-auth-tab {
    flex: 1;
    padding: 14px 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #646970;
    cursor: pointer;
    position: relative;
    transition: color .15s, background .15s;
    text-align: center;
    line-height: 1.4;
}
.wpa-auth-tab:hover {
    color: #1d2327;
    background: #f0f0f1;
}
.wpa-auth-tab--active {
    color: var(--wpa-form-text, #1d2327);
    background: var(--wpa-form-bg, #fff);
}
.wpa-auth-tab--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--wpa-btn-bg, #2271b1);
}

/* Logo / heading / subheading above tabs */
.wpa-auth-logo {
    text-align: center;
    padding: 24px 24px 0;
}
.wpa-auth-logo img {
    max-height: 60px;
    width: auto;
}
.wpa-auth-heading {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    padding: 16px 24px 0;
    color: var(--wpa-form-text, #1d2327);
}
.wpa-auth-subheading {
    text-align: center;
    font-size: 14px;
    color: var(--wpa-form-text, #646970);
    opacity: .75;
    padding: 4px 24px 8px;
}

/* Panels */
.wpa-auth-panel {
    display: none;
    padding: 28px 28px 24px;
}
.wpa-auth-panel--active {
    display: block;
}

/* Inherit form field styles from .wpa-form */
.wpa-auth-panel .wpa-field,
.wpa-auth-panel .wpa-button,
.wpa-auth-panel .wpa-notice,
.wpa-auth-panel .wpa-form-links,
.wpa-auth-panel .wpa-field-checkbox {
    /* Inherited from existing .wpa-field / .wpa-button etc. */
}
.wpa-auth-panel .wpa-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
    color: var(--wpa-form-text, inherit);
}
.wpa-auth-panel .wpa-field input[type="text"],
.wpa-auth-panel .wpa-field input[type="email"],
.wpa-auth-panel .wpa-field input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color .15s;
}
.wpa-auth-panel .wpa-field input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}
.wpa-auth-panel .wpa-field-checkbox label {
    display: inline;
    font-weight: 400;
}
.wpa-auth-panel .wpa-field {
    margin-bottom: 16px;
}
.wpa-auth-panel .wpa-form-links {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}
.wpa-auth-panel .wpa-form-links a {
    color: var(--wpa-link-color, #2271b1);
    text-decoration: none;
}
.wpa-auth-panel .wpa-form-links a:hover {
    text-decoration: underline;
}
