/**
 * Theme Name: SaasLauncher Child – Afritivity (Clean)
 * Purpose: Unified, conflict-free layout for PMPro, Dashboard & Bio
 * Updated: Added rental plugin matching styles for dashboard
 */

/* =========================================================
   LAYER 1 — DESIGN TOKENS
   ========================================================= */
:root{
  --af-black:#000;
  --af-dark:#111;
  --af-mid:#222;
  --af-light:#fff;
  --af-gray:#ccc;
  --af-yellow:#ffcc00;
  --af-blue:#006CA8;
  --af-blue-dark:#005888;

  --af-radius:16px;
  --af-shadow-sm:0 2px 8px rgba(0,0,0,.08);
  --af-shadow-md:0 4px 18px rgba(0,0,0,.16);

  --af-sans: system-ui,-apple-system,"Segoe UI",Roboto,Arial;
  
  /* Rental Plugin Colors */
  --afr-bg: #1a1a2e;
  --afr-border: rgba(255,255,255,0.1);
  --afr-text: #fff;
  --afr-text-muted: #e0e0e0;
  --afr-primary: #2196F3;
  --afr-primary-dark: #1976D2;
  --afr-success: #28a745;
  --afr-warning: #FFC107;
  --afr-danger: #dc3545;
}

/* =========================================================
   LAYER 2 — GLOBAL THEME
   ========================================================= */
html,body{
  margin:0;
  padding:0;
  font-family:var(--af-sans);
}

body[data-theme="light"]{
  --af-bg:#fff;
  --af-card:#f8f8f8;
  --af-text:#000;
}

body[data-theme="dark"],
body:not([data-theme="light"]){
  --af-bg:#000;
  --af-card:#111;
  --af-text:#fff;
}

body{
  background:var(--af-bg);
  color:var(--af-text);
}

/* =========================================================
   LAYER 3 — PAGE CONTAINERS (CRITICAL FIX)
   ========================================================= */
.entry-content{
  max-width:1100px;
  margin:0 auto;
  padding:0 24px;
  box-sizing:border-box;
}

/* Only dashboard-style pages go full-width */
body.page-my-dashboard .entry-content,
body.page-members-account .entry-content{
  max-width:none;
  padding:0;
}

/* =========================================================
   LAYER 4 — PMPRO CORE WRAPPER (CENTERED)
   ========================================================= */
.pmpro-dashboard-wrapper,
#pmpro_account{
  max-width:900px;
  margin:0 auto;
  padding:24px;
  width:100%;
  box-sizing:border-box;
}

/* =========================================================
   LAYER 5 — CARDS (PMPro + Dashboard + Bio)
   ========================================================= */
.pmpro-dashboard-block,
.pmpro_account,
.pmpro_account_loggedin,
.pmpro_member_profile_edit_wrap,
.pmpro_account_profile,
.af-box{
  background:var(--af-card);
  border-radius:var(--af-radius);
  padding:28px 30px;
  margin-bottom:28px;
  box-shadow:var(--af-shadow-md);
  border:1px solid rgba(255,255,255,.08);
  color:var(--af-text);
}

/* =========================================================
   LAYER 6 — TYPOGRAPHY
   ========================================================= */
.pmpro_account h2,
.pmpro-dashboard-block h2,
.pmpro_account_loggedin h3,
.af-box h3{
  font-size:1.35rem;
  font-weight:700;
  margin:0 0 12px;
}

.pmpro_account p,
.pmpro-dashboard-block p,
.af-box p{
  font-size:.97rem;
  opacity:.9;
  margin-bottom:10px;
}

/* =========================================================
   LAYER 7 — BUTTONS (ONE SYSTEM)
   ========================================================= */
.pmpro_btn,
.pmpro_actionlinks a,
.af-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;

  background:var(--af-blue);
  color:#fff !important;
  padding:14px 20px;
  font-size:.95rem;
  font-weight:600;

  border-radius:12px;
  border:none;
  text-decoration:none;
  cursor:pointer;

  box-shadow:0 3px 12px rgba(0,85,130,.25);
  transition:.18s ease;
}

