/*
  Copyright (c) 2026 Blue Astra Technologies LLP, India. All Rights Reserved.
  Proprietary software. Unauthorized copying or use by any means or technology
  (including AI tools) is strictly prohibited.
*/
/* =====================================================
   SUBSCRIPTION PLAN ACCESS  —  sidebar badges & locks

   Marks every left-nav tab that needs a paid package to operate:
       SWIFT AI+    blue pill   (the Features blue family)
       ROCKET AI+   metallic    (matches the pricing card badge)

   Two states per gated tab:
       .plan-included  the current package covers it -> badge only
       .plan-locked    the current package does not  -> badge + padlock,
                       tab dimmed and click opens the upgrade notice.

   Loaded LAST so it outranks dashboard.css / features.css.
   ===================================================== */

/* ---- The tab itself ---- */
.sidebar-nav .nav-item {
    flex-wrap: wrap;
    row-gap: 4px;
}

.sidebar-nav .nav-item.plan-locked {
    opacity: .82;
}

.sidebar-nav .nav-item.plan-locked span.nav-label,
.sidebar-nav .nav-item.plan-locked > span:not(.plan-badge):not(.plan-lock) {
    color: var(--f-muted) !important;
    font-weight: 600;
}

.sidebar-nav .nav-item.plan-locked > i:first-child {
    color: var(--f-muted) !important;
    opacity: .9;
}

.sidebar-nav .nav-item.plan-locked:hover {
    background: #f6f8fc !important;
    transform: none;
}

/* The padlock sits right after the label so the reason reads left-to-right */
.sidebar-nav .nav-item .plan-lock {
    font-size: 11px;
    color: var(--f-muted);
    flex: 0 0 auto;
    margin-left: -4px;
}

/* ---- Tier badge ---- */
.sidebar-nav .nav-item .plan-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: var(--f-r-pill, 30px);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .55px;
    line-height: 1.6;
    text-transform: uppercase;
    white-space: nowrap;
}

/* SWIFT AI+ — the Features blue, same gradient as the pricing badge */
.plan-badge.plan-badge-swift {
    background: linear-gradient(135deg, #2E86FF, #1666d8);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(46, 134, 255, .28);
}

/* ROCKET AI+ — the metallic pricing badge, shrunk to nav scale */
.plan-badge.plan-badge-rocket {
    background: linear-gradient(135deg, #ffffff 0%, #eef1f4 40%, #c3cad1 55%, #f6f8fa 100%);
    color: #16233a;
    border: 1px solid #cfd6dd;
    box-shadow: 0 2px 6px rgba(22, 35, 58, .18), inset 0 1px 0 rgba(255, 255, 255, .95);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

/* Locked tabs wear the badge as a flat outline: it reads as "needed", not "yours" */
.nav-item.plan-locked .plan-badge.plan-badge-swift {
    background: #fff;
    color: #1666d8;
    border-color: #b7d3ff;
    box-shadow: none;
}

.nav-item.plan-locked .plan-badge.plan-badge-rocket {
    background: #fff;
    color: #16233a;
    border-color: #cfd6dd;
    box-shadow: none;
    text-shadow: none;
}

/* ---- Legend under the nav ---- */
.plan-legend {
    margin: 10px 12px 4px;
    padding: 12px 14px;
    border: 1px solid var(--f-line, #e6ecf5);
    border-radius: 12px;
    background: #fbfcfe;
    font-size: 11px;
    line-height: 1.55;
    color: var(--f-text, #4a5568);
}

.plan-legend .plan-legend-title {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--f-muted, #8a93a3);
    margin-bottom: 8px;
}

.plan-legend .plan-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.plan-legend .plan-legend-row:last-of-type {
    margin-bottom: 0;
}

.plan-legend .plan-legend-row .plan-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--f-r-pill, 30px);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .55px;
    text-transform: uppercase;
    white-space: nowrap;
}

.plan-legend .plan-current {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed var(--f-line, #e6ecf5);
    font-size: 11px;
    color: var(--f-text, #4a5568);
}

.plan-legend .plan-current strong {
    color: var(--f-navy, #16233a);
    font-weight: 800;
    letter-spacing: .3px;
}

.plan-legend .plan-legend-upgrade {
    display: inline-block;
    margin-top: 9px;
    padding: 7px 12px;
    border: none;
    border-radius: var(--f-r-btn, 10px);
    background: linear-gradient(135deg, #2E86FF, #1666d8);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(46, 134, 255, .22);
}

.plan-legend .plan-legend-upgrade:hover {
    box-shadow: 0 10px 24px rgba(46, 134, 255, .30);
}

/* =====================================================
   UPGRADE NOTICE  —  shown when a locked tab is clicked
   ===================================================== */
.plan-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(22, 35, 58, .55);
    backdrop-filter: saturate(160%) blur(3px);
    -webkit-backdrop-filter: saturate(160%) blur(3px);
}

.plan-lock-modal {
    width: 100%;
    max-width: 470px;
    background: #fff;
    border-radius: var(--f-r-modal, 20px);
    box-shadow: 0 30px 60px rgba(22, 35, 58, .28);
    overflow: hidden;
}

.plan-lock-modal .plm-head {
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--f-line, #e6ecf5);
}

.plan-lock-modal .plm-head .plm-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--f-soft, #eef4ff);
    color: var(--f-blue, #2E86FF);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}

.plan-lock-modal .plm-head h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: var(--f-navy, #16233a);
    letter-spacing: -.4px;
}

.plan-lock-modal .plm-head p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--f-text, #4a5568);
}

.plan-lock-modal .plm-body {
    padding: 18px 26px 6px;
}

.plan-lock-modal .plm-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.plan-lock-modal .plm-body li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--f-text, #4a5568);
    margin-bottom: 8px;
}

.plan-lock-modal .plm-body li i {
    color: var(--f-blue, #2E86FF);
    font-size: 12px;
    margin-top: 5px;
}

.plan-lock-modal .plm-foot {
    padding: 16px 26px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .plan-lock-modal .plm-foot { justify-content: stretch; }
    .plan-lock-modal .plm-foot .btn { flex: 1 1 100%; }
}
