/* Rhino (TipTap) rich-text output, rendered identically on every web surface:
   the Avo editor, the Avo show page, the parent portal, the leader portal and dynamic forms.

   Mirrors the editor's own trix.css (rhino-editor gem): everything margin/padding 0, so what an
   admin types is what a parent sees. Keep in sync with RichText::Mail (lib/rich_text/mail.rb),
   which inlines the same rules for mail clients that ignore <style>.

   `.ka-richtext` is emitted by the `rich_text` helper (app/helpers/rich_text_helper.rb). */

.ka-richtext {
  overflow-wrap: break-word;
  word-break: break-word;
}

.ka-richtext p,
.ka-richtext figure,
.ka-richtext h1,
.ka-richtext h2,
.ka-richtext h3,
.ka-richtext h4,
.ka-richtext h5,
.ka-richtext h6 {
  /* !important: MDB ships `.card .card-body p {margin-bottom:1rem}` and friends, which outrank any
     sane single-class selector. This block is the normalization layer, so it has to win. */
  margin: 0 !important;
  padding: 0 !important;
}

/* TipTap emits <p></p> for a blank line; without content it would collapse to zero height */
.ka-richtext p:empty::before {
  content: "\00a0";
  display: inline-block;
}

.ka-richtext h1 { font-size: 1.2em; line-height: 1.2; font-weight: 700; }
.ka-richtext h2 { font-size: 1.1em; line-height: 1.2; font-weight: 700; }
.ka-richtext h3,
.ka-richtext h4,
.ka-richtext h5,
.ka-richtext h6 { font-size: 1em; line-height: 1.2; font-weight: 700; }

/* editor: 1rem above the list, 1.5rem indent on the list + 1em on the li (Tailwind preflight in
   the admin also kills the markers, hence the explicit list-style below) */
.ka-richtext ul,
.ka-richtext ol {
  margin: 1rem 0 0 !important;
  padding: 0 0 0 1.5rem !important;
}
.ka-richtext ul { list-style: disc; }
.ka-richtext ol { list-style: decimal; }
.ka-richtext li { margin: 0 0 0 1em !important; padding: 0 !important; }
.ka-richtext li > p { margin: 0 !important; }

.ka-richtext img,
.ka-richtext svg {
  max-width: 100%;
  height: auto;
}

.ka-richtext a {
  text-decoration: underline;
}

.ka-richtext blockquote {
  margin: 0;
  border: 0 solid #ccc;
  border-inline-start-width: 0.3em;
  margin-inline-start: 0.3em;
  padding-inline-start: 0.6em;
}

.ka-richtext pre {
  display: block;
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  background-color: #eee;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.ka-richtext hr {
  margin: 0.5rem 0;
}

.ka-richtext table {
  border-collapse: collapse;
  max-width: 100%;
  margin: 0 0 0.5rem;
}
.ka-richtext th,
.ka-richtext td {
  border: 1px solid #d1d5db;
  padding: 0.25rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
/*

 */

.bg-body-tertiary , .bg-tertiary{
  background-color: #f6f6f6 !important;
}

.tighter{
  margin-top: -0.3rem;
}

/*  =========================== FORMS =========================== */
#momentumtools-form .col {
  flex: auto !important;
}

#momentumtools-form .checkbox , #momentumtools-form .radio {
  width: 100%;
}

#momentumtools-form .choices__list--dropdown[aria-expanded="false"] {
  display: none;
}
#momentumtools-form .choices__list--dropdown[aria-expanded="true"] {
  display: block;
}

#momentumtools-form .form-group {
  padding-top: 12px;
}

#momentumtools-form .form-control.input, #momentumtools-form .form-control {
  width: 100%;
}

#momentumtools-form .glyphicon-remove::before {
  font-family: 'bootstrap-icons';
  content: "\F5DE"; /* trashbin */
}

/*  =========================== TILES =========================== */
.card-hover {
  overflow: hidden;
  width: 100%;
}  

.card-hover:hover .zoom-on-hover {
  transform: scale(1.1);
}   

.zoom-on-hover {
  transition: transform 0.3s ease;
}

/*  =========================== TILES FILTER DROPDOWNS =========================== */

/* Choices JS dropdowns */
/* fix for safari 16.1 might be fixed in later versions */
/* https://github.com/Choices-js/Choices/issues/1056#issuecomment-1265329312 */
.choices .choices__list.choices__list--dropdown { 
  visibility: visible !important;
}
.choices .choices__list--dropdown,
.choices .choices__list[aria-expanded]{
  margin-top: 0px;
}
.choices.is-open .choices__list--dropdown, 
.choices.is-open .choices__list[aria-expanded]{
  margin-top: -1px;
}

/*  =========================== SIGN CONTRACT =========================== */

#signpad {
  border: 1px solid black;
} 

/*  =========================== NOTIFICATIONS =========================== */

/* buzzing animation to be still for 90% of the time and buzz in the other 10 */
@keyframes buzz {
  0% {
    transform: translateX(0);
  }
  91%, 93%, 95%, 97%, 99% {
    transform: translateX(-2px);
  }
  90%, 92%, 94%, 96%, 98%, 100% {
    transform: translateX(1px);
  }
}
.buzzing-badge {
  animation: buzz 4s ease-in-out infinite;
  animation-delay: 6s;  /* Only start after 6+4 seconds on the same page */
}

/* buttons apearing with delay */
.delayed-item {
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: appear 0.5s forwards var(--delay);
}
@keyframes appear {
  to {
    opacity: 1;
  }
}

/*  =========================== SCROLL =========================== */

/* Dont scroll behind the head menu */
:target::before {
  content: "";
  display: block;
  height: 80px;
  margin-top: -80px;
}


/*  =========================== PWA =========================== */

/* PWA apple install */
/* .ios-prompt {
  display: none;
} */

/*  =========================== BLOG =========================== */

/* square video images (also using javascript) */
.image-cropper {
  width: 100px;
  height: 100px;
  overflow: hidden;
  position: relative;
  display: inline-block;
  vertical-align: top;
}

.image-cropper img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.emoji_vote {
	font-size: 1.2em;
	margin-right: 5px;
	cursor: pointer;
 }