.pmpro_btn:hover,
.pmpro_actionlinks a:hover{
  background:var(--af-blue-dark);
  transform:translateY(-2px);
}

/* Button rows only — NO global div flex */
.pmpro_actionlinks,
.form-buttons-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

/* =========================================================
   LAYER 8 — FORMS
   ========================================================= */
.pmpro-dashboard-wrapper form,
.pmpro_member_profile_edit_wrap form,
.af-box form{
  background:var(--af-card);
  border-radius:16px;
  padding:22px;
  border:1px solid rgba(255,255,255,.08);
}

.pmpro-dashboard-wrapper input,
.pmpro-dashboard-wrapper textarea,
.pmpro-dashboard-wrapper select{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  background:var(--af-bg);
  color:var(--af-text);
  border:1px solid var(--af-gray);
}

/* =========================================================
   LAYER 9 — TABLES
   ========================================================= */
.pmpro_account table,
.analytics-table{
  width:100%;
  border-collapse:collapse;
  border-radius:14px;
  overflow:hidden;
  background:var(--af-card);
  box-shadow:var(--af-shadow-sm);
}

.pmpro_account th,
.analytics-table th{
  background:#1e1e1e;
  color:#fff;
  padding:12px 14px;
}

.pmpro_account td,
.analytics-table td{
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

/* =========================================================
   LAYER 10 — BIO PAGE (SAFE ESSENTIALS)
   ========================================================= */
.bio-page{
  width:100%;
  padding:28px 0 48px;
}

.bio-header{
  width:100%;
  height:160px;
  background-size:cover;
  background-position:center;
}

.bio-container{
  max-width:980px;
  margin:0 auto;
  padding:18px;
}

.bio-links{
  display:flex;
  flex-direction:column;
  gap:14px;
  align-items:center;
}

.bio-links a{
  max-width:520px;
  width:100%;
  padding:12px 16px;
  border-radius:10px;
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--af-blue);
  color:#fff;
  text-decoration:none;
}

/* =========================================================
   LAYER 11 — MOBILE
   ========================================================= */
@media (max-width:600px){

  .pmpro-dashboard-wrapper,
  #pmpro_account{
    padding:18px;
  }

  .pmpro_btn,
  .pmpro_actionlinks a{
    width:auto;
    justify-content:center;
  }

  .bio-header{
    height:120px;
  }
}

/* ==========================================================
   Afritivity — PMPro Dashboard Form Tweaks
   ========================================================== */
   
.af-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 18px;
}

/* ===============================
   IMAGE PREVIEWS
   =============================== */

.af-image-preview {
    margin-bottom: 10px;
    text-align: left;
}

.af-image-preview img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.af-icon-preview img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
}

/* ===============================
   REMOVE CHECKBOX LAYOUT
   =============================== */

.af-remove-wrap {
    margin-bottom: 18px;
    text-align: left !important;
}

.af-remove-row {
    display: flex !important;
    align-items: center;
    gap: 10px;

    margin: 6px 0 4px 0 !important;
    padding: 0 !important;

    text-align: left !important;
    justify-content: flex-start !important;
}

.af-remove-row input[type="checkbox"] {
    margin: 0 !important;
}

.af-remove-help {
    margin-left: 26px;
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.4;
}

/* Kill PMPro centering */
.pmpro-dashboard-block label.af-remove-row {
    justify-content: flex-start !important;
    text-align: left !important;
}

/* ==========================================================
   AFritivity — Bio Image Edit FIXES (FINAL)
   ========================================================== */

/* --- Ensure previews are NEVER centered --- */
.af-image-preview,
.af-icon-preview {
    text-align: left !important;
    display: block;
}

