/* ================================================================
   Bear Memberships – frontend.css
   Estilos para shortcodes: [bm_access_message], [bm_member_info],
   [bm_plans_table]
   ================================================================ */

/* ── Access Denied Message ─────────────────────────────────────── */
.bm-access-denied {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fef2f2, #fff0f8);
    border: 1.5px solid #fca5a5;
    border-radius: 12px;
    padding: 16px 22px;
    font-size: 15px;
    font-weight: 500;
    color: #991b1b;
    margin: 16px 0;
}
.bm-denied-icon { font-size: 22px; flex-shrink: 0; }

/* ── Member Card ───────────────────────────────────────────────── */
.bm-member-card {
    border: 3px solid #6366f1;
    border-radius: 16px;
    overflow: hidden;
    max-width: 360px;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    margin: 16px 0;
}
.bm-member-card.bm-no-member {
    background: #f8faff;
    border-color: #c7d2fe;
    padding: 18px 22px;
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

.bm-member-card-header {
    background: #6366f1;
    padding: 18px 22px;
    color: #fff;
}
.bm-member-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: .82;
    margin-bottom: 4px;
}
.bm-member-plan {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.bm-member-card-body {
    background: #fff;
    padding: 18px 22px;
}
.bm-member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #374151;
}
.bm-member-row:last-of-type { border-bottom: none; }
.bm-member-row span { color: #64748b; }
.bm-member-row strong { font-weight: 600; color: #1e1e2e; }

.bm-member-perk {
    background: #f0f9ff;
    border-left: 3px solid #6366f1;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #1e40af;
    margin-top: 10px;
}

/* ── Plans Table / Public Grid ─────────────────────────────────── */
.bm-plans-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.bm-public-plan-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    transition: transform .22s, box-shadow .22s;
    position: relative;
}
.bm-public-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,.13);
}
.bm-public-plan-card.bm-current-plan {
    border-color: transparent;
    box-shadow: 0 0 0 3px #6366f1, 0 8px 24px rgba(99,102,241,.2);
}

.bm-current-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(255,255,255,.92);
    color: #4338ca;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.bm-public-plan-top {
    background: #6366f1;
    color: #fff;
    padding: 28px 22px 22px;
    text-align: center;
}
.bm-public-plan-top h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.bm-public-price {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}
.bm-public-duration {
    font-size: 13px;
    opacity: .82;
    font-weight: 500;
}

.bm-public-plan-body {
    padding: 20px 22px 24px;
}
.bm-public-plan-body > p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.55;
}

