/* AI Authors Studio - Writer First Nav (Ticket 3 hotfix) */
.aias-portal-nav{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin: 10px 0 14px 0;
}

.aias-portal-title{
  font-weight:700;
  white-space:nowrap;
}

.aias-portal-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.aias-tab{
  display:inline-flex !important;
  /* +25% size for main menu buttons */
  padding:8px 13px !important;
  border-radius:8px !important;
  border:1px solid rgba(0,0,0,0.18) !important;
  background: rgba(165,226,150,0.98) !important; /* darker green */
  text-decoration:none !important;
  line-height:1 !important;
  font-weight:700 !important;
  font-size:15px !important;
}

/* Some skins still render the legacy nav (.aibb-nav / .aibb-primary-tab). Keep those 25% larger too. */
.aibb-wrap.aibb-frontend .aibb-nav a,
.aibb-wrap.aibb-frontend a.aibb-primary-tab{
  padding:8px 13px !important;
  font-weight:700 !important;
  font-size:15px !important;
  line-height:1 !important;
  border-radius:8px !important;
}

.aias-tab:hover{
  background: rgba(145,216,132,0.98) !important;
}

.aias-tab.active{
  background: #ffffff !important;            /* selected = white */
  border-color: rgba(127,191,99,0.95) !important;
}

.aias-tab.disabled{
  opacity:0.65;
  pointer-events:none;
}

@media (max-width: 480px){
  .aias-tab{ padding:10px 12px; }
}


/* --- Divi override: ensure nav buttons are green when not active --- */
body.et_divi_theme .aibb-wrap.aibb-frontend .aibb-nav a,
body.et_divi_theme .aibb-wrap.aibb-frontend a.aibb-primary-tab,
body.et_divi_theme .aibb-wrap.aibb-frontend .aias-tab{
  background: rgba(120, 200, 110, 0.92) !important;
  color: #102010 !important;
}
body.et_divi_theme .aibb-wrap.aibb-frontend .aibb-nav a.aibb-nav-active,
body.et_divi_theme .aibb-wrap.aibb-frontend a.aibb-primary-tab.aibb-nav-active,
body.et_divi_theme .aibb-wrap.aibb-frontend .aias-tab.active{
  background: #ffffff !important;
  color: #102010 !important;
  border-color: rgba(127,191,99,0.95) !important;
}


body.aias-editor-fullscreen .aias-portal-nav,body.aias-editor-fullscreen .aibb-topbar{display:none!important;}


/* -------------------------------------------------------------------------
   Portal nav (new layout classes) + header plan pill
   NOTE: These rules were previously inlined via <style> blocks in PHP.
   Several portal entrypoints sanitize HTML with wp_kses_post(), which strips
   <style> tags and would cause CSS to render as plain text on the page.
   ------------------------------------------------------------------------- */

/* Keep the AAS top navigation aligned with the portal container even if a theme
   renders it outside the .aibb-wrap wrapper. */
.aias-portal-nav{max-width:1300px;width:calc(100% - 40px);margin:10px auto 14px auto}
.aias-portal-nav .aias-tabs-row{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center}
.aias-portal-nav .aias-tabs-left{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.aias-portal-nav .aias-tabs-right{margin-left:auto;display:flex;align-items:center}

.aias-portal-nav .aias-subtabs{margin-top:10px;display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.aias-portal-nav .aias-subtab{display:inline-flex !important;align-items:center !important;justify-content:center !important;padding:6px 10px !important;border:1px solid #9bb79a !important;border-radius:999px !important;background:#e5f3de !important;color:#234 !important;font-weight:700 !important;font-size:13px !important;line-height:1 !important;text-decoration:none !important;box-shadow:0 1px 0 rgba(0,0,0,0.06) !important;}
.aias-portal-nav .aias-subtab.active{background:#ffffff !important;border-color:#7aa56a !important;}

.aibb-dashboard-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* AI Coach button: force gold background (must override .aias-tab !important styles) */
.aias-portal-nav .aias-ai-coach-btn{display:inline-flex !important;align-items:center !important;justify-content:center !important;padding:7px 11px !important;border:1px solid #d1a800 !important;border-radius:10px !important;background:#f7d33b !important;color:#2b2400 !important;font-weight:900 !important;font-size:15px !important;line-height:1 !important;box-shadow:0 1px 0 rgba(0,0,0,0.08) !important;cursor:pointer !important;position:relative !important;}
.aias-portal-nav .aias-ai-coach-btn:hover{filter:brightness(0.97)}

/* Editor Tools button: match Leonardo pill sizing & rounding */
.aias-portal-nav .aias-editor-tools-btn{display:inline-flex !important;align-items:center !important;justify-content:center !important;padding:9px 14px !important;border:1px solid #d08a8a !important;border-radius:12px !important;background:#f7c1c1 !important;color:#4a1f1f !important;font-weight:900 !important;font-size:15px !important;line-height:1 !important;box-shadow:0 1px 0 rgba(0,0,0,0.08) !important;cursor:pointer !important;}
.aias-portal-nav .aias-editor-tools-btn:hover{filter:brightness(0.97)}

/* Removed: indicator dot (user preference) */
.aias-portal-nav .aias-ai-coach-btn.has-suggestion:after{content:none !important;}

/* Hide legacy top menu on project-context pages (W/O/P shell active) */
.aibb-nav, .aibb-nav-spacer{display:none !important;}

/* Dashboard tools row */
.aias-dashboard-tools{margin-top:10px;display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.aias-dashboard-tools a{display:inline-block;padding:8px 12px;border:1px solid #c3c4c7;border-radius:9px;background:#fff;text-decoration:none;font-weight:600;line-height:1}
.aias-dashboard-tools a:hover{background:#f2f2f2}

/* Header plan/user pill */
.aibb-header-pill{display:inline-flex;align-items:center;gap:10px;padding:6px 10px;border:1px solid #c3c4c7;border-radius:999px;background:#fff;font-weight:700;line-height:1;white-space:nowrap;}
.aibb-header-pill .aibb-plan-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 10px;border-radius:999px;font-weight:900;letter-spacing:0.02em;border:1px solid rgba(0,0,0,.15);} 
.aibb-header-pill .aibb-plan-badge.is-free{background:#f6f7f7;color:#1d2327;}
.aibb-header-pill .aibb-plan-badge.is-pro{background:#e3f2fd;color:#0d47a1;}
.aibb-header-pill .aibb-plan-badge.is-studio{background:#ffebee;color:#b71c1c;}