.af-icon-preview img {
    display: block;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* --- Remove PMPro forced label stacking (ONLY here) --- */
.pmpro-dashboard-block .af-remove-row {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 6px 0 2px 0 !important;
    padding: 0 !important;

    width: auto !important;
    text-align: left !important;
    white-space: nowrap !important;
}

/* --- Checkbox alignment --- */
.pmpro-dashboard-block .af-remove-row input[type="checkbox"] {
    margin: 0 !important;
    flex-shrink: 0;
}

/* --- Keep "Remove header image" on ONE line --- */
.pmpro-dashboard-block .af-remove-row span {
    display: inline-block !important;
    white-space: nowrap !important;
    font-weight: 600;
}

/* --- Instructions: ONE clean line --- */
.af-remove-help {
    margin-left: 26px;
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.4;

    white-space: nowrap !important;
}

/* --- Kill any inherited centering --- */
.pmpro-dashboard-block .af-remove-wrap {
    text-align: left !important;
    justify-content: flex-start !important;
}

/* ===============================
   FORCE LEFT ALIGN — IMAGE PREVIEWS
   =============================== */

.pmpro-dashboard-block {
    text-align: left !important;
}

.af-image-preview {
    text-align: left !important;
    margin-bottom: 10px;
}

.af-header-preview img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.af-icon-preview img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: block;
}

/* ===============================
   REMOVE CHECKBOX — CLEAN ONE-LINE LAYOUT
   =============================== */

.af-remove-wrap {
    margin: 10px 0 18px;
}

.af-remove-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 600;
}

.af-remove-row input[type="checkbox"] {
    margin: 0;
}

.af-remove-help {
    margin-left: 26px;
    font-size: 0.9rem;
    opacity: 0.85;
    white-space: nowrap;
}

/* ===============================
   PROFILE ICON - FORCE LEFT ALIGN (FINAL FIX)
   =============================== */