.bm-public-features {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
.bm-public-features li {
    font-size: 14px;
    color: #374151;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bm-public-features li:last-child { border-bottom: none; }

.bm-public-btn {
    display: block;
    text-align: center;
    background: #6366f1;
    color: #fff !important;
    text-decoration: none;
    padding: 13px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    transition: opacity .18s, transform .18s;
    margin-top: 4px;
}
.bm-public-btn:hover { opacity: .88; transform: translateY(-1px); }

.bm-public-active-label {
    display: block;
    text-align: center;
    color: #16a34a;
    font-weight: 700;
    font-size: 15px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 10px;
    margin-top: 4px;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bm-plans-public-grid { grid-template-columns: 1fr; }
    .bm-member-card { max-width: 100%; }
}

/* ── Group Login Shortcode ─────────────────────────────────────── */
.bm-group-login {
    margin: 24px 0;
}
.bm-gl-inner {
    background: linear-gradient(135deg, #f8faff 0%, #eff0ff 100%);
    border: 2px solid #c7d2fe;
    border-radius: 18px;
    padding: 36px 32px;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}
.bm-gl-icon {
    font-size: 44px;
    margin-bottom: 14px;
    display: block;
}
.bm-gl-title {
    font-size: 20px;
    font-weight: 700;
    color: #000046;
    margin: 0 0 8px;
}
.bm-gl-sub {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
}
.bm-gl-sub a { color: #6366f1; text-decoration: none; font-weight: 600; }
.bm-gl-sub a:hover { text-decoration: underline; }

.bm-gl-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.bm-gl-input {
    flex: 1;
    min-width: 180px;
    max-width: 260px;
    padding: 12px 16px;
    border: 2px solid #c7d2fe;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    letter-spacing: 2px;
    font-weight: 600;
    text-align: center;
    color: #000046;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    text-transform: uppercase;
}
.bm-gl-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}
.bm-gl-input::placeholder { letter-spacing: 1px; color: #c7d2fe; font-size: 14px; }
.bm-gl-input:disabled { background: #f8faff; color: #64748b; }

.bm-gl-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #6366f1, #000046);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .18s, transform .18s;
    white-space: nowrap;
}
.bm-gl-btn:hover   { opacity: .88; transform: translateY(-1px); }
.bm-gl-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.bm-gl-msg {
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}
.bm-gl-success {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #15803d;
}
.bm-gl-error {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #b91c1c;
}

@media (max-width: 480px) {
    .bm-gl-inner  { padding: 28px 20px; }
    .bm-gl-form   { flex-direction: column; align-items: stretch; }
    .bm-gl-input  { max-width: 100%; }
}

/* ── Concurrent Limit Message ──────────────────────────────────── */
.bm-concurrent-limit {
    background: linear-gradient(135deg, #fff7ed, #fef9c3);
    border-color: #fbbf24;
    color: #92400e;
}
.bm-concurrent-limit .bm-denied-icon { font-size: 22px; flex-shrink: 0; }

/* ── Login / Registro [bm_login] [bm_register] ─────────────────── */
.bm-auth-card {
    background: linear-gradient(135deg, #f8faff 0%, #eff0ff 100%);
    border: 2px solid #c7d2fe;
    border-radius: 18px;
    padding: 32px 30px;
    max-width: 380px;
    margin: 24px auto;
}
.bm-auth-title {
    font-size: 20px;
    font-weight: 700;
    color: #000046;
    margin: 0 0 20px;
    text-align: center;
}
.bm-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bm-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bm-auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.bm-auth-field input {
    padding: 12px 14px;
    border: 2px solid #c7d2fe;
    border-radius: 10px;
    font-size: 14px;
    color: #000046;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}
.bm-auth-field input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}
.bm-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
}
.bm-auth-btn {
    margin-top: 6px;
    padding: 13px 20px;
    background: linear-gradient(135deg, #6366f1, #000046);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .18s, transform .18s;
}
.bm-auth-btn:hover { opacity: .88; transform: translateY(-1px); }
.bm-auth-error {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #b91c1c;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}
.bm-auth-lostpw {
    text-align: center;
    margin: 16px 0 0;
    font-size: 13px;
}
.bm-auth-lostpw a,
.bm-auth-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}
.bm-auth-lostpw a:hover,
.bm-auth-link:hover { text-decoration: underline; }
.bm-auth-already {
    text-align: center;
    font-size: 14px;
    color: #374151;
}
.bm-auth-already p { margin: 0 0 10px; }

@media (max-width: 480px) {
    .bm-auth-card { padding: 26px 20px; }
}

/* ── Account Dashboard [bm_account] ────────────────────────────── */
.bm-account {
    max-width: 980px;
    margin: 24px auto;
}
.bm-account-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #6366f1, #000046);
    border-radius: 16px;
    padding: 22px 26px;
    color: #fff;
    margin-bottom: 24px;
}
.bm-account-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
}
.bm-account-who {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.bm-account-who strong { font-size: 17px; }
.bm-account-who span { font-size: 13px; opacity: .82; }
.bm-account-logout {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid rgba(255,255,255,.5);
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background .15s ease;
}
.bm-account-logout:hover { background: rgba(255,255,255,.12); color: #fff; }

.bm-account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 780px) {
    .bm-account-grid { grid-template-columns: 1fr; }
}

.bm-account-section {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 20px;
}
.bm-account-section h4 {
    margin: 0 0 16px;
    padding-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #000046;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 2px solid #6366f1;
}
.bm-account-empty {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.bm-account-history {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.bm-account-history th {
    text-align: left;
    color: #94a3b8;
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 2px solid #f1f5f9;
}
.bm-account-history td {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.bm-download-bar-wrap {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}
.bm-download-bar {
    height: 10px;
    background: #eef0fb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}
.bm-download-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #000046);
    border-radius: 6px;
    transition: width .3s ease;
}
.bm-download-bar-label {
    font-size: 12px;
    color: #64748b;
}

.bm-auth-success {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #15803d;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* ── Accesos rápidos [bm_quick_links] / dentro de [bm_account] ─────────── */
.bm-account-section-full {
    max-width: 980px;
    margin: 0 auto 20px;
}

.bm-quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.bm-quicklink {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: #f8faff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 12px;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.bm-quicklink:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px -12px rgba(99,102,241,.35);
    border-color: #c7d2fe;
}

.bm-quicklink-icon {
    font-size: 26px;
}

.bm-quicklink-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #000046;
    line-height: 1.3;
}

.bm-quicklink-shop {
    background: linear-gradient(135deg, #6366f1, #000046);
    border-color: transparent;
}

.bm-quicklink-shop .bm-quicklink-label {
    color: #fff;
}
