/* Canvas sync split button and sync progress banner.
   Layer: components. */
@layer components {
  /* Split Sync Action Group */
  .sync-split-container {
    position: relative;
    display: inline-flex;
    align-items: stretch;
  }

  .sync-split-container .btn-util-sync {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
  }

  .btn-sync-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 38px;
    background: var(--color-academy-blue);
    color: var(--ds-color-text-inverse);
    border: 1px solid var(--ds-academy-700-alt);
    border-left: 1px solid var(--ds-white-a25);
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--ds-transition-all-150-ease);
    box-shadow: var(--ds-shadow-1-2-black-a06);
  }

  .btn-sync-toggle:hover {
    background: var(--color-academy-hover);
  }

  .sync-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 280px;
    background: var(--ds-color-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px var(--ds-black-a12), 0 4px 6px -2px var(--ds-black-a05);
    z-index: var(--ds-z-overlay);
    padding: var(--ds-space-35);
  }

  .sync-dropdown-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: var(--ds-space-65);
    padding: var(--ds-space-65) var(--ds-space-75);
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: var(--ds-transition-background-150-ease);
    font-family: inherit;
  }

  .sync-dropdown-item:hover {
    background: var(--ds-color-surface-muted);
  }

  .sync-item-icon {
    margin-top: var(--ds-space-2px);
    color: var(--color-academy-blue);
    flex-shrink: 0;
  }

  .sync-item-content {
    flex: 1;
  }

  .sync-item-title {
    font-size: var(--ds-font-size-84);
    font-weight: var(--ds-font-weight-semibold);
    color: var(--color-navy);
    display: flex;
    align-items: center;
    gap: var(--ds-space-45);
  }

  .sync-item-sub {
    font-size: var(--ds-font-size-74);
    color: var(--text-dim);
    margin-top: var(--ds-space-15);
    line-height: 1.25;
  }

  /* Sync Progress Banner */
  .sync-progress-banner {
    background: var(--ds-slate-100-alt5);
    border: 1px solid var(--ds-slate-300-alt3);
    border-left: 4px solid var(--color-navy);
    border-radius: var(--radius-sm);
    padding: var(--ds-space-85) var(--ds-space-115);
    margin-bottom: var(--ds-space-125);
  }

  .sync-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .sync-title {
    font-size: var(--ds-font-size-88);
    color: var(--color-navy);
  }

  .sync-progress-banner .quiet-spinner {
    border: 2px solid var(--ds-navy-800-a25);
    border-top-color: var(--color-navy);
  }
}

/* Former inline style attributes (moved from the templates in Phase 2).
   Layer: instance - element-specific rules that out-rank component and page rules,
   exactly like the inline styles they replace. */
@layer instance {
  .quiet-spinner--on-dark {
    border-top-color: var(--ds-white);
  }

  .quiet-spinner--on-light {
    border-top-color: var(--color-academy-blue);
  }

  .sync-banner__status {
    display: flex;
    align-items: center;
    gap: var(--ds-space-65);
  }

  .sync-banner__stop {
    background: var(--ds-red-100-alt);
    color: var(--ds-red-800-alt);
    border: 1px solid var(--ds-red-300-alt);
    padding: var(--ds-space-2px) var(--ds-space-8px);
    border-radius: var(--ds-radius-4px);
    font-size: var(--ds-font-size-72);
    cursor: pointer;
    font-weight: var(--ds-font-weight-semibold);
  }

  .sync-banner__progress {
    height: 6px;
    margin-top: var(--ds-space-50);
  }

  .sync-banner__note {
    font-size: var(--ds-font-size-75);
    color: var(--text-dim);
    margin-top: var(--ds-space-35);
  }
}