.pmpro-dashboard-block .af-icon-preview {
    text-align: left !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.pmpro-dashboard-block .af-icon-preview img {
    display: block !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    float: none !important;
}

/* Override any flex or grid centering on parent */
.pmpro-dashboard-block label + .af-icon-preview {
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

/* Ensure the wrapper div doesn't center */
.pmpro-dashboard-block .af-image-preview.af-icon-preview {
    display: block !important;
    text-align: left !important;
}

/* =========================================
   PMPro Account – Dark Card UI (Afritivity)
========================================= */

/* Section wrapper */
.pmpro_section {
    margin-bottom: 40px;
}

/* Card container */
.pmpro_card {
    background: linear-gradient(180deg, #0b0b0b, #111);
    color: #fff;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 20px 45px rgba(0,0,0,0.65);
    overflow: hidden;
}

/* Card title */
.pmpro_card_title {
    color: #fff;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Card content */
.pmpro_card_content {
    color: #fff;
}

/* Lists inside cards */
.pmpro_list,
.pmpro_list_item {
    color: #fff;
}

/* Labels (Username, Email etc) */
.pmpro_card_content strong {
    color: #bbb;
}

/* Action links (Edit Profile / Logout) */
.pmpro_card_actions a {
    color: #4da3ff;
    font-weight: 500;
}

/* Membership level heading */
.pmpro_card h2,
.pmpro_card h3 {
    color: #fff;
}

/* Tables (Invoices, Orders) */
.pmpro_card table {
    width: 100%;
    background: transparent;
    border-collapse: collapse;
}

.pmpro_card th {
    color: #aaa;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pmpro_card td {
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Paid badge */
.pmpro_tag,
.pmpro_tag-success {
    background: rgba(0,200,83,0.18);
    color: #00c853;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
}

/* Buttons */
.pmpro_btn,
.pmpro_btn-submit {
    background: #111;
    color: #fff;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
}

.pmpro_btn:hover {
    background: #1a1a1a;
}

/* ================================
   Bio Slider – Image Normalisation
================================ */

.af-bio-slide {
    text-align: center;
}

.bio-carousel-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bio-carousel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* CRITICAL */
    border-radius: 50%;
    display: block;
}

.af-bio-slide h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 6px 0 2px;
    color: #fff;
}

.af-bio-slide p {
    font-size: 13px;
    color: #00bcd4;
}

/* =================================================
   PMPro: Permanently hide avatar image
================================================= */
.pmpro h3.pmpro_heading-with-avatar img.avatar,
.pmpro h3.pmpro_heading-with-avatar img.avatar-48 {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove flex gap caused by avatar */
.pmpro h3.pmpro_heading-with-avatar {
    gap: 0 !important;
    align-items: flex-start;
}

/* =================================================
   PMPro: Force Welcome text visible + bold
================================================= */
.pmpro h3.pmpro_card_title.pmpro_font-large {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 24px !important;
    opacity: 1 !important;
}

/* Optional Afritivity accent underline */
.pmpro h3.pmpro_card_title.pmpro_font-large::after {
    content: "";
    display: block;
    width: 70px;
    height: 3px;
    background: #ffd54f;
    margin-top: 8px;
    border-radius: 3px;
}

/* =========================================================
   PMPro Orders Table — HARD OVERRIDE (FINAL)
   Targets the exact cells PMPro renders
========================================================= */

/* Level column */
.pmpro table.pmpro_table_orders td.pmpro_table_order-level {
    color: #ffd54f !important;          /* Gold text */
    background-color: transparent !important;
    font-weight: 700 !important;
}

/* Amount / Total column */
.pmpro table.pmpro_table_orders td.pmpro_table_order-amount {
    color: #ffffff !important;          /* R 0.00 visible */
    background-color: transparent !important;
    font-weight: 600 !important;
}

/* Ensure ALL order table cells are readable */
.pmpro table.pmpro_table_orders tbody td,
.pmpro table.pmpro_table_orders tbody th {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Header labels (Date / Level / Total / Status) */
.pmpro table.pmpro_table_orders thead th {
    color: #bdbdbd !important;
    background-color: transparent !important;
    font-weight: 600 !important;
}

/* =================================================
   PMPro Orders Table — FIX TOTAL (R 0.00) VISIBILITY
================================================= */
.pmpro table.pmpro_table_orders td.pmpro_table_order-amount {
    color: #111111 !important;   /* dark text on white row */
    font-weight: 600 !important;
    background-color: transparent !important;
}

/* PMPro Username helper text */
#pmpro_form label[for="username"] {
    display: flex;
    align-items: center;
    gap: 8px;
}

#pmpro_form label[for="username"]::after {
    content: "(Used for your Bio Link • cannot be changed)";
    font-size: 12px;
    font-weight: 400;
    color: #bdbdbd;
    white-space: nowrap;
}

/* =========================================================
   RENTAL PLUGIN MATCHING STYLES FOR DASHBOARD
   ========================================================= */

/* Dashboard Container */
.afr-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard Grid - Side by Side Blocks */
.afr-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

/* Dashboard Block - Dark Card Style */
.afr-dashboard-block {
    background: var(--afr-bg);
    border: 1px solid var(--afr-border);
    border-radius: 16px;
    padding: 25px;
    color: var(--afr-text);
}

.afr-dashboard-block h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--afr-text);
}

.afr-dashboard-block h3 svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.afr-dashboard-block p {
    margin: 0 0 15px 0;
    opacity: 0.85;
    color: var(--afr-text-muted);
    font-size: 0.95rem;
}

.afr-dashboard-block a:not(.afr-btn) {
    color: var(--afr-primary);
}

/* Toggle Switch - Rental Plugin Style */
.afr-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.afr-toggle {
    width: 50px;
    height: 26px;
    background: rgba(255,255,255,0.2);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.afr-toggle.active {
    background: var(--afr-success);
}

.afr-toggle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.afr-toggle.active::after {
    transform: translateX(24px);
}

/* Buttons - Rental Plugin Style */
.afr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--afr-primary);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.afr-btn:hover {
    background: var(--afr-primary-dark);
    color: #fff !important;
    transform: translateY(-1px);
}

.afr-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.afr-btn-success {
    background: var(--afr-success);
}

.afr-btn-success:hover {
    background: #218838;
}

.afr-btn-danger {
    background: var(--afr-danger);
}

.afr-btn-danger:hover {
    background: #c82333;
}

.afr-btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.afr-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

/* Form Inputs - Rental Plugin Style */
.afr-dashboard-block input[type="text"],
.afr-dashboard-block input[type="url"],
.afr-dashboard-block input[type="email"],
.afr-dashboard-block textarea,
.afr-dashboard-block select {
    width: 100%;
    max-width: 450px;
    padding: 12px 15px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.afr-dashboard-block input:focus,
.afr-dashboard-block textarea:focus,
.afr-dashboard-block select:focus {
    outline: none;
    border-color: var(--afr-primary);
    background: rgba(255,255,255,0.12);
}

/* Stats Row - Rental Plugin Style */
.afr-stats-row {
    display: flex;
    gap: 40px;
    margin: 15px 0;
}

.afr-stat-item {
    text-align: center;
}

.afr-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--afr-primary);
    line-height: 1;
    margin-bottom: 5px;
}

