trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none; }

trix-toolbar * {
  box-sizing: border-box; }

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto; }

trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px; }
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 1.5vw; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button-group:not(:first-child) {
        margin-left: 0; } }

trix-toolbar .trix-button-group-spacer {
  flex-grow: 1; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button-group-spacer {
      display: none; } }

trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent; }
  trix-toolbar .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-toolbar .trix-button.trix-active {
    background: #cbeefa;
    color: black; }
  trix-toolbar .trix-button:not(:disabled) {
    cursor: pointer; }
  trix-toolbar .trix-button:disabled {
    color: rgba(0, 0, 0, 0.125); }
  @media (max-width: 768px) {
    trix-toolbar .trix-button {
      letter-spacing: -0.01em;
      padding: 0 0.3em; } }

trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button--icon {
      height: 2em;
      max-width: calc(0.8em + 3.5vw); } }
  trix-toolbar .trix-button--icon::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.6;
    content: "";
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button--icon::before {
        right: 6%;
        left: 6%; } }
  trix-toolbar .trix-button--icon.trix-active::before {
    opacity: 1; }
  trix-toolbar .trix-button--icon:disabled::before {
    opacity: 0.125; }

trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%; }

trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-dialogs {
  position: relative; }

trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5; }

trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }
  trix-toolbar .trix-input--dialog.validate:invalid {
    box-shadow: #F00 0px 0px 1.5px 1px; }

trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none; }

trix-toolbar .trix-dialog--link {
  max-width: 600px; }

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline; }
  trix-toolbar .trix-dialog__link-fields .trix-input {
    flex: 1; }
  trix-toolbar .trix-dialog__link-fields .trix-button-group {
    flex: 0 0 content;
    margin: 0; }

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none; }

trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection, trix-editor [data-trix-mutable] ::-moz-selection {
  background: none; }

trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection, trix-editor [data-trix-mutable] ::selection {
  background: none; }

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection {
  background: highlight; }

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection {
  background: highlight; }

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent; }

trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight; }

trix-editor .attachment {
  position: relative; }
  trix-editor .attachment:hover {
    cursor: default; }

trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text; }

trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in; }
  trix-editor .attachment__progress[value="100"] {
    opacity: 0; }

trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }

trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center; }

trix-editor .trix-button-group {
  display: inline-flex; }

trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent; }
  trix-editor .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-editor .trix-button.trix-active {
    background: #cbeefa; }
  trix-editor .trix-button:not(:disabled) {
    cursor: pointer; }

trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }
  trix-editor .trix-button--remove::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.7;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 90%; }
  trix-editor .trix-button--remove:hover {
    border-color: #333; }
    trix-editor .trix-button--remove:hover::before {
      opacity: 1; }

trix-editor .attachment__metadata-container {
  position: relative; }

trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px; }
  trix-editor .attachment__metadata .attachment__name {
    display: inline-block;
    max-width: 100%;
    vertical-align: bottom;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; }
  trix-editor .attachment__metadata .attachment__size {
    margin-left: 0.2em;
    white-space: nowrap; }

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word; }
  .trix-content * {
    box-sizing: border-box;
    margin: 0;
    padding: 0; }
  .trix-content h1 {
    font-size: 1.2em;
    line-height: 1.2; }
  .trix-content blockquote {
    border: 0 solid #ccc;
    border-left-width: 0.3em;
    margin-left: 0.3em;
    padding-left: 0.6em; }
  .trix-content [dir=rtl] blockquote,
  .trix-content blockquote[dir=rtl] {
    border-width: 0;
    border-right-width: 0.3em;
    margin-right: 0.3em;
    padding-right: 0.6em; }
  .trix-content li {
    margin-left: 1em; }
  .trix-content [dir=rtl] li {
    margin-right: 1em; }
  .trix-content pre {
    display: inline-block;
    width: 100%;
    vertical-align: top;
    font-family: monospace;
    font-size: 0.9em;
    padding: 0.5em;
    white-space: pre;
    background-color: #eee;
    overflow-x: auto; }
  .trix-content img {
    max-width: 100%;
    height: auto; }
  .trix-content .attachment {
    display: inline-block;
    position: relative;
    max-width: 100%; }
    .trix-content .attachment a {
      color: inherit;
      text-decoration: none; }
      .trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
        color: inherit; }
  .trix-content .attachment__caption {
    text-align: center; }
    .trix-content .attachment__caption .attachment__name + .attachment__size::before {
      content: ' \2022 '; }
  .trix-content .attachment--preview {
    width: 100%;
    text-align: center; }
    .trix-content .attachment--preview .attachment__caption {
      color: #666;
      font-size: 0.9em;
      line-height: 1.2; }
  .trix-content .attachment--file {
    color: #333;
    line-height: 1;
    margin: 0 2px 2px 2px;
    padding: 0.4em 1em;
    border: 1px solid #bbb;
    border-radius: 5px; }
  .trix-content .attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    position: relative; }
    .trix-content .attachment-gallery .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%; }
    .trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
      flex-basis: 50%;
      max-width: 50%; }
/*
 * Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
 * the trix-editor content (whether displayed or under editing). Feel free to incorporate this
 * inclusion directly in any other asset bundle and remove this file.
 *

*/

/*
 * We need to override trix.css’s image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content .attachment-gallery > action-text-attachment,
.trix-content .attachment-gallery > .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
  flex-basis: 50%;
  max-width: 50%;
}

.trix-content action-text-attachment .attachment {
  padding: 0 !important;
  max-width: 100% !important;
}

@tailwind base;
@tailwind components;
@tailwind utilities;

/* =====================================================
   iOS Safe Area - Dynamic Island & Notch Support (PWA)
   ===================================================== */

/* Override chalky_layout burger menu position for iOS safe area */
[data-controller*="chalky-layout--mobile-menu"] > .lg\:hidden.fixed.top-4.right-4 {
  top: calc(1rem + env(safe-area-inset-top, 0px)) !important;
}

/* Utility class for safe-area-aware top positioning */
.safe-area-top {
  top: calc(0.75rem + env(safe-area-inset-top, 0px)) !important;
}

/* =====================================================
   Chalky Layout Theme Customization
   Ces variables doivent être EN DEHORS de @layer components
   ===================================================== */
