:root {
    --bma-blue: #45a9e8;
    --bma-blue-dark: #2e96d5;
    --bma-text: #222;
    --bma-muted: #66717d;
    --bma-border: #e5ebef;
    --bma-bg: #f5f9fc;
}

.bma-shell {
    max-width: 1050px;
    margin: 35px auto 60px;
    color: var(--bma-text);
}

.bma-auth-shell {
    max-width: 760px;
}

.bma-card,
.bma-dashboard-head,
.bma-submit-head {
    box-sizing: border-box;
}

.bma-card {
    background: #fff;
    border: 1px solid var(--bma-border);
    border-radius: 16px;
    padding: 34px;
    box-shadow: 0 8px 30px rgba(0,0,0,.05);
}

.bma-kicker {
    margin-bottom: 8px;
    color: var(--bma-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.bma-shell h1 {
    margin: 0 0 12px;
    font-size: 36px;
    line-height: 1.2;
}

.bma-shell h2 {
    margin: 0;
}

.bma-lead,
.bma-submit-head p,
.bma-dashboard-head p {
    color: var(--bma-muted);
    line-height: 1.7;
}

.bma-form label:not(.bma-check) {
    display: block;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
}

.bma-form input[type="text"],
.bma-form input[type="email"],
.bma-form input[type="password"],
.bma-form input[type="file"],
.bma-form select,
.bma-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 7px;
    padding: 13px 14px;
    border: 1px solid #d8e0e6;
    border-radius: 9px;
    background: #fafcfd;
    font-size: 16px;
    font-family: inherit;
}

.bma-form input:focus,
.bma-form select:focus,
.bma-form textarea:focus {
    outline: none;
    border-color: var(--bma-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(69,169,232,.12);
}

.bma-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.bma-check {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin: 4px 0 22px;
    color: #4d5963;
    line-height: 1.5;
}

.bma-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.bma-btn {
    display: inline-block;
    padding: 13px 22px;
    border: 0;
    border-radius: 7px;
    background: var(--bma-blue);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: .2s ease;
}

.bma-btn:hover {
    background: var(--bma-blue-dark);
    transform: translateY(-1px);
}

.bma-btn-block {
    width: 100%;
    min-height: 54px;
    font-size: 16px;
}

.bma-btn-light {
    background: #eef7fc;
    color: var(--bma-blue-dark) !important;
}

.bma-auth-links,
.bma-actions,
.bma-account-footer,
.bma-card-head,
.bma-dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bma-auth-links {
    margin-top: 18px;
    font-size: 14px;
}

.bma-small {
    margin: 18px 0 0;
    text-align: center;
    color: var(--bma-muted);
}

.bma-alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 9px;
    line-height: 1.5;
}

.bma-alert ul {
    margin: 0;
    padding-left: 20px;
}

.bma-alert-error {
    background: #fff4f4;
    border: 1px solid #efd0d0;
    color: #9a2e2e;
}

.bma-alert-success {
    background: #f0faf3;
    border: 1px solid #c7e6cf;
    color: #2b6d3c;
}

.bma-dashboard-head,
.bma-submit-head {
    margin-bottom: 24px;
    padding: 34px 36px;
    background: var(--bma-bg);
    border-radius: 16px;
}

.bma-submit-head {
    text-align: center;
}

.bma-submit-head p {
    max-width: 700px;
    margin: 0 auto;
}

.bma-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.bma-stats > div {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--bma-border);
    border-radius: 12px;
    text-align: center;
}

.bma-stats strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: var(--bma-blue-dark);
}

.bma-stats span {
    display: block;
    margin-top: 8px;
    color: var(--bma-muted);
    font-size: 13px;
}

.bma-card-head {
    margin-bottom: 20px;
}

.bma-table-wrap {
    overflow-x: auto;
}

.bma-table {
    width: 100%;
    border-collapse: collapse;
}

.bma-table th,
.bma-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf1f4;
    text-align: left;
    vertical-align: middle;
}

.bma-table th {
    color: #53606b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bma-table-action {
    text-align: right !important;
    white-space: nowrap;
    font-size: 13px;
}