.afr-stat-number.warning {
    color: var(--afr-warning);
}

.afr-stat-number.success {
    color: var(--afr-success);
}

.afr-stat-label {
    font-size: 0.85rem;
    color: #aaa;
    text-transform: uppercase;
}

/* Analytics Grid */
.afr-analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.afr-analytics-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 15px;
}

.afr-analytics-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.afr-analytics-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--afr-success);
}

/* Status Messages */
.afr-status-msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.afr-status-msg.success {
    background: rgba(40, 167, 69, 0.2);
    color: var(--afr-success);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.afr-status-msg.error {
    background: rgba(220,53,69,0.2);
    color: var(--afr-danger);
    border: 1px solid rgba(220,53,69,0.3);
}

.afr-status-msg.info {
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: var(--afr-primary);
}

.afr-status-msg em {
    font-style: italic;
    opacity: 0.8;
}

/* QR Code Section */
.afr-qr-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-top: 10px;
}

.afr-qr-section img {
    width: 140px;
    height: 140px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #fff;
}

/* Tab Navigation - Rental Plugin Style */
.afr-tab-nav {
    display: flex;
    gap: 5px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    flex-wrap: wrap;
}

.afr-tab-btn {
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    color: var(--afr-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.afr-tab-btn:hover {
    background: rgba(33, 150, 243, 0.2);
    border-color: var(--afr-primary);
    color: var(--afr-primary);
}

.afr-tab-btn.active {
    background: var(--afr-primary);
    color: #fff;
    border-color: var(--afr-primary);
}

.afr-tab-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.afr-tab-content {
    display: none;
}

.afr-tab-content.active {
    display: block;
}

/* Sales Summary Grid */
.afr-sales-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.afr-sales-summary h4 {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.afr-sales-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.afr-sales-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 12px 14px;
}

.afr-sales-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 4px;
}

.afr-sales-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--afr-success);
}

/* Payment Notice */
.afr-payment-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.afr-payment-notice.configured {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: var(--afr-success);
}

.afr-payment-notice.not-configured {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: var(--afr-warning);
}

.afr-payment-notice svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.afr-payment-notice a {
    color: inherit;
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .afr-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .afr-btn-group {
        flex-direction: column;
    }
    
    .afr-btn {
        width: 100%;
        justify-content: center;
    }
    
    .afr-analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .afr-sales-grid {
        grid-template-columns: 1fr;
    }
    
    .afr-stats-row {
        gap: 25px;
    }
    
    .afr-stat-number {
        font-size: 2rem;
    }
    
    .afr-tab-nav {
        gap: 8px;
    }
    
    .afr-tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* =========================================================
   BIO LINK EDITOR STYLES
   ========================================================= */
.af-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 10px;
}

.af-link-row input[type="text"],
.af-link-row input[type="url"] {
    flex: 1;
    min-width: 150px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #fff;
}

.af-link-row select {
    padding: 10px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #fff;
    min-width: 100px;
}