:root {
  --chalky-surface: #ffffff;
  --chalky-surface-secondary: #fafafa;
  --chalky-surface-tertiary: #f5f4f4;
  --chalky-surface-hover: #f5f4f4;
  --chalky-surface-active: #e9e7e7;
  --chalky-text-primary: #1c1718;
  --chalky-text-secondary: #605254;
  --chalky-text-tertiary: #7a6c6e;
  --chalky-text-muted: #9e9496;
  --chalky-text-inverted: #ffffff;
  --chalky-border: #e7e4e5;
  --chalky-border-light: #f3f2f2;
  --chalky-border-strong: #d3cfd0;
  --chalky-primary: #ff0099;
  --chalky-primary-hover: #f04c67;
  --chalky-primary-light: #fee6ea;
  --chalky-primary-text: #6c1322;
  --chalky-success: #1fad5a;
  --chalky-success-hover: #1b984f;
  --chalky-success-light: #effbf4;
  --chalky-success-text: #136c38;
  --chalky-success-border: #5cd68f;
  --chalky-danger: #df2020;
  --chalky-danger-hover: #bb1b1b;
  --chalky-danger-light: #fdf1f1;
  --chalky-danger-text: #821717;
  --chalky-danger-border: #e46767;
  --chalky-warning: #d4a411;
  --chalky-warning-hover: #b38a0f;
  --chalky-warning-light: #fdf9ed;
  --chalky-warning-text: #7d6212;
  --chalky-warning-border: #e8ba30;
  --chalky-info: #228ec3;
  --chalky-info-hover: #1d78a5;
  --chalky-info-light: #eef7fc;
  --chalky-info-text: #155879;
  --chalky-info-border: #5cadd6;
  --chalky-accent-blue: #3c71dd;
  --chalky-accent-blue-light: #dde6f8;
  --chalky-accent-blue-text: #173b82;
  --chalky-accent-green: #3cdd7f;
  --chalky-accent-green-light: #ddf8e8;
  --chalky-accent-green-text: #178244;
  --chalky-accent-red: #dd3c3c;
  --chalky-accent-red-light: #f8dddd;
  --chalky-accent-red-text: #821717;
  --chalky-accent-yellow: #ddc23c;
  --chalky-accent-yellow-light: #f8f3dd;
  --chalky-accent-yellow-text: #827017;
  --chalky-accent-orange: #dd7f3c;
  --chalky-accent-orange-light: #f8e8dd;
  --chalky-accent-orange-text: #824417;
  --chalky-accent-purple: #a73cdd;
  --chalky-accent-purple-light: #efddf8;
  --chalky-accent-purple-text: #5e1782;
  --chalky-accent-gray: #786d6f;
  --chalky-accent-gray-light: #f3f2f2;
  --chalky-accent-gray-text: #433d3e;
  --chalky-accent-indigo: #3c3cdd;
  --chalky-accent-indigo-light: #ddddf8;
  --chalky-accent-indigo-text: #171782;
  --chalky-tooltip-bg: #2c2122;
  --chalky-tooltip-text: #ffffff;
  --chalky-focus-ring: #f47c90;
}

/* Fix: Le CDN TomSelect utilise background-image:linear-gradient() que la gem n'override pas */
/* TODO: Signaler ce bug à chalky_layout pour qu'ils ajoutent background-image: none */
.ts-wrapper.multi .ts-control > .item,
.ts-wrapper.multi .ts-control > [data-value] {
  background-image: none !important;
}