.bma-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2f5;
    color: #53606b;
    font-size: 12px;
    font-weight: 700;
}

.bma-status-pending { background: #fff7df; color: #8a6511; }
.bma-status-publish { background: #e9f8ee; color: #2f7a44; }
.bma-status-draft { background: #eef2f5; color: #53606b; }

.bma-empty,
.bma-center {
    text-align: center;
}

.bma-empty {
    padding: 28px 10px;
}

.bma-account-footer {
    margin-top: 18px;
    color: var(--bma-muted);
    font-size: 13px;
}

.bma-help {
    display: block;
    margin-top: 7px;
    color: var(--bma-muted);
    font-size: 12px;
    font-weight: 400;
}

.bma-hp {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.bma-form .wp-editor-wrap {
    margin: 7px 0 20px;
}

.bma-form .wp-editor-container {
    border: 1px solid #d8e0e6;
    border-radius: 9px;
    overflow: hidden;
}

@media (max-width: 767px) {
    .bma-shell {
        margin: 20px 12px 40px;
    }

    .bma-card,
    .bma-dashboard-head,
    .bma-submit-head {
        padding: 24px 18px;
        border-radius: 12px;
    }

    .bma-shell h1 {
        font-size: 28px;
    }

    .bma-grid-2,
    .bma-stats {
        grid-template-columns: 1fr;
    }

    .bma-dashboard-head,
    .bma-auth-links,
    .bma-account-footer,
    .bma-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .bma-dashboard-head .bma-btn,
    .bma-actions .bma-btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .bma-actions {
        flex-direction: column;
    }
}

/* v0.2.0 - account navigation, editing and author profile */
.bma-account-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--bma-border);
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0,0,0,.035);
}

.bma-account-nav a {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #45515c;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.bma-account-nav a:hover,
.bma-account-nav a.is-active {
    background: #eef7fc;
    color: var(--bma-blue-dark);
}

.bma-account-nav .bma-nav-logout {
    margin-left: auto;
    color: #8a4a4a;
}

.bma-profile-avatar img,
.bma-current-avatar img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.bma-current-avatar,
.bma-current-image {
    margin: 0 0 22px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--bma-border);
    border-radius: 10px;
}

.bma-current-avatar strong,
.bma-current-image strong {
    display: block;
    margin-bottom: 12px;
    color: #45515c;
    font-size: 13px;
}

.bma-current-image img {
    display: block;
    max-width: 260px;
    height: auto;
    border-radius: 8px;
}

.bma-form input[readonly] {
    color: #71808c;
    background: #f1f4f6;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .bma-account-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .bma-account-nav a {
        flex: 0 0 auto;
    }

    .bma-account-nav .bma-nav-logout {
        margin-left: 0;
    }

    .bma-profile-avatar {
        margin-top: 10px;
    }
}


/* v0.3.0 - public authors directory and public author profiles */
.bma-public {
    max-width: 1080px;
    margin: 36px auto 60px;
}

.bma-public-hero,
.bma-public-cta {
    padding: 44px 46px;
    background: #f5f9fc;
    border: 1px solid var(--bma-border);
    border-radius: 16px;
    text-align: center;
}

.bma-public-hero {
    margin-bottom: 28px;
}

.bma-public-hero h1,
.bma-author-hero h1 {
    margin: 0 0 12px;
    color: #20262c;
    font-size: 38px;
    line-height: 1.18;
}

.bma-public-hero p,
.bma-public-cta p {
    max-width: 720px;
    margin: 0 auto 22px;
    color: var(--bma-muted);
    font-size: 16px;
    line-height: 1.7;
}

.bma-author-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.bma-author-card {
    padding: 28px 24px;
    background: #fff;
    border: 1px solid var(--bma-border);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 6px 22px rgba(0,0,0,.035);
}

.bma-author-avatar {
    display: inline-block;
    margin-bottom: 14px;
}

.bma-author-avatar img,
.bma-author-hero-avatar img {
    display: block;
    object-fit: cover;
    border-radius: 50%;
    background: #eef7fc;
}

