/*
 * Control panel redesign.
 *
 * Plain css on purpose, like media-library.css: looksomething.min.css is
 * compiled from sass and this file needs no build step. It is loaded after the
 * compiled sheet, so rules here win over it. Tokens are the --bo-* set from the
 * design handoff (backoffice-theme.css / tokens/backoffice.css).
 */

/*
 * Manrope, self-hosted (variable font, weights 200-800, SIL Open Font License,
 * see assets/fonts/manrope/OFL.txt). Hosted here rather than loaded from
 * Google so visitors' addresses are not sent to a third party.
 */
@font-face {
   font-family: "Manrope";
   font-style: normal;
   font-weight: 200 800;
   font-display: swap;
   src: url("../fonts/manrope/manrope-cyrillic.woff2") format("woff2");
   unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
   font-family: "Manrope";
   font-style: normal;
   font-weight: 200 800;
   font-display: swap;
   src: url("../fonts/manrope/manrope-greek.woff2") format("woff2");
   unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
   font-family: "Manrope";
   font-style: normal;
   font-weight: 200 800;
   font-display: swap;
   src: url("../fonts/manrope/manrope-latin-ext.woff2") format("woff2");
   unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
   font-family: "Manrope";
   font-style: normal;
   font-weight: 200 800;
   font-display: swap;
   src: url("../fonts/manrope/manrope-latin.woff2") format("woff2");
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
   --bo-primary: #5258f6;
   --bo-primary-hover: #393fde;
   --bo-primary-tint: #ced2f6;
   --bo-primary-soft: #a4aefe;
   --bo-primary-chip: #e8e9fe;
   --bo-turquoise: #80f3e2;
   --bo-ink: #2d2d2d;
   --bo-page: #f1f5f9;
   --bo-surface-tint: #f9faff;
   --bo-hover-grey: #f1f2f6;
   --bo-border: #cbd5e1;
   --bo-muted: #979797;
   --bo-slate: #64748b;
   --bo-success: #0d7b0d;
   --bo-error: #cf0000;
   --bo-offline: #b91c1c;
   --bo-nav-icon: #a9adf9;
   --bo-font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
   --bo-shadow-pop: 0 3px 16px rgba(45, 45, 45, 0.28);
}

body {
   font-family: var(--bo-font);
}

/* ------------------------------------------------------------------ */
/* Sidebar: app block                                                  */
/* ------------------------------------------------------------------ */

.header-vertical .installation-container {
   position: relative;
   overflow: visible;
}

.header-vertical .installation-container .label {
   color: var(--bo-primary-tint);
   font-size: 16px;
   line-height: 20px;
}

.header-vertical .installation-container.is-network .installation-row {
   cursor: pointer;
}

.header-vertical .installation-container .installation-row .img-container {
   flex: none;
   width: 40px;
   height: 40px;
   background: #fff;
   border: 1px solid var(--bo-border);
   border-radius: 50%;
   overflow: hidden;
}

.header-vertical .installation-container .installation-row .img-container img {
   object-fit: contain;
   padding: 3px;
}

.header-vertical .installation-container .installation-row .details {
   min-width: 0;
}