@layer components {

  .filters_checkbox[type="checkbox"] {
    width: 20px;
    height: 20px;
    background-color: #fff;
    position: relative;
  }

  .filters_checkbox[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: var(--chalky-primary);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
  }

  .filters_checkbox[type="checkbox"]:checked::before {
    transform: translate(-50%, -50%) scale(1);
  }


  #bici-table {
    @apply w-full bg-white rounded-b-xl shadow-lg text-content;
  }

  .h-cell {
    @apply py-3 px-3 first:rounded-tl-xl last:rounded-tr-xl overflow-hidden sticky top-0 bg-secondary text-white font-bold !text-left;
  }

  .b-cell  {
    @apply py-3 first:pl-4 last:pr-4 !border-b !border-disable;
  }

  details > summary:not(#terms summary) {
    list-style: none !important;
  }

  details summary::-webkit-details-marker {
    display:none;
  }

  /* Chevron rotation for details/summary */
  details[open] .chevron-icon {
    transform: rotate(180deg);
  }

  body.wait, body.wait * {
    cursor: wait !important;
  }

  .form_with_checkbox {
    @apply relative inline-block text-transparent text-[0px] before:content-[''] before:mt-1 after:mt-1 before:block absolute before:cursor-pointer before:w-14 before:h-8 before:top-0 before:left-0 before:bg-disable before:rounded-full peer-checked:before:bg-secondary after:content-[''] after:block after:absolute after:cursor-pointer after:w-6 after:h-6 after:top-1 after:left-1 after:bg-white after:rounded-full peer-checked:after:ml-1 peer-checked:after:left-6 after:transition-all;
  }

  .btn {
    @apply px-4 py-2 font-normal text-center rounded-md border-2 shadow-md transition-colors cursor-pointer focus:outline-none focus:ring-2 focus:ring-opacity-75;
  }

  .btn-primary {
    @apply  text-white border-white hover:bg-white hover:text-primary hover:border-primary bg-primary focus:ring-secondary;
  }

  .btn-tertiary {
    @apply  text-white border-white hover:bg-white hover:text-tertiary hover:border-tertiary bg-tertiary focus:ring-secondary;
  }

  .btn-cancel {
    @apply text-white underline decoration-tertiary hover:text-secondary;
  }

  .btn-cancel-inverted {
    @apply underline decoration-tertiary text-primary hover:text-secondary;
  }

  .btn-wait {
    @apply   text-white cursor-not-allowed bg-content border-content;
  }

  /* =====================================================
     Boutons 2025 - Design minimaliste
     ===================================================== */

  /* Bouton principal - fond noir, sobre */
  .sf-btn {
    @apply inline-flex justify-center items-center px-5 py-2.5 text-sm font-medium rounded-md transition-all duration-200 ease-out cursor-pointer;
    @apply focus:outline-none focus:ring-2 focus:ring-offset-2;
  }

  .sf-btn-primary {
    @apply border-0 text-chalky-text-inverted bg-chalky-text-primary;
    @apply hover:opacity-90;
    @apply focus:ring-chalky-focus-ring;
  }

  .sf-btn-primary:disabled {
    @apply cursor-not-allowed bg-chalky-text-muted;
  }

  /* Bouton secondaire - contour sobre */
  .sf-btn-secondary {
    @apply bg-transparent border text-chalky-text-primary border-chalky-border;
    @apply hover:bg-chalky-surface-hover hover:border-chalky-border-strong;
    @apply focus:ring-chalky-border;
  }

  .sf-btn-secondary:disabled {
    @apply cursor-not-allowed text-chalky-text-muted border-chalky-border-light;
  }

  /* Bouton ghost - texte seul */
  .sf-btn-ghost {
    @apply bg-transparent border-0 text-chalky-text-secondary;
    @apply hover:text-chalky-text-primary hover:bg-chalky-surface-tertiary;
    @apply focus:ring-chalky-border;
  }

  /* Bouton danger */
  .sf-btn-danger {
    @apply border-0 text-chalky-text-inverted bg-chalky-danger;
    @apply hover:bg-chalky-danger-hover;
    @apply focus:ring-chalky-danger;
  }

  /* Tailles de boutons */
  .sf-btn-sm {
    @apply px-3 py-1.5 text-xs;
  }

  .sf-btn-lg {
    @apply px-6 py-3 text-base;
  }


  #dispatch-table {
    @apply w-full text-gray-600 bg-white rounded-xl shadow-lg;
  }
  #dispatch-table thead {
    @apply bg-secondary text-white font-bold !text-left;
  }
  #dispatch-table thead tr th {
    @apply overflow-hidden sticky top-0 px-3 py-3 first:rounded-tl-xl last:rounded-tr-xl;
  }

  #dispatch-table tbody {
    @apply font-normal bg-white text-content;
  }
  /* #dispatch-table tbody tr {
  } */

  #dispatch-table tbody tr {
    @apply  border-b border-light;
  }

  /* #dispatch-table tbody tr:nth-child(odd) td  {
    @apply px-3 py-3 text-center first:pl-4 last:pr-4;
  } */

  #dispatch-table tbody tr td  {
    @apply px-3 py-3 text-center first:pl-4 last:pr-4;
  }

  /* Styles pour la nouvelle page des archives */
  .delivery-archive-table {
    @apply overflow-hidden w-full rounded-xl shadow-lg bg-chalky-surface;
  }

  .delivery-archive-table thead {
    @apply border-b bg-chalky-surface-tertiary border-chalky-border;
  }

  .delivery-archive-table thead th {
    @apply px-4 py-3 text-xs font-medium tracking-wider text-left uppercase text-chalky-text-secondary;
  }

  .delivery-archive-table tbody {
    @apply divide-y bg-chalky-surface divide-chalky-border;
  }

  .delivery-archive-row {
    @apply transition-colors duration-150 cursor-pointer hover:bg-chalky-surface-hover;
  }

  .status-badge {
    @apply inline-flex items-center px-2 py-1 text-xs font-medium rounded-full border;
  }

  .route-indicator {
    @apply flex items-center space-x-2 text-sm;
  }

  .route-dot {
    @apply w-2 h-2 rounded-full;
  }

  .route-line {
    @apply w-px h-6 bg-chalky-border;
  }

  .metrics-grid {
    @apply grid grid-cols-1 gap-2 text-sm;
  }

  .metric-row {
    @apply flex justify-between items-center;
  }

  .action-button {
    @apply p-2 text-sm rounded-lg transition-colors;
  }

  .action-button:hover {
    @apply transform scale-105;
  }

  /* Mobile cards styling */
  .mobile-delivery-card {
    @apply p-4 rounded-lg border transition-shadow bg-chalky-surface border-chalky-border hover:shadow-md;
  }

  .mobile-delivery-header {
    @apply flex justify-between items-start mb-3;
  }

  .mobile-delivery-route {
    @apply space-y-2 text-xs text-chalky-text-secondary;
  }

  .mobile-delivery-actions {
    @apply flex justify-between items-center pt-3 mt-3 border-t border-chalky-border-light;
  }


  .input-bici {
    @apply px-2 py-2 w-full text-base text-gray-800 bg-gray-50 rounded-md border border-transparent shadow-md appearance-none placeholder-content focus:outline-none focus:ring-2 focus:ring-blue-bici focus:border-transparent;
  }

  .input-bici-nm {
    @apply w-full text-base text-gray-800 bg-white rounded-md border border-transparent shadow-md appearance-none placeholder-content focus:outline-none focus:ring-2 focus:ring-blue-bici focus:border-transparent;
  }

  .select-bici {
    @apply px-2 py-2.5 w-full text-base font-medium text-gray-800 bg-white rounded-md border-none shadow-md placeholder-content focus:outline-none focus:ring-2 focus:ring-blue-bici focus:border-transparent;
  }

  .input-bici-select-2 {
    @apply mt-2 w-full text-base text-gray-800 bg-white rounded-md border border-transparent shadow-md appearance-none placeholder-content focus:outline-none focus:ring-2 focus:ring-blue-bici focus:border-transparent;
  }
  .label-bici {
    @apply leading-8 text-content;
  }

  .page {
    @apply tracking-wide select-none text-secondary hover:text-tertiary;
  }
  .pagy_nav {
    @apply px-3 py-2 font-semibold rounded-full;
  }

  . {
    @apply cursor-not-allowed text-content hover:text-content;
  }
  aside, main {
    transition: width 300ms ease-in-out;
  }

  aside {
    transition: opacity 300ms ease-in-out;
  }

  /* Cacher le compteur de tickets en mode sidebar repliée */
  .sidebar-collapsed .tickets-counter-section {
    display: none !important;
  }

  .slide-in-left {
    animation: slide-in-left 150ms cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
  }

  @keyframes slide-in-left {
    0% {
      transform: translateX(-300px);
      opacity: 0;
    }
    100% {
      transform: translateX(0);
      opacity: 1;
      display: block !important;
    }
  }

  .slide-out-left {
    animation: slide-out-left 150ms cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
  }

  @keyframes slide-out-left {
    0% {
      transform: translateX(0);
      opacity: 1;
    }
    100% {
      transform: translateX(-800px);
      opacity: 0;
      display: none !important;
    }
  }
  .noUi-handle {
    all: none !important;
    border-radius: 100% !important;
    width: 28px!important;
    height: 28px!important;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important;
    border: none !important;
    cursor: grab !important;
    font-size: .875rem;
  }

  .noUi-handle-upper::after, .noUi-handle-upper::before {
    display: none !important;
  }
  .noUi-handle-lower::after, .noUi-handle-lower::before {
    display: none !important;
  }

  .noUi-tooltip {
    @apply text-sm font-medium bg-transparent border-none text-chalky-text-primary;
  }

  .noUi-horizontal {
    @apply h-2 rounded-full bg-chalky-border;
  }

  .noUi-connect {
    background-color: var(--chalky-primary) !important;
    @apply rounded-full;
  }

  .noUi-handle {
    background-color: var(--chalky-primary) !important;
    border: 3px solid white !important;
  }

  #informations {
    @apply text-blue-bici;
    table {
      @apply w-full;
      tbody {
        @apply w-full;
        tr {
          @apply flex justify-between items-center w-full;
          th {
            @apply w-1/4 text-left;
          }
          td {
            @apply flex-grow text-right;

          }
        }
      }
    }
  }
  .absolute-center {
    @apply absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2
  }

  .navbar-link {
    @apply
    overflow-hidden relative px-1 py-1 text-sm font-normal tracking-wider rounded-md hover:after:block after:-translate-x-36 hover:after:translate-x-0 hover:after:absolute hover:after:top-20 hover:after:lg:top-6 hover:after:xl:top-8 hover:after:-inset-1 hover:after:h-1 after:ease-in-out after:duration-500 hover:after:bg-tertiary after:transition-all sm:px-2 xl:text-lg hover:text-tertiary;
  }

  .pac-container:after {
    background-image: none !important;
    height: 0px !important;
    content:none !important;
    display:none !important;
  }

  .mapboxgl-ctrl-geocoder--input {
    @apply focus:ring focus:ring-2 focus:ring-blue-bici rounded-lg
  }

  .mapboxgl-ctrl-geocoder--input {
    outline: none !important;
  }

  .mapbox-search > div {
    @apply w-full input-bici
  }

  .suggestions {
    z-index: 2147483647 !important;
    opacity: 100% !important;
  }

  #result {
    z-index: 2147483647 !important;
  }

  #geocoder {
    z-index: 1;
    margin: 20px;
  }

  .mapboxgl-ctrl-geocoder {
    min-width: 100%;
  }

  a.mapboxgl-ctrl-logo {
    display: none !important;
  }

  .mapboxgl-ctrl-attrib.mapboxgl-compact {
    display: none !important;
  }

  /* Dashboard map action popup - remove default padding */
  .delivery-action-popup .mapboxgl-popup-content {
    padding: 0 !important;
    background: white !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
    border-radius: 0.5rem;
    overflow: hidden;
  }

  .delivery-action-popup .mapboxgl-popup-tip {
    display: none !important;
  }

  .height-without-navbar {
    height: calc(100vh - theme('spacing.20'));
  }

  .min-height-without-navbar {
    min-height: calc(100vh - theme('spacing.36'));
  }

  .category-selector-tw {
    @apply absolute transform scale-0
  }

  body {
    @apply font-sans;
  }

  p {
    @apply pb-2 tracking-wider leading-loose text-white;
  }

  #terms p {
    @apply tracking-wider leading-5 text-justify text-white;
  }