.af-link-row label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.af-remove-link {
    background: var(--afr-danger);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.af-remove-link:hover {
    background: #c82333;
}

/* PMPro – Fix invisible ACTIVE membership button (current level) */
.pmpro .pmpro_btn.pmpro_btn-outline {
    color: #0d3b4c !important;          /* dark readable text */
    background-color: #ffffff !important;
    border: 2px solid #0d3b4c !important;
    font-weight: 600;
}

/* Optional: hover state */
.pmpro .pmpro_btn.pmpro_btn-outline:hover {
    background-color: #0d3b4c !important;
    color: #ffffff !important;
}

/* Target ONLY the Members Account page (ID 259) */
.page-id-259 .entry-content > *, 
.page-id-259 .pmpro_account > *, 
.page-id-259 .pmpro p,
.page-id-259 .pmpro_section-content > * {
    margin-bottom: 30px !important;   /* Main vertical gap – start here, adjust to 35px–45px to match dashboard feel */
}

/* Extra padding around the whole account container for card-like feel */
.page-id-259 .pmpro_account,
.page-id-259 .entry-content .pmpro {
    padding: 25px;
    margin-bottom: 40px;
    border-radius: 8px;               /* Optional: subtle rounding like cards */
    background: #1a1a1a;              /* Dark bg if your theme is dark mode */
    border: 1px solid #333;           /* Optional subtle border */
}

/* Space out the action links horizontally (Edit Profile | Change Password | Log Out) */
.page-id-259 .pmpro_actionlinks a {
    margin-right: 25px;               /* More separation between links */
}

/* If the welcome heading is too tight to the content below */
.page-id-259 h2, 
.page-id-259 .pmpro h2 {             /* Targets "Welcome, Rich" or similar */
    margin-bottom: 35px;
}

/* =========================================
   PMPro DARK THEME – FORCE COLOR VARIABLES
   ========================================= */

.pmpro {
    --pmpro-color--contrast: #ffffff;
    --pmpro-color--text: #e5e7eb;
    --pmpro-color--muted: #9ca3af;
    --pmpro-color--border: rgba(255,255,255,0.25);
}

/* Card backgrounds */
.pmpro .pmpro_card,
.pmpro .pmpro_checkout_box {
    background: linear-gradient(135deg, #000000, #0b0b0b);
    border: 1px solid var(--pmpro-color--border);
    border-radius: 14px;
}

/* Paragraphs & labels */
.pmpro p,
.pmpro label,
.pmpro li {
    color: var(--pmpro-color--text);
}

/* Headings (THIS fixes Membership Information) */
.pmpro h1,
.pmpro h2,
.pmpro h3,
.pmpro h4 {
    color: var(--pmpro-color--contrast);
}

/* Highlight selected level / price */
.pmpro strong {
    color: #f5c451;
}


/* ==========================================================
   Bio Slider – Larger, uniform, payment-logo-style avatars
   ========================================================== */

/* Center slide content neatly */
.latest-bios-carousel .af-bio-slide {
    text-align: center;
}

/* Avatar container – same visual language as payment logos */
.latest-bios-carousel .bio-carousel-avatar {
    width: 160px;          /* size similar to payment logos */
    height: 160px;
    margin: 0 auto 14px;
    background: #0f1720;   /* subtle dark panel like logos */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Image behavior */
.latest-bios-carousel .bio-carousel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* logo-style containment */
    padding: 14px;         /* breathing room like logos */
}

/* Name styling */
.latest-bios-carousel h3 {
    margin: 6px 0 2px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

/* View profile link */
.latest-bios-carousel p {
    margin: 0;
    font-size: 13px;
    color: #38bdf8; /* subtle CTA blue */
}

/* Mobile scaling */
@media (max-width: 640px) {
    .latest-bios-carousel .bio-carousel-avatar {
        width: 110px;
        height: 110px;
        border-radius: 16px;
    }
}

/* =========================================================
   PMPro CHECKOUT – MOBILE OVERFLOW FIX
   Fieldsets use min-width:min-content by default, which
   prevents shrinking below content width on narrow screens.
   ========================================================= */

/* Reset fieldset browser default so it can shrink */
.pmpro_form_fieldset,
.pmpro fieldset {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
}

/* Ensure cards respect parent width */
.pmpro_form_fieldset .pmpro_card,
.pmpro fieldset .pmpro_card {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* All checkout inputs must stay inside their container */
.pmpro_form_fieldset input,
.pmpro_form_fieldset textarea,
.pmpro_form_fieldset select {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {

    /* Tighten card padding on mobile to reclaim space */
    .pmpro_form_fieldset .pmpro_card {
        padding: 18px 14px;
    }

    .pmpro_form_fieldset .pmpro_card_content {
        padding: 0;
    }

    /* Username helper text: wrap instead of overflow */
    #pmpro_form label[for="username"] {
        flex-wrap: wrap;
    }

    #pmpro_form label[for="username"]::after {
        white-space: normal;
        font-size: 11px;
    }
}

