/* ==========================================================================
   21-col2order.css — THE GRIP ON EACH SECTION OF COLUMN TWO

   The grip sits in the GUTTER, outside the card, not inside it.

   Inside was tried first and there is nowhere for it to go. Five of these
   cards draw their own heading bar with an Edit button at one end and the
   section's name at the other, so the top left of the card is the first
   letter of a title and the top right is a button -- a grip in either place
   reads as part of something else. The gutter between the columns is 24px
   and holds nothing, so that is where it goes: clear of the card's own
   furniture, and plainly about the card beside it.

   It is drawn for everybody and SHOWN only under body.c2-reorderable, which
   js/80-col2order.js puts on the body for an administrator. One class to
   toggle rather than ten listeners to add and remove.

   Not on a narrow screen. Below 1151px the document is two columns and
   below 640px it is one, where there is no gutter to put a grip in -- and
   dragging a stacked column on a phone is not something to encourage
   anyway. The order still applies there; it is only setting it that wants a
   desktop.

   Nothing to drag on paper, or in a PDF export.
   ========================================================================== */

.c2-grip {
  display: none;
  position: absolute;
  left: -20px;
  top: 2px;
  width: 16px;
  text-align: center;
  cursor: grab;
  color: var(--muted);
  opacity: .3;
  font-size: 14px;
  line-height: 1.2;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity .15s, color .15s;
  /* Above the card's background, below any modal. */
  z-index: 2;
}

body.c2-reorderable .document-grid > .col2 > .module-card > .c2-grip {
  display: block;
}

/* Quiet until you go looking for it, then unmistakable. The same manners as
   the Curate page's grip and the Options menu's handle. */
body.c2-reorderable .document-grid > .col2 > .module-card:hover > .c2-grip {
  opacity: .85;
}
.c2-grip:hover  { opacity: 1 !important; color: var(--cyan); }
.c2-grip:active { cursor: grabbing; }

/* The section being carried. Faint rather than hidden, so the column does
   not appear to lose a section mid-drag. */
.document-grid > .col2 > .module-card.is-c2-dragging {
  opacity: .4;
  outline: 1.5px dashed var(--cyan);
}

/* The section it would land beside. */
.document-grid > .col2 > .module-card.c2-drop-here {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, .12);
}

/* No gutter to sit in. */
@media screen and (max-width: 1150px) {
  .c2-grip { display: none !important; }
}

@media print {
  .c2-grip { display: none !important; }
}
.pdf-exp .c2-grip { display: none !important; }