/*
  h1 {
    @apply text-5xl text-white;
  } */

  #messenger h2 {
    @apply mb-6
    text-2xl inline-block text-primary relative
    before:z-[-1]
    before:absolute
    before:content-['']
    before:block
    before:w-full
    before:-rotate-2
    before:h-3
    before:-bottom-1
    before:bg-tertiary
    before:my-2
    before:mx-2;
  }

  /* #user h2 {
    @apply mb-6
    text-2xl inline-block text-primary relative
    before:z-[-1]
    before:absolute
    before:content-['']
    before:block
    before:w-full
    before:-rotate-2
    before:h-3
    before:-bottom-1
    before:bg-tertiary
    before:my-2
    before:mx-2;
  } */

  /* #user {
    background-color: #7d3535 !important;
  } */

  /* Delivery form - modern black/white style */
  #new_object h2 {
    @apply m-0 text-xl font-semibold text-chalky-text-primary;
  }

  /* =====================================================
     Map Peek Mode - Carte rétractable sur le côté
     ===================================================== */

  .map-peek-container {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }

  .map-peek-container.map-collapsed {
    width: 60px;
  }

  .map-peek-container.map-expanded {
    width: 50vw;
  }

  /* Handle (poignée) */
  .map-peek-handle {
    transition: all 0.3s ease;
  }

  .map-collapsed .map-peek-handle {
    opacity: 1;
  }

  .map-expanded .map-peek-handle {
    opacity: 0;
    pointer-events: none;
  }

  /* Chevron animation */
  .map-peek-chevron {
    transition: transform 0.3s ease;
  }

  .map-expanded .map-peek-chevron {
    transform: rotate(180deg);
  }

  /* Overlay sombre quand la carte est étendue */
  .map-peek-container::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 60px;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.3s ease;
    z-index: -1;
  }

  .map-peek-container.map-expanded::before {
    background: rgba(0, 0, 0, 0.1);
  }

  /* Responsive - sur mobile, pas de peek mode */
  @media (max-width: 1024px) {
    .map-peek-container {
      display: none;
    }
  }

  h3 {
    @apply text-xl text-white;
  }

  h4 {
    @apply text-lg text-white;
  }

  .autocomplete {
    @apply inline-block relative;
  }

  /* // input[type=text] {
    //   @apply w-full bg-white
    // } */

  .autocomplete-items {
    @apply overflow-hidden absolute right-0 left-0 top-20 z-50 rounded-md border-x;
  }
  .autocomplete-items div {
    @apply px-3 py-2 border-b cursor-pointer bg-chalky-surface hover:bg-chalky-surface-hover;
  }
  .autocomplete-active {
    color: var(--chalky-text-primary);
    background-color: var(--chalky-surface-active) !important;
  }

  .flex-wrapper {
    display: flex;
    flex-flow: row nowrap;
  }

  .single-chart {
    width: 33%;
    justify-content: space-around ;
  }

  .circular-chart {
    display: block;
    margin: 10px auto;
    max-width: 80%;
    max-height: 250px;
  }

  .circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
  }

  .circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
  }

  @keyframes progress {
    0% {
      stroke-dasharray: 0 100;
    }
  }

  .circular-chart.orange .circle {
    /* stroke: #ff9f00; */
    @apply !stroke-tertiary;
  }


  .percentage {
    fill: rgb(248, 239, 239);
    font-family: sans-serif;
    font-size: 0.25em;
    text-anchor: middle;
  }
  .percentage-1 {
    @apply fill-tertiary text-[0.35em];
  }
  .align-svg {
    text-anchor: middle;
  }

  /* Floating Label CSS */
  .form-group {
    @apply relative mb-5 w-full;
  }

  .form-input {
    @apply block px-3 py-2 w-full placeholder-transparent rounded-md border border-gray-300 appearance-none focus:outline-none focus:ring-secondary focus:border-secondary;
    @apply transition-all duration-200;
    @apply z-40; /* Ajoutez cette ligne pour définir le z-index du champ de saisie */
  }

  .floating-label {
    @apply absolute left-0 top-2.5 px-3 py-0 transition-all duration-200 ease-in-out transform-gpu pointer-events-none text-content;
    @apply transform;
    @apply z-0; /* Modifiez cette ligne pour ajouter un z-index au label */
  }

  .form-input:focus ~ .floating-label,
  .form-input:not(:placeholder-shown) ~ .floating-label {
    @apply bg-white rounded-full border transform-gpu scale-75 -translate-y-6 text-secondary border-secondary;
  }

  .has-error .form-input {
    @apply border-red-500 focus:ring-red-500 focus:border-red-500;
  }

  .error {
    @apply mt-1 text-sm text-red-600;
  }

  .hint {
    @apply mt-1 text-sm text-content;
  }

  /* =====================================================
     SimpleForm 2025 - Modern Minimal Design
     Style: Underline inputs, labels above, neutral focus
     ===================================================== */

  /* Field wrapper */
  .sf-field {
    @apply mb-5;
  }

  /* Label - Static above input */
  .sf-label {
    @apply block mb-1.5 text-sm font-medium text-chalky-text-secondary;
  }

  /* Base input styles - Underline only with white background */
  .sf-input {
    @apply block px-3 py-2.5 w-full text-base border-0 border-b-2 transition-colors duration-200 ease-out appearance-none text-chalky-text-primary bg-chalky-surface border-chalky-border;
    @apply rounded-t-md placeholder-chalky-text-muted;
    @apply focus:outline-none focus:border-chalky-text-primary;
  }

  /* Select styling */
  select.sf-input {
    @apply pr-10 bg-no-repeat cursor-pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-size: 1.25em 1.25em;
  }

  select.sf-input:focus {
    @apply border-chalky-text-primary;
  }

  /* Textarea styling */
  textarea.sf-input {
    @apply border border-chalky-border rounded-md px-3 py-2 resize-y min-h-[100px];
    @apply focus:border-chalky-text-primary focus:ring-1 focus:ring-chalky-text-primary;
  }

  /* Error state */
  .sf-field--error .sf-input {
    @apply border-chalky-danger;
  }

  .sf-field--error .sf-input:focus {
    @apply border-chalky-danger;
  }

  .sf-field--error .sf-label {
    @apply text-chalky-danger;
  }

  .sf-error {
    @apply block mt-1.5 text-sm text-chalky-danger;
  }

  /* Hint */
  .sf-hint {
    @apply mt-1.5 text-sm text-chalky-text-secondary;
  }

  /* Error notification (form-level) */
  .sf-error-notification {
    @apply p-4 mb-6 text-sm rounded-md border text-chalky-danger-text bg-chalky-danger-light border-chalky-danger-border;
  }

  /* Disabled state */
  .sf-input:disabled,
  .sf-input[readonly] {
    @apply border-dashed cursor-not-allowed text-chalky-text-secondary bg-chalky-surface-tertiary border-chalky-border-light;
  }

  /* ---- Boolean / Checkbox ---- */
  .sf-field--boolean {
    @apply mb-4;
  }

  .sf-boolean {
    @apply flex gap-3 items-center cursor-pointer select-none;
  }

  .sf-checkbox {
    @apply w-5 h-5 bg-transparent rounded border-2 transition-colors duration-150 cursor-pointer text-chalky-text-primary border-chalky-border-strong;
    @apply focus:ring-2 focus:ring-chalky-border focus:ring-offset-0;
    @apply checked:bg-chalky-text-primary checked:border-chalky-text-primary;
    -webkit-appearance: none;
    appearance: none;
  }

  .sf-checkbox:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
  }

  .sf-boolean-label {
    @apply text-base text-chalky-text-primary;
  }

  /* ---- Switch toggle ---- */
  .sf-field--switch {
    @apply mb-4;
  }

  .sf-switch-wrapper {
    @apply flex gap-3 items-center cursor-pointer select-none;
  }

  .sf-switch {
    @apply relative w-11 h-6 rounded-full transition-colors duration-200 ease-in-out cursor-pointer bg-chalky-border;
    -webkit-appearance: none;
    appearance: none;
  }

  .sf-switch::before {
    @apply absolute top-0.5 left-0.5 w-5 h-5 rounded-full shadow-sm transition-transform duration-200 ease-in-out bg-chalky-surface;
    content: "";
  }

  .sf-switch:checked {
    @apply bg-chalky-text-primary;
  }

  .sf-switch:checked::before {
    transform: translateX(20px);
  }

  .sf-switch:focus {
    @apply ring-2 ring-offset-2 outline-none ring-chalky-border;
  }

  .sf-switch:disabled {
    @apply opacity-50 cursor-not-allowed;
  }

  .sf-switch-label {
    @apply text-base text-chalky-text-primary;
  }

  /* ---- Radio buttons ---- */
  .sf-field--radios {
    @apply mb-5;
  }

  /* Container for all radio options */
  .sf-field--radios > span.radio {
    @apply inline-flex mr-6 mb-2;
  }

  /* Label wrapping the radio input */
  .sf-field--radios span.radio label {
    @apply inline-flex gap-2 items-center text-base cursor-pointer select-none text-chalky-text-primary;
  }

  /* Radio input styling */
  input.sf-radios[type="radio"] {
    @apply flex-shrink-0 w-5 h-5 border-2 transition-colors duration-150 cursor-pointer bg-chalky-surface border-chalky-border-strong;
    @apply focus:ring-2 focus:ring-chalky-border focus:ring-offset-0;
    @apply checked:border-chalky-text-primary;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 50%;
  }

  input.sf-radios[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23111827' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='4'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
  }

  /* ---- Radio Pills (modern pill-style buttons) ---- */
  .sf-field--radio-pills {
    @apply mb-5;
  }

  .sf-field--radio-pills .sf-radio-pills {
    @apply flex flex-row flex-wrap gap-3;
  }

  .sf-field--radio-pills span.radio {
    @apply inline-flex mr-2 mb-2;
  }

  /* Label contains the input, so we style the label based on input state inside */
  .sf-field--radio-pills span.radio label {
    @apply inline-flex justify-center items-center px-4 py-2.5 text-sm font-medium whitespace-nowrap rounded-full transition-all duration-200 ease-out cursor-pointer select-none text-chalky-text-secondary;
    background: var(--chalky-surface-secondary);
    border: 2px solid transparent;
  }

  .sf-field--radio-pills span.radio label:hover {
    background: var(--chalky-surface-hover);
  }

  /* Hide the radio input visually but keep it accessible */
  .sf-field--radio-pills span.radio label input[type="radio"] {
    @apply sr-only;
  }

  /* Style label when its contained radio is checked - using :has() */
  .sf-field--radio-pills span.radio label:has(input[type="radio"]:checked) {
    @apply text-chalky-text-inverted;
    background: var(--chalky-primary);
    border-color: var(--chalky-primary);
  }

  .sf-field--radio-pills span.radio label:has(input[type="radio"]:focus) {
    @apply ring-2 ring-offset-2;
    --tw-ring-color: var(--chalky-primary);
  }

  /* ---- Checkboxes collection ---- */
  .sf-field--checkboxes {
    @apply mb-5;
  }

  /* Container for all checkbox options */
  .sf-field--checkboxes > span.checkbox {
    @apply inline-flex mr-6 mb-2;
  }

  /* Label wrapping the checkbox input */
  .sf-field--checkboxes span.checkbox label {
    @apply inline-flex gap-2 items-center text-base cursor-pointer select-none text-chalky-text-primary;
  }

  /* Checkbox input styling in collections */
  input.sf-checkboxes[type="checkbox"] {
    @apply flex-shrink-0 w-5 h-5 rounded border-2 transition-colors duration-150 cursor-pointer bg-chalky-surface border-chalky-border-strong;
    @apply focus:ring-2 focus:ring-chalky-border focus:ring-offset-0;
    @apply checked:bg-chalky-text-primary checked:border-chalky-text-primary;
    -webkit-appearance: none;
    appearance: none;
  }

  input.sf-checkboxes[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
  }

  /* Custom Switch CSS */
  .switch {
    @apply inline-flex relative justify-start items-center w-14 h-8 rounded-full transition-colors duration-200 ease-in-out cursor-pointer bg-chalky-border;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 2px;
  }

  .switch:before {
    @apply block w-7 h-7 rounded-full shadow-md transition-transform duration-200 ease-in-out bg-chalky-surface;
    content: "";
    transform: translateX(0);
  }

  .switch:checked {
    @apply bg-secondary;
    background-image: none;
  }

  .switch.switch-accent:checked {
    background-color: var(--chalky-primary) !important;
  }

  .switch.switch-chalky-primary:checked {
    background-color: var(--chalky-primary) !important;
  }

  /* Cacher le texte auto-généré par SimpleForm pour les switches */
  .switch + span,
  .switch ~ span:not([class]) {
    @apply sr-only;
  }

  .switch:checked:before {
    transform: translateX(24px);
  }

  .switch:checked:hover,
  .switch:checked:focus {
    background-image: none;
  }

  .switch:focus {
    @apply ring-2 ring-offset-2 outline-none ring-secondary;
  }

  .switch:disabled {
    @apply opacity-50 cursor-not-allowed;
  }


  /* Custom hour button CSS */
  .btn-hour {
    @apply inline-flex relative justify-center items-center px-4 py-2 text-center rounded-md transition-colors duration-200 cursor-pointer bg-secondary;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .btn-hour:after {
    @apply block text-sm font-medium text-center text-white;
    content: "Personnaliser";
  }

  .btn-hour:checked {
    @apply bg-white border-2 border-secondary;
  }

  .btn-hour:checked:after {
    @apply text-secondary;
  }

  /* Bin for checkbox */
  .bin-box {
    @apply inline-block relative w-12 align-middle border-none cursor-pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .bin-box:after {
    @apply block absolute w-12 transition-transform duration-200 text-secondary;
    content: "\f1f8";
    font-family: "Font Awesome 6 Pro";
    display: inline-block;
    vertical-align: middle;
    font-weight:900;
  }

    /* fa warning */
    .warning {
      @apply absolute top-0 left-1/2 border-none -translate-x-1/2 cursor-pointer;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .warning:after {
      @apply block text-base text-red-500 transition-transform duration-200;
      content: "\f071";
      font-family: "Font Awesome 6 Pro";
      display: inline-block;
      vertical-align: middle;
      font-weight:900;
    }


    /* fa dropout */
    .dropout {
      @apply absolute top-1 left-1/2 border-none -translate-x-1/2 cursor-pointer;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .dropout:after {
      @apply block text-base text-white transition-transform duration-200 rotate-90;
      content: "\f08b";
      font-family: "Font Awesome 6 Pro";
      display: inline-block;
      vertical-align: middle;
      font-weight:700;
    }


    /* fa hourglass */
    .hourglass {
      @apply absolute top-0.5 left-1/2 border-none -translate-x-1/2 cursor-pointer;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .hourglass:after {
      @apply block text-base text-white transition-transform duration-200;
      content: "\f251";
      font-family: "Font Awesome 6 Pro";
      display: inline-block;
      vertical-align: middle;
      font-weight:700;
    }

    /* fa check */
    .check {
      @apply absolute top-0.5 left-1/2 border-none -translate-x-1/2 cursor-pointer;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .check:after {
      @apply block text-base text-white transition-transform duration-200;
      content: "\f00c";
      font-family: "Font Awesome 6 Pro";
      display: inline-block;
      vertical-align: middle;
      font-weight:700;
    }

    /* registration switch */
    .switch-container {
      @apply flex justify-center items-center text-center;
    }

    .btn-switch {
      @apply flex relative justify-center items-center px-3 py-2 text-base font-medium text-center text-gray-600 bg-gray-100 rounded-full border border-gray-100 transition cursor-pointer hover:bg-blue-100;
    }

    input[type='radio']:checked + .btn-switch {
      @apply text-white border bg-secondary border-tertiary;
    }

  /* =====================================================
     Glassmorphism - Formulaire transparent avec blur
     ===================================================== */

  .glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.1),
      0 2px 8px rgba(0, 0, 0, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
    @apply rounded-2xl;
  }

  .glass-card-darker {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.12),
      0 2px 8px rgba(0, 0, 0, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
    @apply rounded-2xl;
  }

  .glass-card-light {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }

  /* Glass Select styling */
  .glass-select {
    @apply px-3 py-2.5 w-full text-sm rounded-lg transition-all duration-200 cursor-pointer text-chalky-text-primary;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
  }

  .glass-select:focus {
    @apply outline-none;
    background-color: rgba(255, 255, 255, 0.9);
    border-color: var(--chalky-primary);
    box-shadow: 0 0 0 3px rgba(255, 1, 153, 0.15);
  }

  /* =====================================================
     TomSelect Glass Style - For glass-card context
     ===================================================== */

  /* Reset SimpleForm styles for glass context */
  .glass-tom-select .ts-wrapper,
  .glass-tom-select .ts-wrapper.sf-input {
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
  }

  .glass-tom-select .ts-wrapper.single .ts-control {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 0.5rem !important;
    padding: 0.625rem 2.5rem 0.625rem 0.75rem !important;
    box-shadow: none !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease !important;
    min-height: auto !important;
  }

  .glass-tom-select .ts-wrapper.single .ts-control:hover {
    background: rgba(255, 255, 255, 0.75) !important;
  }

  .glass-tom-select .ts-wrapper.single.focus .ts-control,
  .glass-tom-select .ts-wrapper.single.dropdown-active .ts-control {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: var(--chalky-primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 1, 153, 0.15) !important;
  }

  .glass-tom-select .ts-wrapper.single .ts-control .item {
    @apply text-sm font-normal;
    color: var(--chalky-text-primary) !important;
  }

  .glass-tom-select .ts-wrapper.single .ts-control > input {
    @apply text-sm;
  }

  .glass-tom-select .ts-wrapper.single .ts-control > input::placeholder {
    color: var(--chalky-text-muted) !important;
    opacity: 1 !important;
  }

  /* Dropdown styling */
  .glass-tom-select .ts-wrapper .ts-dropdown,
  .glass-tom-select .ts-dropdown {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.75rem !important;
    margin-top: 0.25rem !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    z-index: 9999 !important;
  }

  .glass-tom-select .ts-wrapper .ts-dropdown .ts-dropdown-content,
  .glass-tom-select .ts-dropdown .ts-dropdown-content {
    max-height: 280px !important;
    padding: 0.25rem !important;
    overflow-y: auto !important;
  }

  .glass-tom-select .ts-wrapper .ts-dropdown .option,
  .glass-tom-select .ts-dropdown .option {
    @apply px-3 py-2 text-sm rounded-lg;
    color: var(--chalky-text-secondary) !important;
    background: transparent !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
  }

  .glass-tom-select .ts-wrapper .ts-dropdown .option:hover,
  .glass-tom-select .ts-wrapper .ts-dropdown .option.active,
  .glass-tom-select .ts-dropdown .option:hover,
  .glass-tom-select .ts-dropdown .option.active {
    background: var(--chalky-primary-light) !important;
    color: var(--chalky-text-primary) !important;
  }

  .glass-tom-select .ts-wrapper .ts-dropdown .option.selected,
  .glass-tom-select .ts-dropdown .option.selected {
    background: var(--chalky-primary-light) !important;
    color: var(--chalky-primary) !important;
    font-weight: 500 !important;
  }

  /* Hide empty options */
  .glass-tom-select .ts-dropdown .option:empty {
    display: none !important;
  }

  /* Search input in dropdown */
  .glass-tom-select .ts-dropdown .dropdown-input-wrap {
    padding: 0.5rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  .glass-tom-select .ts-dropdown .dropdown-input {
    @apply px-3 py-2 w-full text-sm rounded-lg;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: var(--chalky-surface-secondary) !important;
  }

  .glass-tom-select .ts-dropdown .dropdown-input:focus {
    outline: none !important;
    border-color: var(--chalky-primary) !important;
    box-shadow: 0 0 0 2px rgba(255, 1, 153, 0.1) !important;
  }

  /* =====================================================
     Volume Radio Buttons - Pills avec icônes progressives
     ===================================================== */

  .volume-radio-group {
    @apply flex flex-wrap gap-2 w-full;
  }

  .volume-radio {
    @apply sr-only;
  }

  .volume-radio-label {
    @apply flex flex-col flex-1 justify-center items-center px-2 py-2 text-center rounded-lg transition-all duration-200 ease-out cursor-pointer select-none min-w-[60px];
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  }

  .volume-radio-label:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  }

  .volume-radio-label .volume-icon {
    @apply mb-0.5 text-base transition-colors duration-200 text-chalky-text-muted;
  }

  .volume-radio-label .volume-name {
    @apply text-xs font-medium transition-colors duration-200 text-chalky-text-secondary;
  }

  .volume-radio-label .volume-tickets {
    @apply text-[10px] text-chalky-text-muted mt-0.5;
  }

  .volume-radio:checked + .volume-radio-label {
    background: var(--chalky-primary-light);
    border-color: var(--chalky-primary);
    box-shadow: none;
  }

  .volume-radio:checked + .volume-radio-label .volume-icon {
    @apply text-accent;
  }

  .volume-radio:checked + .volume-radio-label .volume-name {
    @apply text-accent;
  }

  .volume-radio:focus + .volume-radio-label {
    @apply ring-2 ring-opacity-30 ring-accent;
  }

  /* =====================================================
     Urgence Radio Buttons - Style élégant
     ===================================================== */

  .urgence-radio-group {
    @apply flex flex-wrap gap-2 w-full;
  }

  .urgence-radio {
    @apply sr-only;
  }

  .urgence-radio-label {
    @apply flex flex-col flex-1 justify-center items-center px-2 py-2 text-center rounded-lg transition-all duration-200 ease-out cursor-pointer select-none min-w-[60px];
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  }

  .urgence-radio-label:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  }

  .urgence-radio-label .urgence-icon {
    @apply mb-0.5 text-base transition-colors duration-200 text-chalky-text-muted;
  }

  .urgence-radio-label .urgence-name {
    @apply text-xs font-medium transition-colors duration-200 text-chalky-text-secondary;
  }

  .urgence-radio-label .urgence-tickets {
    @apply text-[10px] text-chalky-text-muted mt-0.5;
  }

  .urgence-radio:checked + .urgence-radio-label {
    background: var(--chalky-primary-light);
    border-color: var(--chalky-primary);
    box-shadow: none;
  }

  .urgence-radio:checked + .urgence-radio-label .urgence-icon {
    @apply text-accent;
  }

  .urgence-radio:checked + .urgence-radio-label .urgence-name {
    @apply text-accent;
  }

  .urgence-radio:focus + .urgence-radio-label {
    @apply ring-2 ring-opacity-30 ring-accent;
  }

  /* Custom time option */
  .urgence-radio-label.custom-time {
    @apply border-dashed;
  }

  .urgence-radio:checked + .urgence-radio-label.custom-time {
    @apply border-solid border-accent;
  }

  /* =====================================================
     Favoris Star Button & Dropdown
     ===================================================== */

  .favorite-star-btn {
    @apply flex justify-center items-center w-11 h-11 bg-opacity-90 rounded-full border shadow-lg backdrop-blur-sm transition-all duration-200 ease-out cursor-pointer bg-chalky-surface border-chalky-border;
    @apply hover:bg-chalky-warning-light hover:border-chalky-warning-border hover:scale-105;
  }

  .favorite-star-btn i {
    @apply text-lg transition-colors duration-200 text-chalky-warning;
  }

  .favorite-star-btn:hover i {
    @apply text-chalky-warning-hover;
  }

  /* =====================================================
     Map Peek Button (voir la carte)
     ===================================================== */

  .map-peek-btn {
    @apply flex justify-center items-center w-11 h-11 bg-opacity-90 rounded-full border shadow-lg backdrop-blur-sm transition-all duration-200 ease-out cursor-pointer bg-chalky-surface border-chalky-border;
    @apply hover:bg-chalky-info-light hover:border-chalky-info-border hover:scale-105;
  }

  .map-peek-btn i {
    @apply text-lg transition-colors duration-200 text-chalky-info;
  }

  .map-peek-btn:hover i {
    @apply text-chalky-info-hover;
  }

  /* Animation pour masquer/afficher le formulaire */
  .form-peek-hidden {
    @apply opacity-0 pointer-events-none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .delivery-form-overlay {
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  /* Mode carte plein écran - masque la sidebar */
  .map-fullscreen-hidden {
    @apply opacity-0 pointer-events-none;
    transform: translateX(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  /* Mode carte plein écran - contenu prend tout l'écran */
  .map-fullscreen-mode {
    margin-left: 0 !important;
    transition: margin-left 0.3s ease;
  }

  /* Styles gérés par favorites_dropdown_controller.js */
  .favorite-dropdown {
    /* Styles appliqués dynamiquement par Stimulus */
  }

  .favorite-dropdown-item {
    @apply flex items-center px-3 py-2.5 rounded-lg transition-all duration-150 cursor-pointer;
    @apply hover:bg-chalky-warning-light;
  }

  /* =====================================================
     Options Section (in glass form)
     ===================================================== */

  .options-section {
    @apply pt-3 mt-3 border-t border-opacity-50 border-chalky-border;
  }

  .option-row {
    @apply flex justify-between items-center py-1;
  }

  .option-label {
    @apply flex gap-2 items-center;
  }

  .option-label-icon {
    @apply flex justify-center items-center w-6 h-6 rounded;
  }

  .option-label-text {
    @apply text-xs font-medium text-chalky-text-secondary;
  }

  .option-label-hint {
    @apply text-xs text-chalky-text-muted;
  }

  /* =====================================================
     Full-page map delivery form layout
     ===================================================== */

  .delivery-form-fullmap {
    @apply relative w-full min-h-screen;
  }

  .delivery-form-fullmap #map {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0 !important;
  }

  .delivery-form-overlay {
    @apply relative z-10 p-4 min-h-screen;
    @apply lg:p-8 lg:pt-12;
    /* Padding bottom pour la barre mobile */
    padding-bottom: 100px;
  }

  @media (min-width: 1024px) {
    .delivery-form-overlay {
      padding-bottom: 2rem;
    }
  }

  /* Layout 2 colonnes desktop */
  .delivery-form-layout {
    @apply flex gap-6 mx-auto w-full max-w-6xl;
    @apply flex-col lg:flex-row;
  }

  /* Colonne principale (formulaire) */
  .delivery-form-main {
    @apply w-full pointer-events-auto;
    @apply lg:flex-1 lg:max-w-2xl;
  }

  /* Sidebar sticky (total + boutons) */
  .delivery-form-sidebar {
    @apply w-full pointer-events-auto;
    @apply lg:w-96 lg:flex-shrink-0;
  }

  .delivery-form-sticky {
    @apply lg:sticky lg:top-8;
  }

  /* Barre fixe mobile en bas */
  .delivery-form-mobile-bar {
    @apply fixed right-0 bottom-0 left-0 z-50;
    @apply px-4 py-3;
    @apply pointer-events-auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  /* Legacy - pour compatibilité */
  .delivery-form-container {
    @apply w-full pointer-events-auto;
    max-width: 90%;
    @apply lg:max-w-3xl;
  }

  /* Compact input styling for glass form */
  .glass-input {
    @apply px-3 py-2.5 w-full text-sm rounded-lg transition-all duration-200 placeholder-chalky-text-muted text-chalky-text-primary;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .glass-input:focus {
    @apply outline-none;
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--chalky-primary);
    box-shadow: 0 0 0 3px rgba(255, 1, 153, 0.15);
  }

  .glass-textarea {
    @apply px-3 py-2 w-full text-sm rounded-lg transition-all duration-200 resize-none placeholder-chalky-text-muted text-chalky-text-primary;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .glass-textarea:focus {
    @apply outline-none;
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--chalky-primary);
    box-shadow: 0 0 0 3px rgba(255, 1, 153, 0.15);
  }

  /* Slider expand animation */
  .slider-expand-enter {
    @apply overflow-hidden max-h-0 opacity-0;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
  }

  .slider-expand-active {
    @apply max-h-40 opacity-100;
  }
}

@layer components {
  /* =====================================================
     Tom Select - Hidden original select element
     Required because we don't load Tom Select's full CSS
     ===================================================== */
  .ts-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
  }

  /* =====================================================
     Icon Picker - Custom Tom Select for Font Awesome
     ===================================================== */

  .icon-picker-wrapper .ts-wrapper {
    @apply w-full;
  }

  .icon-picker-wrapper .ts-control {
    @apply flex gap-2 items-center px-3 py-2.5 w-full bg-chalky-surface rounded-t-md border-0 border-b-2 border-chalky-border cursor-pointer;
    @apply transition-colors duration-200 ease-out;
  }

  .icon-picker-wrapper .ts-wrapper.focus .ts-control {
    @apply border-chalky-text-primary;
  }

  .icon-picker-wrapper .ts-dropdown {
    @apply mt-1 max-h-80 rounded-lg border border-chalky-border shadow-xl;
    @apply overflow-hidden;
  }

  .icon-picker-wrapper .ts-dropdown-content {
    @apply overflow-y-auto max-h-72;
  }

  /* Icon picker option in dropdown */
  .icon-picker-option {
    @apply flex gap-3 items-center px-3 py-2.5 transition-colors duration-150;
    @apply hover:bg-chalky-surface-hover;
  }

  .icon-picker-option.active {
    @apply bg-chalky-surface-active;
  }

  .icon-picker-option--empty {
    @apply text-chalky-text-muted italic;
  }

  .icon-picker-option__icon {
    @apply flex flex-shrink-0 justify-center items-center w-8 h-8 text-lg text-chalky-text-primary bg-chalky-surface-tertiary rounded-md;
  }

  .icon-picker-option__label {
    @apply flex-grow text-sm font-medium text-chalky-text-primary;
  }

  .icon-picker-option__value {
    @apply text-xs text-chalky-text-muted;
  }

  /* Icon picker selected item */
  .icon-picker-item {
    @apply flex gap-2 items-center;
  }

  .icon-picker-item--empty {
    @apply text-chalky-text-muted italic;
  }

  .icon-picker-item__icon {
    @apply flex flex-shrink-0 justify-center items-center w-6 h-6 text-base text-chalky-text-primary;
  }

  .icon-picker-item__label {
    @apply text-sm font-medium text-chalky-text-primary;
  }

  /* Icon picker preview */
  .icon-picker-preview {
    @apply flex flex-shrink-0 justify-center items-center w-10 h-10 text-xl bg-chalky-surface-tertiary rounded-lg;
  }

  .icon-picker-preview--empty {
    @apply text-chalky-text-muted;
  }

  /* Search input in dropdown */
  .icon-picker-wrapper .dropdown-input-wrap {
    @apply p-2 border-b border-chalky-border;
  }

  .icon-picker-wrapper .dropdown-input {
    @apply px-3 py-2 w-full text-sm rounded-md border border-chalky-border;
    @apply focus:outline-none focus:border-chalky-text-primary;
  }

  /* =====================================================
     Custom Help Tooltip - Works with backdrop-filter
     Uses absolute positioning instead of fixed
     ===================================================== */

  .help-tooltip {
    @apply inline-flex relative;
  }

  .help-tooltip-trigger {
    @apply cursor-help;
  }

  .help-tooltip-content {
    @apply absolute invisible z-50 opacity-0;
    @apply p-4 w-72;
    @apply bg-white rounded-xl shadow-xl;
    @apply border border-gray-100;
    @apply transition-all duration-200 ease-out;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
  }

  .help-tooltip:hover .help-tooltip-content,
  .help-tooltip-trigger:focus + .help-tooltip-content {
    @apply visible opacity-100;
    transform: translateX(-50%) scale(1);
  }

  .help-tooltip-content::before {
    content: '';
    @apply absolute w-3 h-3 bg-white border-t border-l border-gray-100;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
  }

  @media (max-width: 640px) {
    .help-tooltip-content {
      left: auto;
      right: -8px;
      transform: scale(0.95);
    }

    .help-tooltip:hover .help-tooltip-content {
      transform: scale(1);
    }

    .help-tooltip-content::before {
      left: auto;
      right: 16px;
      transform: rotate(45deg);
    }
  }
}
@import 'actiontext.css';
/* 
 * Optimized Deliveries Archives Table Layout
 * Custom grid system with content-aware column sizing
 */

/* Table Header Grid Layout */
.deliveries-archive-table-header {
  display: grid;
  grid-template-columns: 
    minmax(80px, 10fr)   /* Livraison: Compact for ID + status */
    minmax(140px, 18fr)  /* Client & Date: Medium width */
    minmax(200px, 38fr)  /* Itinéraire: Largest for addresses */
    minmax(120px, 16fr)  /* Métriques: Medium for metrics */
    minmax(60px, 8fr)    /* Carnet: Small for icons */
    minmax(60px, 10fr);  /* Actions: Small for buttons */
  gap: 1rem;
  align-items: center;
}

/* Table Row Grid Layout - Matches header exactly */
.deliveries-archive-table-row {
  display: grid;
  grid-template-columns: 
    minmax(80px, 10fr)   /* Livraison */
    minmax(140px, 18fr)  /* Client & Date */
    minmax(200px, 38fr)  /* Itinéraire */
    minmax(120px, 16fr)  /* Métriques */
    minmax(60px, 8fr)    /* Carnet */
    minmax(60px, 10fr);  /* Actions */
  gap: 1rem;
  align-items: center;
}

/* Responsive behavior for smaller screens */
@media (max-width: 1280px) {
  .deliveries-archive-table-header,
  .deliveries-archive-table-row {
    grid-template-columns: 
      minmax(70px, 9fr)
      minmax(120px, 16fr)
      minmax(180px, 40fr)  /* Give more space to addresses on smaller screens */
      minmax(100px, 18fr)
      minmax(50px, 7fr)
      minmax(50px, 10fr);
    gap: 0.75rem;
  }
}

@media (max-width: 1024px) {
  .deliveries-archive-table-header,
  .deliveries-archive-table-row {
    grid-template-columns: 
      minmax(60px, 8fr)
      minmax(100px, 15fr)
      minmax(160px, 42fr)  /* Maximum space for addresses */
      minmax(80px, 20fr)
      minmax(40px, 6fr)
      minmax(40px, 9fr);
    gap: 0.5rem;
  }
}

/* Enhanced column-specific styling */
.deliveries-archive-table-row > *:nth-child(1) {
  /* Livraison column - center everything */
  justify-self: center;
}

.deliveries-archive-table-row > *:nth-child(2) {
  /* Client & Date column - left align with smart truncation */
  justify-self: start;
  min-width: 0; /* Allow shrinking */
}

.deliveries-archive-table-row > *:nth-child(3) {
  /* Itinéraire column - left align with generous space */
  justify-self: start;
  min-width: 0; /* Allow shrinking */
}

.deliveries-archive-table-row > *:nth-child(4) {
  /* Métriques column - left align for inline labels */
  justify-self: start;
}

.deliveries-archive-table-row > *:nth-child(5) {
  /* Carnet column - center align */
  justify-self: center;
}

.deliveries-archive-table-row > *:nth-child(6) {
  /* Actions column - center align */
  justify-self: center;
}

/* Smart text truncation for address fields */
.deliveries-archive-table-row .truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Improved hover effects */
.deliveries-archive-table-row:hover {
  background-color: rgb(239 246 255); /* bg-blue-50 */
}

/* Better spacing for route visualization */
.deliveries-archive-table-row .space-y-2 > * + * {
  margin-top: 0.5rem;
}

/* Metrics grid improvements */
.deliveries-archive-table-row .grid.grid-cols-1 {
  gap: 0.25rem;
}

/* Action buttons positioning */
.deliveries-archive-table-row .opacity-0.group-hover\:opacity-100 {
  transition: opacity 0.2s ease-in-out;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
