/* GravityOps shared admin styles (root library) */
:root {
    --gops-color-primary: #975BE5; /* Primary Brand Purple */
    --gops-color-primary-2: #7F3FD6; /* Primary Button Hover for gradients */
    --gops-color-primary-soft: #F8F5FF; /* Container color */
    --gops-color-text: #1A1429; /* Main Text */
    --gops-color-muted: #5B5670; /* Secondary Text */
    --gops-color-border: #D8CFF0; /* Border Subtle */
    --gops-color-bg: #F6F7FB; /* Light Background */

    --gops-radius: 12px;
    --gops-shadow-subtle: 0 4px 12px rgba(151, 91, 229, 0.08); /* Purple-tinted shadow */
}

/* Header */
.gops-header-wrapper{display:flex;align-items:center;gap:20px;margin:16px 0}
.gops-header-icon{width:80px;height:80px;object-fit:contain;flex-shrink:0;display:block}

.gops-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-radius:var(--gops-radius);position:relative;z-index:0;
    background: #3A1D6F; /* Header Primary solid color */
    color:#fff;box-shadow:0 8px 24px rgba(58, 29, 111, 0.18);border:1px solid rgba(151, 91, 229, 0.35);flex:1}
.gops-logo-chip{padding:4px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.45);font-size:11px;text-transform:uppercase;background:rgba(255,255,255,.12);color:#fff;text-decoration:none}
.gops-headings{margin-left:10px}
.gops-title{margin:0;font-size:20px;color:#fff}
.gops-subtitle{margin:4px 0 0;color:rgba(255,255,255,.9)}
.gops-header__left{display:flex;align-items:center;gap:10px}
.gops-header__right .gops-link{margin-left:8px;text-decoration:none}

/* Tabs */
.gops-tabs{display:inline-flex;gap:6px;margin:12px 0 18px;background:var(--gops-color-primary-soft);border-radius:999px;padding:4px;border:1px solid var(--gops-color-border)}
.gops-tab{padding:6px 14px;border-radius:999px;background:transparent;border:0;text-decoration:none;color:var(--gops-color-muted);font-weight: 500;}
.gops-tab.is-active{background: var(--gops-color-primary);color:#fff}
.gops-tab__badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;border-radius:999px;background:#5F6EEA;color:#fff;font-size:11px;font-weight:700;line-height:1;margin-left:6px;border:0}

/* Toolbar */
.gops-actions{display:flex;justify-content:flex-end;margin:6px 0 14px}

/* Content / cards */
.gops-content{margin-top:6px}
.gops-card{background:var(--gops-color-primary-soft);border:1px solid var(--gops-color-border);border-radius:var(--gops-radius);padding:16px;margin-bottom:14px;box-shadow:var(--gops-shadow-subtle)}
/* Improve readability inside cards */
.gops-card .gops-title{color:var(--gops-color-text)}
.gops-card p{color:var(--gops-color-text)}

/* Notices container below header to prevent margin collapsing */
.gops-notices{display:flow-root;margin:8px 0 12px;position:relative;z-index:1}
/* Ensure notice text remains readable on our pages */
.gops-admin .notice,
.gops-admin .fs-notice,
.gops-admin .notice p,
.gops-admin .fs-notice p{color:var(--gops-color-text) !important}

/* Badges */
.gops-badge{display:inline-block;padding:2px 10px;border-radius:999px;font-size:11px;font-weight: 600;border:1px solid var(--gops-color-border)}
.gops-badge--ok{background:#99D328;color:#fff;border-color:#99D328} /* Secondary Button Lime */
.gops-badge--warn{background:#fee2e2;color:#991b1b;border-color:#fecaca}

/* Grid + Tiles */
.gops-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(260px,1fr));gap:16px;grid-auto-rows:auto}
.gops-grid{align-items:stretch}
.gops-tile{display:flex;flex-direction:column;background:var(--gops-color-primary-soft);border:1px solid var(--gops-color-border);border-radius:var(--gops-radius);padding:14px;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:box-shadow .15s ease;cursor:pointer;height:100%;min-height:220px;overflow:hidden;box-sizing:border-box;position:relative;}
.gops-tile:hover{box-shadow:0 6px 18px rgba(0,0,0,.08)}
.gops-grid > .gops-tile{margin-top:12px}
.gops-tile__head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.gops-tile__icon{font-size:20px;cursor:pointer}
.gops-tile__iconimg{width:48px;height:48px;max-width:48px;max-height:48px;border-radius:8px;object-fit:contain;display:block}
.gops-tile__title{margin:0;font-size:16px}
.gops-tile__title .gops-tile__link{text-decoration:none;color:inherit}
.gops-tile__desc{margin:0 0 10px;color:var(--gops-color-muted);cursor:pointer; flex-grow: 1;}
.gops-tile__meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.gops-tile__version{color:var(--gops-color-muted);font-size:12px; font-weight: 500;}
.gops-tile__actions{display:flex;flex-direction: row; align-items: flex-end; justify-content: space-between; gap:12px; margin-top:auto; padding-bottom: 4px;}
.gops-tile__action-group{display: flex; flex-direction: column; gap: 6px; align-items: flex-start;}
.gops-tile__learn-more{font-size: 13px; margin-bottom: 8px; white-space: nowrap;}
.gops-tile .button{cursor:pointer; min-width: 100px;}
.gops-tile *:not(a):not(button):not(input){cursor:inherit}


/* Utility links */
.gops-link{color:#5F6EEA;text-decoration:none} /* Accent Product Blue */
.gops-link:hover{text-decoration:underline; color: #4A57C6;}
button.gops-link{background:none;border:0;padding:0;font:inherit;line-height:1.3;cursor:pointer}

/* Loading state */
.gops-action-button.is-loading{opacity:.7;pointer-events:none}
.gops-spinner{display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;margin-left:6px;vertical-align:-2px;animation:gops-spin .7s linear infinite}
@keyframes gops-spin{to{transform:rotate(360deg)}}

/* Modal */
.gops-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:100000}
.gops-modal.is-open{display:flex}
.gops-modal__backdrop{position:absolute;inset:0;background:rgba(26,20,41,.6)}
.gops-modal__dialog{position:relative;z-index:1;background:#fff;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.25);width:min(720px,92vw);max-height:80vh;display:flex;flex-direction:column;padding:12px 16px}
.gops-modal__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.gops-modal__title{margin:0;font-size:18px;color:var(--gops-color-text)}
.gops-modal__close{background:none;border:0;font-size:26px;line-height:1;cursor:pointer;color:var(--gops-color-muted);transition:color .15s ease}
.gops-modal__close:hover{color:var(--gops-color-primary)}
.gops-modal__body{overflow:auto;padding:0 4px}
.gops-modal__content{margin:0;color:var(--gops-color-text);font-size:13px;line-height:1.4}
.gops-modal__content h3,
.gops-modal__content h4 {
    margin: 1em 0 0.3em;
    font-size: 15px;
    color: var(--gops-color-primary);
    font-weight: 600;
}
.gops-modal__content h3:first-child,
.gops-modal__content h4:first-child {
    margin-top: 0;
}
.gops-modal__content ul {
    margin: 0 0 0.8em 0;
    padding: 0 0 0 1.4em;
    list-style-type: disc !important;
}
.gops-modal__content li {
    margin-bottom: 0.3em;
    display: list-item !important;
}
.gops-modal__content p {
    margin: 0 0 0.6em;
}
.gops-modal__footer{margin-top:8px;display:flex;justify-content:flex-end;border-top:1px solid var(--gops-color-border);padding-top:10px}

/* Brand primary button styling within our admin */
.gops-admin .button.button-primary{
    background: var(--gops-color-primary);
    border-color: var(--gops-color-primary);
    color:#fff;
    font-weight: 600;
}
.gops-admin .button.button-primary:hover{
    background: var(--gops-color-primary-2);
    border-color: var(--gops-color-primary-2);
}
.gops-admin .button.button-primary:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(151, 91, 229, 0.35)}

/* Brand secondary buttons (Deactivate etc.) */
.gops-admin .button:not(.button-primary){
    color: var(--gops-color-muted);
    border-color: var(--gops-color-border);
    background: #fff;
}
.gops-admin .button:not(.button-primary):hover{
    color: var(--gops-color-primary);
    border-color: var(--gops-color-primary);
}

/* Branded card variant for overview */
.gops-card--brand{
    background:
        radial-gradient(circle at 20% 0%, rgba(118,55,225,.12), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(48,210,255,.12), transparent 55%),
        #fbfaff;
    border-color: rgba(118,55,225,.3);
}
.gops-card--brand .gops-title{color:#2b2353;font-weight:600}
.gops-card--brand p{color:#3b3650}

/* Runtime Markdown docs */
.gops-docs{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:18px;align-items:start;max-width:1280px}
.gops-docs--single{display:block;max-width:1120px}
.gops-docs.is-loading .gops-docs__article-wrap{opacity:.55;pointer-events:none}
.gops-docs__nav{position:sticky;top:42px;background:#fff;border:1px solid var(--gops-color-border);border-radius:8px;padding:10px;box-shadow:0 8px 22px rgba(26,20,41,.05)}
.gops-docs__nav-group + .gops-docs__nav-group{margin-top:12px;padding-top:12px;border-top:1px solid #EEE9FA}
.gops-docs__nav-title{display:flex;align-items:center;justify-content:space-between;width:100%;margin:0;padding:7px 8px;border:0;border-radius:7px;background:transparent;color:#5E3FA3;font:inherit;font-size:11px;font-weight:700;line-height:1.3;text-align:left;text-transform:uppercase;cursor:pointer}
.gops-docs__nav-title:hover{background:#F6F7FB;color:var(--gops-color-primary)}
.gops-docs__nav-title:focus-visible{outline:2px solid rgba(151,91,229,.35);outline-offset:2px}
.gops-docs__nav-title::before{content:"";width:0;height:0;margin-right:7px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:5px solid currentColor;transition:transform .15s ease}
.gops-docs__nav-title[aria-expanded="true"]::before{transform:rotate(90deg)}
.gops-docs__nav-title span:first-child{flex:1}
.gops-docs__nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#EEE9FA;color:#5E3FA3;font-size:10px;line-height:1}
.gops-docs__nav-list{display:none;margin:4px 0 0;padding:0;list-style:none}
.gops-docs__nav-list.is-open{display:block}
.gops-docs__nav-list li{margin:0}
.gops-docs__nav-link{display:flex;align-items:flex-start;width:100%;min-height:36px;margin:0;padding:8px 10px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--gops-color-text);text-align:left;text-decoration:none;font:inherit;font-size:13px;font-weight:500;line-height:1.35;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease}
.gops-docs__nav-link:hover{background:#F6F7FB;color:var(--gops-color-primary);text-decoration:none}
.gops-docs__nav-link:focus-visible{outline:2px solid rgba(151,91,229,.35);outline-offset:2px}
.gops-docs__nav-link.is-active{background:var(--gops-color-primary-soft);border-color:var(--gops-color-border);color:var(--gops-color-primary);box-shadow:inset 3px 0 0 var(--gops-color-primary)}
.gops-docs__nav-link:disabled{cursor:progress;opacity:.65}
.gops-docs__nav-link-title{display:block}
.gops-docs__article-region{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,220px);gap:18px;align-items:start;min-width:0}
.gops-docs__article-wrap{min-width:0;transition:opacity .15s ease}
.gops-docs__toc{position:sticky;top:42px;background:#fff;border:1px solid var(--gops-color-border);border-radius:8px;padding:12px;box-shadow:0 8px 22px rgba(26,20,41,.05)}
.gops-docs__toc.is-empty{display:none}
.gops-docs__toc-title{margin:0 0 8px;color:#5E3FA3;font-size:11px;font-weight:700;line-height:1.3;text-transform:uppercase}
.gops-docs__toc-list{margin:0;padding:0;list-style:none}
.gops-docs__toc-item{margin:0}
.gops-docs__toc-item a{display:block;padding:5px 0;color:var(--gops-color-muted);font-size:12px;font-weight:500;line-height:1.35;text-decoration:none}
.gops-docs__toc-item a:hover{color:var(--gops-color-primary);text-decoration:none}
.gops-docs__toc-item--level-3 a{padding-left:10px}
.gops-docs__toc-item--level-4 a{padding-left:20px}
.gops-docs__article{background:#fff;border:1px solid var(--gops-color-border);border-radius:8px;box-shadow:0 10px 28px rgba(26,20,41,.06);overflow:hidden}
.gops-docs__article:focus{outline:0}
.gops-docs__article-header{padding:20px 22px 16px;border-bottom:1px solid #EEE9FA;background:#fff}
.gops-docs__category-kicker{display:inline-flex;align-items:center;margin:0 0 8px;color:#5E3FA3;font-size:11px;font-weight:700;line-height:1.2;text-transform:uppercase}
.gops-docs__article-title{margin:0;color:var(--gops-color-text);font-size:24px;line-height:1.25;font-weight:700}
.gops-docs__body{padding:20px 22px 24px;color:var(--gops-color-text);font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.gops-docs__body > :first-child{margin-top:0}
.gops-docs__body > :last-child{margin-bottom:0}
.gops-docs__body h1,
.gops-docs__body h2,
.gops-docs__body h3,
.gops-docs__body h4,
.gops-docs__body h5,
.gops-docs__body h6{color:var(--gops-color-text);line-height:1.3;margin:1.45em 0 .55em;font-weight:700}
.gops-docs__body h1{font-size:24px}
.gops-docs__body h2{font-size:20px;padding-bottom:6px;border-bottom:1px solid #EEE9FA}
.gops-docs__body h3{font-size:17px;color:#5E3FA3}
.gops-docs__body p{margin:.8em 0;color:var(--gops-color-text)}
.gops-docs__body ul,
.gops-docs__body ol{margin:.8em 0 .8em 1.35em;padding:0}
.gops-docs__body li{margin:.3em 0}
.gops-docs__body a{color:#5F6EEA;text-decoration:none}
.gops-docs__body a:hover{text-decoration:underline;color:#4A57C6}
.gops-docs__body code{background:#F6F7FB;border:1px solid #E1E4EC;border-radius:4px;padding:1px 5px;font-size:13px;color:#3A1D6F}
.gops-docs__body pre{margin:14px 0;padding:14px 16px;overflow:auto;background:#1E1B2E;color:#fff;border-radius:8px;line-height:1.5}
.gops-docs__body pre code{display:block;background:transparent;border:0;color:inherit;padding:0}
.gops-docs__body blockquote{margin:14px 0;padding:10px 14px;border-left:4px solid var(--gops-color-primary);background:#F6F7FB;color:var(--gops-color-muted)}
.gops-docs__body table{width:100%;border-collapse:collapse;margin:14px 0;font-size:13px}
.gops-docs__body th,
.gops-docs__body td{border:1px solid #DCE0EA;padding:8px 10px;text-align:left;vertical-align:top}
.gops-docs__body th{background:#F6F7FB;color:var(--gops-color-text);font-weight:700}
.gops-docs__body tr:nth-child(even) td{background:#FBFCFF}
.gops-docs__body hr{border:0;border-top:1px solid var(--gops-color-border);margin:18px 0}

@media (max-width: 782px){
    .gops-docs{grid-template-columns:1fr}
    .gops-docs__article-region{grid-template-columns:1fr}
    .gops-docs__nav{position:static}
    .gops-docs__toc{position:static;order:-1}
    .gops-docs__article-header{padding:18px 18px 14px}
    .gops-docs__article-title{font-size:21px}
    .gops-docs__body{padding:18px}
    .gops-tabs{display:flex;flex-wrap:wrap;border-radius:12px}
    .gops-tab{border-radius:8px}
}

/* Data tables (console / inventory / analytics) */
.gops-table{width:100%;border-collapse:collapse;margin:4px 0;font-size:13px;background:#fff;border:1px solid var(--gops-color-border);border-radius:8px;overflow:hidden}
.gops-table th,.gops-table td{padding:10px 12px;text-align:left;vertical-align:middle;border-bottom:1px solid #EEE9FA}
.gops-table th{background:var(--gops-color-primary-soft);color:var(--gops-color-text);font-weight:700}
.gops-table tr:last-child td{border-bottom:0}
.gops-table tbody tr:hover td{background:#FBFCFF}
.gops-table__num{text-align:right;font-variant-numeric:tabular-nums}
.gops-table__actions{text-align:right;white-space:nowrap}
.gops-table .button{margin:0}

/* Empty state */
.gops-empty{text-align:center;color:var(--gops-color-muted);padding:28px 16px}
.gops-empty__title{margin:0 0 6px;color:var(--gops-color-text);font-size:16px;font-weight:600}
.gops-empty__msg{margin:0 0 14px}

/* Compact stat tiles (analytics summaries) */
.gops-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0 0 16px}
.gops-stat{background:#fff;border:1px solid var(--gops-color-border);border-radius:var(--gops-radius);padding:14px 16px;box-shadow:var(--gops-shadow-subtle)}
.gops-stat__value{font-size:24px;font-weight:700;color:var(--gops-color-text);line-height:1.1}
.gops-stat__label{margin-top:4px;color:var(--gops-color-muted);font-size:12px;font-weight:500}

/* Native settings form fields */
.gops-field{margin:0 0 16px}
.gops-field__label{display:block;font-weight:600;color:var(--gops-color-text);margin-bottom:4px}
.gops-field__desc{display:block;color:var(--gops-color-muted);font-size:12px;margin-top:4px}
.gops-field input.regular-text,.gops-field select,.gops-field textarea{border-color:var(--gops-color-border);border-radius:6px}
.gops-field--checkbox label{font-weight:500;color:var(--gops-color-text)}

/* Freemius native tabs fallback hide (in case JS shim misses)
    Scope to common Freemius containers to avoid affecting other screens */
#fs_account .nav-tab-wrapper,
#fs_account .fs-tabs,
#fs_account .fs-submenu,
.fs-section .nav-tab-wrapper,
.fs-section .fs-tabs,
.fs-section .fs-submenu{
    display: none !important;
}