.bma-author-avatar img {
    width: 112px;
    height: 112px;
    border: 4px solid #fff;
    box-shadow: 0 5px 18px rgba(0,0,0,.08);
}

.bma-author-card h2 {
    margin: 0 0 5px;
    font-size: 21px;
}

.bma-author-card h2 a,
.bma-author-post-card h3 a {
    color: #20262c;
    text-decoration: none !important;
}

.bma-author-card p {
    min-height: 66px;
    margin: 13px 0 16px;
    color: var(--bma-muted);
    font-size: 14px;
    line-height: 1.58;
}

.bma-author-count {
    color: var(--bma-blue-dark);
    font-size: 12px;
    font-weight: 700;
}

.bma-text-link {
    color: var(--bma-blue-dark) !important;
    font-weight: 700;
    text-decoration: none !important;
}

.bma-public-cta {
    margin-top: 30px;
}

.bma-public-cta h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.bma-author-hero {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 34px;
    padding: 36px 40px;
    background: #f5f9fc;
    border: 1px solid var(--bma-border);
    border-radius: 16px;
}

.bma-author-hero-avatar {
    flex: 0 0 150px;
}

.bma-author-hero-avatar img {
    width: 150px;
    height: 150px;
    border: 6px solid #fff;
    box-shadow: 0 6px 22px rgba(0,0,0,.09);
}

.bma-author-hero-copy {
    min-width: 0;
}

.bma-author-bio {
    max-width: 760px;
    margin: 0 0 14px;
    color: #5d6973;
    font-size: 16px;
    line-height: 1.7;
}

.bma-author-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #596671;
    font-size: 13px;
    font-weight: 700;
}

.bma-author-meta-row a {
    color: var(--bma-blue-dark);
    text-decoration: none !important;
}

.bma-public-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 18px;
}

.bma-public-section-head h2 {
    margin: 2px 0 0;
    color: #20262c;
    font-size: 27px;
}

.bma-public-section-head > a {
    color: var(--bma-blue-dark);
    font-weight: 700;
    text-decoration: none !important;
}

.bma-author-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.bma-author-post-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bma-border);
    border-radius: 13px;
    box-shadow: 0 5px 18px rgba(0,0,0,.03);
}

.bma-author-post-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #edf3f7;
    text-decoration: none !important;
}

.bma-author-post-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.bma-author-post-card:hover .bma-author-post-image img {
    transform: scale(1.025);
}

.bma-author-post-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #8b99a5;
    font-size: 17px;
    font-weight: 700;
}

.bma-author-post-body {
    padding: 18px 18px 20px;
}

