/* MBB Accounts — frontend styling */

/* ---------- Account chooser ---------- */
.mbb-chooser {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.mbb-chooser__header { text-align: center; margin-bottom: 36px; }
.mbb-chooser__header h2 { font-size: 28px; margin: 0 0 8px; color: #0f172a; }
.mbb-chooser__header p { font-size: 16px; color: #64748b; margin: 0; }

.mbb-chooser__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mbb-card {
    display: block;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px 26px;
    text-align: center;
    text-decoration: none;
    color: #0f172a;
    transition: all .2s ease;
}
.mbb-card:hover {
    border-color: #0f4c81;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(15, 76, 129, .18);
}
.mbb-card__icon { font-size: 44px; margin-bottom: 14px; line-height: 1; }
.mbb-card h3 { font-size: 19px; margin: 0 0 10px; color: #0f172a; }
.mbb-card p { font-size: 14px; color: #64748b; margin: 0 0 18px; line-height: 1.55; }
.mbb-card__cta { display: inline-block; color: #0f4c81; font-weight: 600; font-size: 14px; }

/* "Both" variant — accent it as the most powerful option */
.mbb-card--both {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-color: #fde68a;
    position: relative;
}
.mbb-card--both:hover {
    border-color: #d97706;
    box-shadow: 0 12px 24px -8px rgba(217, 119, 6, .25);
}
.mbb-card--both .mbb-card__cta { color: #b45309; }
.mbb-card--both p em { font-style: italic; color: #92400e; font-weight: 600; }

.mbb-chooser__login { text-align: center; font-size: 14px; color: #64748b; margin: 0; }
.mbb-chooser__login a { color: #0f4c81; font-weight: 600; }

/* ---------- Empty-state notice on dashboard ---------- */
.mbb-setup-notice {
    max-width: 520px;
    margin: 40px auto;
    padding: 36px 28px;
    text-align: center;
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.mbb-setup-notice__icon { font-size: 48px; line-height: 1; margin-bottom: 14px; }
.mbb-setup-notice h3 { margin: 0 0 8px; font-size: 22px; color: #0f172a; }
.mbb-setup-notice p { margin: 0 0 22px; color: #64748b; font-size: 15px; }
.mbb-setup-notice__btn {
    display: inline-block;
    padding: 11px 22px;
    background: #0f4c81;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background .15s ease;
}
.mbb-setup-notice__btn:hover { background: #1a6fba; color: #fff; }

/* ---------- Account settings (opt-in expansion) ---------- */
.mbb-account-settings {
    max-width: 640px;
    margin: 24px 0;
    font-family: inherit;
}
.mbb-account-settings h3 { margin: 0 0 6px; font-size: 20px; color: #0f172a; }
.mbb-account-settings .mbb-help {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 20px;
}

.mbb-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.mbb-type-row.is-active { border-color: #bae6fd; background: #f0f9ff; }
.mbb-type-row__body strong { display: block; margin-bottom: 4px; font-size: 15px; }
.mbb-type-row__body p { margin: 0; color: #64748b; font-size: 13px; }

.mbb-expand-btn {
    background: #0f4c81;
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.mbb-expand-btn:hover { background: #1a6fba; }
.mbb-expand-btn:disabled { opacity: .6; cursor: wait; }

.mbb-badge {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.mbb-badge--active { background: #dcfce7; color: #166534; }

.mbb-msg {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}
.mbb-msg--ok  { background: #dcfce7; color: #166534; display: block; }
.mbb-msg--err { background: #fee2e2; color: #991b1b; display: block; }

/* ---------- Card-based account expansion ([mbb_account_settings_cards]) ---------- */
/* Designed to sit alongside other dashboard cards (Find Venues / My Favorites / etc) */
.mbb-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.mbb-cards__card {
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 26px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: transform .15s ease, box-shadow .15s ease;
}
.mbb-cards__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08), 0 8px 20px rgba(15, 23, 42, 0.06);
}

.mbb-cards__icon {
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1;
}

.mbb-cards__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #2d2d2d;
    line-height: 1.2;
}

.mbb-cards__desc {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #5a5a5a;
    flex-grow: 1;
}

.mbb-cards__btn {
    display: inline-block;
    padding: 10px 22px;
    background: #f7c08a;
    color: #8a3a1a;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease;
    font-family: inherit;
}
.mbb-cards__btn:hover {
    background: #f4ad6a;
    color: #6b2a10;
}
.mbb-cards__btn:active { transform: translateY(1px); }
.mbb-cards__btn:disabled { opacity: .65; cursor: wait; }

.mbb-cards__btn--alt {
    background: #b8e6e0;
    color: #1a5a52;
}
.mbb-cards__btn--alt:hover {
    background: #9eddd5;
    color: #134640;
}

.mbb-cards__card--complete {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.mbb-cards__card--complete .mbb-cards__title { color: #166534; }
.mbb-cards__card--complete .mbb-cards__desc { color: #15803d; }

.mbb-cards__msg {
    grid-column: 1 / -1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}
.mbb-cards__msg--ok  { background: #dcfce7; color: #166534; display: block; }
.mbb-cards__msg--err { background: #fee2e2; color: #991b1b; display: block; }

@media (max-width: 600px) {
    .mbb-cards { grid-template-columns: 1fr; gap: 16px; }
    .mbb-cards__card { padding: 22px 20px; }
}

/* ---------- Account menu items (Log In / My Account / Log Out) ----------
 * The plugin injects these via the `#mbb-account` sentinel in the nav menu.
 * We want them visible ONLY in the mobile hamburger, since on desktop the
 * [mbb_header_account_link] shortcode handles the header-right placement.
 *
 * Breakpoint 1024px matches Elementor's default mobile/tablet threshold.
 * If the site's mobile breakpoint differs, change the value below.
 *
 * Override hook: bump the breakpoint or selector from your theme stylesheet
 * if needed; these are baked into the plugin so the menu item works out of
 * the box without extra Elementor Custom CSS.
 */
.menu-item.mbb-menu-login,
.menu-item.mbb-menu-account,
.menu-item.mbb-menu-logout {
    display: none;
}
@media (max-width: 1024px) {
    .menu-item.mbb-menu-login,
    .menu-item.mbb-menu-account,
    .menu-item.mbb-menu-logout {
        display: list-item;
    }
}

/* ---------- Mobile Dashboard menu item (M4 client feedback, v1.5.24) ----
 * The site admin adds a manual Custom Link in the WP menu with the CSS class
 * `mbb-menu-dashboard` pointing to /dashboard/. We want it to behave like
 * the other mbb-menu-* items:
 *   - Hidden on desktop (the Work With Us → Dashboard sub-item handles it
 *     for logged-in desktop users)
 *   - Visible on mobile, BUT only when the user is logged in (guests should
 *     not see a "Dashboard" link in the hamburger menu, since they can't
 *     access it without logging in first)
 *
 * WordPress automatically adds the `logged-in` body class for authenticated
 * users, so we gate the mobile show-rule on that class. !important is added
 * because some themes (and Elementor's nav menu styles) set `display: block`
 * on `.menu-item` at a higher specificity than ours; without it the rule is
 * overridden and the item stays visible to guests.
 */
.menu-item.mbb-menu-dashboard {
    display: none !important;
}
@media (max-width: 1024px) {
    body.logged-in .menu-item.mbb-menu-dashboard {
        display: list-item !important;
    }
}
