/* 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}

/* 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;
}