.bma-author-post-cat {
    margin-bottom: 6px;
    color: var(--bma-blue-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.bma-author-post-card h3 {
    margin: 0 0 9px;
    font-size: 19px;
    line-height: 1.35;
}

.bma-author-post-card p {
    margin: 0 0 12px;
    color: var(--bma-muted);
    font-size: 13px;
    line-height: 1.58;
}

.bma-author-post-date {
    color: #8a96a0;
    font-size: 12px;
}

@media (max-width: 900px) {
    .bma-author-grid,
    .bma-author-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .bma-public {
        margin: 20px 12px 42px;
    }

    .bma-public-hero,
    .bma-public-cta {
        padding: 30px 20px;
    }

    .bma-public-hero h1,
    .bma-author-hero h1 {
        font-size: 29px;
    }

    .bma-author-grid,
    .bma-author-post-grid {
        grid-template-columns: 1fr;
    }

    .bma-author-card p {
        min-height: 0;
    }

    .bma-author-hero {
        display: block;
        padding: 28px 22px;
        text-align: center;
    }

    .bma-author-hero-avatar {
        margin: 0 auto 18px;
    }

    .bma-author-hero-avatar img {
        margin: 0 auto;
        width: 126px;
        height: 126px;
    }

    .bma-author-meta-row {
        justify-content: center;
    }

    .bma-public-section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Core WordPress login form used by BMA v0.3.1 */
.bma-core-login p {
    margin: 0 0 20px;
}

.bma-core-login label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #333;
}

.bma-core-login input[type="text"],
.bma-core-login input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    margin-top: 7px;
    padding: 13px 14px;
    border: 1px solid #d8e0e6;
    border-radius: 9px;
    background: #fafcfd;
    font-size: 16px;
    font-family: inherit;
}

.bma-core-login input[type="text"]:focus,
.bma-core-login input[type="password"]:focus {
    outline: none;
    border-color: var(--bma-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(69,169,232,.12);
}

.bma-core-login .login-remember label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 400;
    color: #4d5963;
}

.bma-core-login .login-remember input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.bma-core-login .login-submit {
    margin-bottom: 0;
}

.bma-core-login input[type="submit"] {
    width: 100%;
    min-height: 54px;
    padding: 13px 22px;
    border: 0;
    border-radius: 7px;
    background: var(--bma-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.bma-core-login input[type="submit"]:hover {
    background: var(--bma-blue-dark);
}

/* Security widgets */
.bma-turnstile {
    margin: 16px 0 4px;
}

/* =========================================================
   Article footer: author profile + submission CTA (v0.3.5)
========================================================= */
.bma-article-author-box {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 36px 0 18px;
    padding: 24px 26px;
    background: #fff;
    border: 1px solid var(--bma-border);
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(0,0,0,.04);
}

.bma-article-author-avatar {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bma-bg);
}

.bma-article-author-avatar img {
    display: block;
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 50%;
}

.bma-article-author-copy {
    min-width: 0;
    flex: 1;
}

.bma-article-author-kicker {
    margin-bottom: 5px;
    color: var(--bma-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.bma-article-author-copy h3 {
    margin: 0 0 7px !important;
    font-size: 21px;
    line-height: 1.3;
}

.bma-article-author-copy h3 a {
    color: var(--bma-text);
    text-decoration: none;
}

.bma-article-author-copy h3 a:hover {
    color: var(--bma-blue);
}

.bma-article-author-copy p {
    margin: 0 0 10px !important;
    color: var(--bma-muted);
    font-size: 14px;
    line-height: 1.65;
}

.bma-article-author-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    font-size: 13px;
}

.bma-article-author-meta span {
    color: #59636c;
    font-weight: 600;
}

.bma-article-author-meta a {
    color: var(--bma-blue);
    font-weight: 700;
    text-decoration: none;
}

/* Fallback styling for the CTA, so Custom CSS is no longer required. */
.bma-article-submit-cta,
.beo-article-author-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 18px 0 30px;
    padding: 28px 30px;
    background: var(--bma-bg);
    border: 1px solid #e3edf4;
    border-left: 5px solid var(--bma-blue);
    border-radius: 8px;
}

.beo-article-author-cta-text {
    flex: 1;
}

.beo-article-author-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--bma-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.beo-article-author-cta h3 {
    margin: 0 0 9px !important;
    color: var(--bma-text);
    font-size: 21px;
    line-height: 1.35;
}

.beo-article-author-cta p {
    margin: 0 0 12px !important;
    color: var(--bma-muted);
    font-size: 14px;
    line-height: 1.65;
}

.beo-article-author-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #444;
    font-size: 12px;
    font-weight: 600;
}

.beo-article-author-action a {
    display: inline-block;
    padding: 13px 21px;
    background: var(--bma-blue);
    color: #fff !important;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: .2s ease;
}

.beo-article-author-action a:hover {
    background: var(--bma-blue-dark);
    color: #fff !important;
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .bma-article-author-box {
        display: block;
        padding: 22px 20px;
        text-align: center;
    }

    .bma-article-author-avatar {
        display: block;
        margin: 0 auto 15px;
    }

    .bma-article-author-meta {
        justify-content: center;
    }

    .bma-article-submit-cta,
    .beo-article-author-cta {
        display: block;
        margin: 18px 0 25px;
        padding: 23px 20px;
    }

    .beo-article-author-cta h3 {
        font-size: 19px;
    }

    .beo-article-author-benefits {
        display: block;
        line-height: 1.9;
    }

    .beo-article-author-benefits span {
        display: block;
    }

    .beo-article-author-action {
        margin-top: 18px;
    }

    .beo-article-author-action a {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}