.header-vertical .installation-container .installation-row .details .title {
   color: #fff;
   font-size: 18px;
   line-height: 22px;
   font-weight: 700;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.header-vertical .installation-container .installation-row .details .status {
   color: #fff;
   font-size: 12px;
   line-height: 14px;
   margin-top: 5px;
}

.header-vertical .installation-container .installation-row .actions {
   gap: 6px;
   transition: transform 0.2s;
}

.header-vertical .installation-container .installation-row .actions img {
   display: block;
   width: 14px;
}

.header-vertical .installation-container.is-open .installation-row .actions {
   transform: rotate(180deg);
}

/* ------------------------------------------------------------------ */
/* Sidebar: network switcher                                           */
/* ------------------------------------------------------------------ */

.ls-app-switcher {
   position: absolute;
   left: 12px;
   right: 12px;
   top: calc(100% - 6px);
   z-index: 60;
   background: #fff;
   border-radius: 8px;
   box-shadow: 0 14px 34px rgba(3, 3, 3, 0.35);
   overflow: hidden;
}

.ls-app-switcher[hidden] {
   display: none;
}

.ls-app-switcher .ls-app-switcher-title {
   padding: 10px 14px 6px;
   font-size: 11px;
   line-height: 14px;
   font-weight: 700;
   letter-spacing: 0.08em;
   color: var(--bo-slate);
}

.ls-app-switcher .ls-app-switcher-item {
   display: flex;
   align-items: center;
   gap: 10px;
   padding: 9px 14px;
   text-decoration: none;
   transition: background 0.15s;
}

.ls-app-switcher .ls-app-switcher-item:hover {
   background: var(--bo-page);
}

.ls-app-switcher .ls-app-switcher-item.current {
   background: var(--bo-primary-chip);
}

.ls-app-switcher .ls-app-switcher-item .logo {
   flex: none;
   width: 34px;
   height: 34px;
   border-radius: 50%;
   border: 1px solid var(--bo-border);
   background: #fff;
   display: flex;
   align-items: center;
   justify-content: center;
   overflow: hidden;
}

.ls-app-switcher .ls-app-switcher-item .logo img {
   max-width: 80%;
   max-height: 80%;
}

.ls-app-switcher .ls-app-switcher-item .meta {
   flex: 1;
   min-width: 0;
}

.ls-app-switcher .ls-app-switcher-item .name {
   display: block;
   font-size: 14px;
   line-height: 18px;
   font-weight: 600;
   color: var(--bo-ink);
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.ls-app-switcher .ls-app-switcher-item.current .name {
   font-weight: 700;
}

.ls-app-switcher .ls-app-switcher-item .sub {
   display: flex;
   align-items: center;
   gap: 6px;
   font-size: 12px;
   line-height: 16px;
   color: var(--bo-slate);
}

.ls-app-switcher .ls-app-switcher-item .check {
   color: var(--bo-primary);
   font-weight: 700;
}

.ls-app-switcher .ls-app-switcher-all {
   display: flex;
   justify-content: space-between;
   padding: 11px 14px;
   border-top: 1px solid var(--bo-border);
   font-size: 13px;
   line-height: 16px;
   font-weight: 700;
   color: var(--bo-primary);
   text-decoration: none;
}

.ls-app-switcher .ls-app-switcher-all span {
   color: var(--bo-primary);
}

/* ------------------------------------------------------------------ */
/* Sidebar: grouped navigation                                         */
/* ------------------------------------------------------------------ */

.header-vertical .navigation-container {
   gap: 0;
   padding-bottom: 100px;
}

.header-vertical .navigation-container .navigation-item {
   position: relative;
   align-items: center;
   gap: 12px;
   padding: 14px 20px;
   text-decoration: none;
   transition: background 0.2s, padding-left 0.2s;
}

.header-vertical .navigation-container .navigation-item .label {
   flex: 1 1 auto;
   min-width: 0;
   color: #fff;
   font-size: 16px;
   line-height: 20px;
}

.header-vertical .navigation-container .navigation-item.main-label {
   margin-top: 0;
   padding: 24px 20px 10px;
   color: var(--bo-primary-tint);
   font-size: 16px;
   line-height: 20px;
   cursor: default;
}

.header-vertical .navigation-container .navigation-item:not(.main-label):hover {
   background: rgba(255, 255, 255, 0.08);
   padding-left: 26px;
}

.header-vertical .navigation-container .navigation-item.active,
.header-vertical .navigation-container .navigation-item.active:hover {
   background: var(--bo-primary);
   border-right: 0;
   padding-left: 26px;
}

.header-vertical .navigation-container .navigation-item.active::before {
   content: "";
   position: absolute;
   left: 0;
   top: 0;
   bottom: 0;
   width: 4px;
   background: var(--bo-turquoise);
}

.header-vertical .navigation-container .navigation-item .ls-nav-icon {
   flex: none;
   display: flex;
   width: 20px;
   max-width: 20px;
}

.header-vertical .navigation-container .navigation-item .ls-icon {
   display: block;
   stroke: var(--bo-nav-icon);
}

/* Locked by plan: stays in place, dimmed and desaturated, small padlock on the
   right. Hover brightens it a little. The current page is never dimmed. */
.header-vertical .navigation-container .navigation-item.locked {
   opacity: 0.5;
   filter: grayscale(1);
   transition: opacity 0.15s, background 0.2s, padding-left 0.2s;
}

.header-vertical .navigation-container .navigation-item.locked:hover {
   opacity: 0.85;
}

.header-vertical .navigation-container .navigation-item.locked.active {
   opacity: 1;
   filter: none;
}

.header-vertical .navigation-container .navigation-item .ls-nav-lock {
   flex: none;
   margin-left: auto;
   display: inline-flex;
   align-items: center;
}

/* ------------------------------------------------------------------ */
/* Upgrade page (feature not in the plan)                              */
/* ------------------------------------------------------------------ */

.plan-upgrade .ls-upgrade-wrap {
   width: calc(100% - 60px);
   max-width: 900px;
   margin: 30px auto 0;
}

.plan-upgrade .ls-upgrade-card {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 28px;
   padding: 32px 28px;
}

.plan-upgrade .ls-upgrade-mascot {
   flex: 0 0 auto;
   padding: 0 14px 14px 0;
}

.plan-upgrade .ls-mascot-lock {
   position: relative;
   display: inline-block;
   width: 120px;
   line-height: 0;
}

.plan-upgrade .ls-mascot-lock img {
   display: block;
   width: 100%;
   height: auto;
}

.plan-upgrade .ls-mascot-lock-badge {
   position: absolute;
   right: -14px;
   bottom: -14px;
   width: 55px;
   height: 55px;
   padding: 12px;
   box-sizing: border-box;
   display: flex;
   align-items: center;
   justify-content: center;
   background: var(--bo-turquoise);
   border: 2px solid #fff;
   border-radius: 50%;
}

.plan-upgrade .ls-mascot-lock-badge .ls-icon {
   width: 100%;
   height: 100%;
   stroke: var(--bo-ink);
   stroke-width: 2.4;
}

.plan-upgrade .ls-mascot-lock-badge .ls-icon rect {
   fill: var(--bo-ink);
}

.plan-upgrade .ls-upgrade-body {
   flex: 1 1 320px;
   min-width: 0;
   display: flex;
   flex-direction: column;
   gap: 12px;
}

.ls-plan-chip {
   align-self: flex-start;
   padding: 4px 12px;
   background: var(--bo-primary-chip);
   border-radius: 12px;
   color: var(--bo-primary);
   font-size: 12px;
   line-height: 16px;
   font-weight: 700;
}

.plan-upgrade .ls-upgrade-title {
   margin: 0;
   font-size: 24px;
   line-height: 30px;
   font-weight: 700;
   color: var(--bo-ink);
}

.plan-upgrade .ls-upgrade-pitch {
   margin: 0;
   font-size: 15px;
   line-height: 23px;
   color: var(--bo-slate);
}

.plan-upgrade .ls-upgrade-benefits {
   margin: 4px 0 0;
   padding-left: 18px;
}

.plan-upgrade .ls-upgrade-benefits li {
   font-size: 14px;
   line-height: 24px;
}

.plan-upgrade .ls-upgrade-actions {
   display: flex;
   flex-wrap: wrap;
   gap: 12px;
   margin-top: 8px;
}

.plan-upgrade .ls-upgrade-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-height: 44px;
   padding: 0 30px;
   border-radius: 6px;
   font-size: 14px;
   line-height: 16px;
   text-decoration: none;
   white-space: nowrap;
   transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
}

.plan-upgrade .ls-upgrade-btn:hover {
   transform: translateY(-1px);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.plan-upgrade .ls-upgrade-btn:active {
   transform: scale(0.96);
   box-shadow: none;
}

.plan-upgrade .ls-upgrade-btn.primary {
   background: var(--bo-primary);
   color: #fff;
}

.plan-upgrade .ls-upgrade-btn.primary:hover {
   background: var(--bo-primary-hover);
}

.plan-upgrade .ls-upgrade-btn.white {
   background: #fff;
   border: 1px solid var(--bo-border);
   color: var(--bo-ink);
}

.plan-upgrade .ls-upgrade-btn.white:hover {
   background: var(--bo-hover-grey);
}

/* ------------------------------------------------------------------ */
/* Sticky page header and save bar                                     */
/* ------------------------------------------------------------------ */

/* Below the top bar (z-index 10), above the page, below the drawer
   backdrop (20) and the drawers (30). */
.ls-page-header {
   position: sticky;
   top: 75px;
   z-index: 8;
}

/* On pages where the header sits alone in its own container, the container is
   exactly as tall as the header, so the header would have no room to stay put
   while the page scrolls. Let the header belong to the page section instead,
   and carry the container's offsets with it. */
.general-section > .general-container:has(> .ls-page-header:only-child) {
   display: contents;
}

.general-section > .general-container:has(> .ls-page-header:only-child) > .ls-page-header {
   margin: 75px 0 75px 315px;
}

.ls-page-header .top {
   min-height: 44px;
}

.ls-page-header .top .title {
   flex: 1 1 auto;
   min-width: 0;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

/* The page's own save button is replaced by the one in the header. */
.ls-button-container[hidden],
.ls-button[hidden] {
   display: none !important;
}

.ls-save-bar {
   flex: none;
   margin-left: auto;
   display: flex;
   align-items: center;
   gap: 14px;
}

.ls-save-bar .ls-save-status {
   font-size: 13px;
   line-height: 16px;
   color: var(--bo-slate);
}

.ls-save-bar .ls-save-status.is-error {
   color: var(--bo-offline);
   font-weight: 600;
   animation: ls-fade-in 0.25s ease;
}

.ls-save-bar .ls-save-btn {
   position: relative;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 6px;
   min-width: 150px;
   min-height: 44px;
   padding: 0 30px;
   border: 0;
   border-radius: 6px;
   background: var(--bo-primary);
   color: #fff;
   font: inherit;
   font-size: 14px;
   line-height: 16px;
   white-space: nowrap;
   cursor: pointer;
   transition: background 0.2s, opacity 0.2s, transform 0.12s;
}

.ls-save-bar .ls-save-btn * {
   color: inherit;
}

.ls-save-bar .ls-save-btn:hover:not(:disabled) {
   background: var(--bo-primary-hover);
}

.ls-save-bar .ls-save-btn:active:not(:disabled) {
   transform: scale(0.96);
}

.ls-save-bar .ls-save-btn:disabled {
   opacity: 0.5;
   cursor: default;
}

.ls-save-bar .ls-save-btn.is-busy {
   pointer-events: none;
}

.ls-save-bar .ls-save-btn.is-done {
   background: var(--bo-success);
   animation: ls-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.ls-save-bar .ls-save-btn.is-error {
   background: var(--bo-offline);
   animation: ls-shake 0.45s ease;
}

.ls-save-bar .ls-save-spinner {
   width: 14px;
   height: 14px;
   border: 2px solid rgba(255, 255, 255, 0.4);
   border-top-color: #fff;
   border-radius: 50%;
   animation: ls-spin 0.8s linear infinite;
}

.ls-save-bar .ls-save-sparks {
   position: absolute;
   left: 50%;
   top: 50%;
   width: 0;
   height: 0;
   pointer-events: none;
}

.ls-save-bar .ls-save-sparks i {
   position: absolute;
   left: -3px;
   top: -3px;
   width: 6px;
   height: 6px;
   border-radius: 50%;
   animation: ls-spark 0.7s ease-out forwards;
}

@keyframes ls-fade-in {
   from { opacity: 0; transform: translateX(8px); }
   to { opacity: 1; transform: none; }
}

@keyframes ls-pop {
   0% { transform: scale(0.9); }
   45% { transform: scale(1.14); }
   100% { transform: scale(1); }
}

@keyframes ls-shake {
   0%, 100% { transform: translateX(0); }
   20% { transform: translateX(-6px); }
   40% { transform: translateX(5px); }
   60% { transform: translateX(-3px); }
   80% { transform: translateX(2px); }
}

@keyframes ls-spin {
   to { transform: rotate(360deg); }
}

@keyframes ls-spark {
   0% { transform: rotate(var(--a)) translateX(10px); opacity: 1; }
   100% { transform: rotate(var(--a)) translateX(46px) scale(0.3); opacity: 0; }
}

/* ------------------------------------------------------------------ */
/* Empty states                                                        */
/* ------------------------------------------------------------------ */

.ls-empty-state {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 8px;
   padding: 48px 20px;
   text-align: center;
}

.ls-empty-state[hidden] {
   display: none;
}

.ls-empty-state .ls-empty-mascot {
   height: auto;
   max-width: 100%;
   animation: ls-float 3.6s ease-in-out infinite;
}

.ls-empty-state .ls-empty-title {
   font-size: 18px;
   line-height: 24px;
   font-weight: 700;
   color: var(--bo-ink);
}

.ls-empty-state .ls-empty-text {
   max-width: 380px;
   font-size: 14px;
   line-height: 21px;
   color: var(--bo-slate);
}

/* The list (and its "Show more") steps aside while the empty state shows. */
.ls-is-empty {
   display: none !important;
}

@keyframes ls-float {
   0%, 100% { transform: translateY(0) rotate(-1.2deg); }
   50% { transform: translateY(-5%) rotate(1.2deg); }
}

@media (prefers-reduced-motion: reduce) {
   .ls-empty-state .ls-empty-mascot {
      animation: none;
   }

   .header-vertical .navigation-container .navigation-item,
   .plan-upgrade .ls-upgrade-btn,
   .header-vertical .installation-container .installation-row .actions,
   .ls-save-bar .ls-save-btn {
      transition: none;
   }

   .ls-save-bar .ls-save-btn.is-done,
   .ls-save-bar .ls-save-btn.is-error,
   .ls-save-bar .ls-save-status.is-error,
   .ls-save-bar .ls-save-sparks i {
      animation: none;
   }

   .ls-save-bar .ls-save-spinner {
      animation-duration: 2s;
   }
}
