/* Grafica autocomplete */

.twitter-typeahead {
    width: 100%;
}

.twitter-typeahead .tt-menu {
    width: 100%;
    background: #fff;
    border: 1px solid #cccccc;
    border-radius: 5px;
    padding: .75rem 0;
}

.twitter-typeahead .tt-menu .tt-suggestion {
    padding: .25rem .75rem;
    cursor: pointer;
}

.twitter-typeahead .tt-menu .tt-suggestion:hover {
    background-color: #EAEBEC;
    color: #343A40;
}

.twitter-typeahead .empty-message {
    padding: 5px 10px;
/* text-align: center; } */
}

.twitter-typeahead .rtl-typeahead .tt-menu {
    text-align: right;
}

.twitter-typeahead .league-name {
    margin: 0 10px 5px;
    padding: 7px 5px 10px;
    border-bottom: 1px solid #e9ecef;
}

.scrollable-dropdown .twitter-typeahead .tt-menu {
    max-height: 80px;
    overflow-y: auto;
}

.bootstrap-maxlength {
    margin-top: .5rem;
}

/* modifica la lista dei risultati ricerca autocomplete typehead */
.tt-dataset {
    max-height: 450px;
    overflow-x: hidden;
    overflow-y: scroll;
}

/* Modifiche al css bundle template */
.accordion-button:not(.collapsed) {
    color: var(--bs-accordion-active-color);
    background-color: #ffffff; /* custom PartneREvolution per fondo bianco in header button accordion*/
    box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color);
}

/* CUSTOM CSS FOR INPUT TYPE FILE */

input.custom-attachment{
  outline: none !important;
  padding: 4px !important;
  margin: -4px !important;
  width: 210px !important;
}

input.custom-attachment:focus-within::file-selector-button,
input.custom-attachment:focus::file-selector-button {
  outline: 0 solid #1b84ff !important;
  outline-offset: 2px !important;
}

input.custom-attachment::before {
  top: 16px !important;
}

input.custom-attachment::after {
  top: 14px !important;
}

input.custom-attachment {
  position: relative !important;
}

input.custom-attachment::file-selector-button {
  width: 45px !important;
  color: transparent !important;
  border-bottom: 0 !important;
}

input.custom-attachment::before {
  position: absolute !important;
  pointer-events: none !important;
  left: 40px !important;
  color: #1b84ff !important;
  content: "" !important;
}

input.custom-attachment::after {
  position: absolute !important;
  pointer-events: none !important;
  left: 16px !important;
  height: 20px !important;
  width: 20px !important;
  content: "" !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230964B0'%3E%3Cpath d='M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z'/%3E%3C/svg%3E") !important;
  /*background-image: url("../../../src/media/icons/custom/paper-clip.png") !important;*/
}

input.custom-attachment::file-selector-button {
  border-radius: 4px !important;
  padding: 0 16px !important;
  height: 40px !important;
  cursor: pointer !important;
  background-color: white !important;
  border: 0px solid rgba(0, 0, 0, 0.16) !important;
  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05) !important;
  margin-right: 16px !important;
  transition: background-color 200ms !important;
}

/* hover state */
input.custom-attachment::file-selector-button:hover {
  background-color: #e9f3ff !important;
}

/* active state */
input.custom-attachment::file-selector-button:active {
  background-color: #e9f3ff !important;
}

.hidden-object-info {
  display:none !important;
}

.pac-container {
    z-index: 1060 !important;
}

/* summernote */
div.note-frame {
    border-radius: 5px !important;
    border-color: #e4e4e4 !important;
}

.note-btn-group {
    background-color: #FAFAFA;
}

/* dual list box */

.bootstrap-duallistbox-container:not(.moveonselect) select {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 5px !important;
    border-bottom-right-radius: 5px !important;
    border-color: #e4e4e4 !important;
    border-width: 1px !important;
    padding: 5px !important;
}

.bootstrap-duallistbox-container select {
    width: 100%;
    height: 300px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 5px !important;
    border-bottom-right-radius: 5px !important;
    border-color: #e4e4e4 !important;
    border-width: 1px !important;
    padding: 5px !important;
}

.bootstrap-duallistbox-container select:focus {

}

.nanotec-icon {
    width: 100px;
    height: 100px;
    background: var(--c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    font-size: 16px;
    color: white;
    font-weight: bold;
    margin: 5px;
}

.nanotec-icon-small {
    width: 60px;
    height: 60px;
    background: var(--c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    font-size: 10px;
    color: white;
    font-weight: bold;
    margin: 2px;
}

.calendar-user-icon {
    /* width: 70px; */
    height: 85px;
    background: var(--c);
    border-radius: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    font-size: 16px;
    color: white;
    font-weight: bold;
    margin: -12px;
}

/* ==========================================================================
   Tab "Time Line" del piano terapeutico (modale scheda persona)
   Vista Blade: Modules/Process/resources/views/diagram_modals/therapeutic_plan_table/_show_plan_time_line.blade.php
   Mockup originale: entheos-pianoterapeutico/percorso-terapeutico.html

   IMPORTANTE: tutte le classi e gli id qui sotto usano il prefisso "tptl-"
   (Therapeutic Plan Time Line) apposta, per non entrare in conflitto con le
   classi di Metronic/Bootstrap già usate nel resto della pagina (nomi come
   ".dialog", ".overlay", ".stop" sarebbero troppo generici e rischiosi).
   Anche le custom property CSS (--tptl-...) sono definite dentro lo scope
   ".tptl-timeline" invece che su :root, per lo stesso motivo.
   ========================================================================== */

.tptl-timeline {
    /* colori di base */
    --tptl-bg: #f2f2f7;
    --tptl-surface: #fff;
    --tptl-surface2: #f9f9fb;
    --tptl-border: rgba(0, 0, 0, .07);
    --tptl-border-mid: rgba(0, 0, 0, .13);
    --tptl-text: #1c1c1e;
    --tptl-text2: #3a3a3c;
    --tptl-text3: #8e8e93;

    /* colori per tipo componente: exam = verde/teal */
    --tptl-exam-dot: #1a9e5f;
    --tptl-exam-card-bg: #f0fdf6;
    --tptl-exam-card-bd: rgba(26, 158, 95, .28);
    --tptl-exam-icon-bg: #d1fae5;
    --tptl-exam-icon-fg: #065f46;
    --tptl-exam-badge-bg: rgba(26, 158, 95, .12);
    --tptl-exam-badge-fg: #065f46;

    /* colori per tipo componente: therapy = indaco/viola */
    --tptl-therapy-dot: #6366f1;
    --tptl-therapy-card-bg: #f5f3ff;
    --tptl-therapy-card-bd: rgba(99, 102, 241, .25);
    --tptl-therapy-icon-bg: #ede9fe;
    --tptl-therapy-icon-fg: #4338ca;
    --tptl-therapy-badge-bg: rgba(99, 102, 241, .12);
    --tptl-therapy-badge-fg: #4338ca;

    /* colori per tipo componente: treatment = arancione/ambra */
    --tptl-treatment-dot: #e07c00;
    --tptl-treatment-card-bg: #fffbeb;
    --tptl-treatment-card-bd: rgba(224, 124, 0, .25);
    --tptl-treatment-icon-bg: #fef3c7;
    --tptl-treatment-icon-fg: #92400e;
    --tptl-treatment-badge-bg: rgba(224, 124, 0, .12);
    --tptl-treatment-badge-fg: #92400e;

    /* colori generici, usati per tipi componente non mappati sopra (es. "visit") */
    --tptl-generic-dot: #8e8e93;
    --tptl-generic-card-bg: #f9f9fb;
    --tptl-generic-card-bd: rgba(0, 0, 0, .10);
    --tptl-generic-icon-bg: #f2f2f7;
    --tptl-generic-icon-fg: #636366;
    --tptl-generic-badge-bg: rgba(0, 0, 0, .07);
    --tptl-generic-badge-fg: #636366;

    /* colori di stato (completato / prenotato / annullato / in attesa) */
    --tptl-blue: #007aff;
    --tptl-blue-bg: rgba(0, 122, 255, .09);
    --tptl-green: #34c759;
    --tptl-green-d: #1a7f37;
    --tptl-green-bg: rgba(52, 199, 89, .10);
    --tptl-red: #ff3b30;
    --tptl-red-d: #c41a14;
    --tptl-red-bg: rgba(255, 59, 48, .10);
    --tptl-orange: #ff9500;
    --tptl-orange-d: #b25000;
    --tptl-orange-bg: rgba(255, 149, 0, .10);
    --tptl-gray-bg: rgba(142, 142, 147, .09);

    --tptl-shadow-card: 0 1px 4px rgba(0, 0, 0, .05), 0 4px 14px rgba(0, 0, 0, .06);
    --tptl-shadow-hover: 0 4px 18px rgba(0, 0, 0, .12), 0 8px 28px rgba(0, 0, 0, .09);
    --tptl-radius: 12px;
    --tptl-radius-sm: 8px;
    --tptl-radius-pill: 999px;

    background: var(--tptl-bg);
    padding: 12px;
    border-radius: var(--tptl-radius);
}

/* legenda tipologie, sopra la timeline */
.tptl-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 9px 4px 14px;
    font-size: .75rem;
    font-weight: 500;
    color: var(--tptl-text3);
}

.tptl-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tptl-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* contenitore scrollabile orizzontale della timeline */
.tptl-track-scroll {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 28px;
    scrollbar-width: thin;
    scrollbar-color: #c7c7cc transparent;
}

.tptl-track-scroll::-webkit-scrollbar {
    height: 5px;
}

.tptl-track-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.tptl-track-scroll::-webkit-scrollbar-thumb {
    background: #c7c7cc;
    border-radius: 3px;
}

.tptl-track-inner {
    position: relative;
    display: inline-block;
    min-width: 100%;
    padding: 0 48px;
}

.tptl-track-wrap {
    position: relative;
}

/* segmenti della linea orizzontale, tra una tappa e l'altra */
.tptl-lseg {
    position: absolute;
    height: 4px;
    border-radius: 2px;
    pointer-events: none;
    top: 0;
}

.tptl-lseg-done {
    background: var(--tptl-green);
    opacity: .7;
}

.tptl-lseg-sched {
    background: var(--tptl-blue);
    opacity: .35;
}

.tptl-lseg-mix {
    background: linear-gradient(90deg, var(--tptl-green) 40%, var(--tptl-blue) 60%);
    opacity: .55;
}

.tptl-lseg-cancel {
    background: #c7c7cc;
}

/* separatore/etichetta di mese lungo la linea */
.tptl-month-tick {
    position: absolute;
    top: -10px;
    width: 1px;
    height: 22px;
    background: var(--tptl-border-mid);
    z-index: 3;
    pointer-events: none;
}

.tptl-month-lbl {
    position: absolute;
    top: -28px;
    transform: translateX(-50%);
    font-size: .65rem;
    font-weight: 600;
    color: var(--tptl-text3);
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    background: var(--tptl-bg);
    padding: 0 4px;
    z-index: 4;
}

/* pallini "Inizio" / "Fine" alle due estremità della linea */
.tptl-ep {
    position: absolute;
    z-index: 6;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #fff;
    font-size: .5rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    top: 50%;
    transform: translateY(-50%);
}

.tptl-ep-start {
    background: var(--tptl-blue);
    box-shadow: 0 2px 8px rgba(0, 122, 255, .3), 0 0 0 4px rgba(0, 122, 255, .12);
}

.tptl-ep-end {
    background: var(--tptl-green);
    box-shadow: 0 2px 8px rgba(52, 199, 89, .3), 0 0 0 4px rgba(52, 199, 89, .12);
}

/* singola tappa: pallino + stelo + card */
.tptl-stop {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}

.tptl-stop:hover {
    transform: translateX(-50%) translateY(-4px) scale(1.04);
}

.tptl-stop:active {
    transform: translateX(-50%) scale(.97);
}

.tptl-stop:hover .tptl-scard {
    box-shadow: var(--tptl-shadow-hover);
}

.tptl-stop.tptl-above {
    flex-direction: column-reverse;
}

.tptl-stop.tptl-above .tptl-scard {
    margin-bottom: 8px;
    margin-top: 0;
}

.tptl-stop.tptl-below .tptl-scard {
    margin-top: 8px;
    margin-bottom: 0;
}

.tptl-sdot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--tptl-surface);
    box-shadow: 0 0 0 1.5px var(--tptl-border-mid);
    flex-shrink: 0;
    z-index: 6;
}

.tptl-stem {
    width: 2px;
    flex-shrink: 0;
    background: var(--tptl-border-mid);
}

/* card di dettaglio sintetico della tappa */
.tptl-scard {
    border-radius: var(--tptl-radius);
    padding: 9px 10px 9px;
    width: 118px;
    box-shadow: var(--tptl-shadow-card);
    transition: box-shadow .18s, border-color .15s;
    position: relative;
    border: 1px solid var(--tptl-border);
}

.tptl-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.tptl-cicon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tptl-cicon svg {
    width: 11px;
    height: 11px;
}

.tptl-ctype-badge {
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.tptl-clabel {
    font-size: .68rem;
    font-weight: 600;
    color: var(--tptl-text);
    line-height: 1.25;
    letter-spacing: -.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
}

.tptl-cdate {
    font-size: .62rem;
    color: var(--tptl-text3);
    letter-spacing: -.01em;
    margin-bottom: 2px;
}

.tptl-cdoc {
    font-size: .6rem;
    color: var(--tptl-text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 3px;
}

.tptl-cstatus {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .6rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 4px;
    margin-bottom: 3px;
}

.tptl-ss-completed {
    background: var(--tptl-green-bg);
    color: var(--tptl-green-d);
}

.tptl-ss-scheduled {
    background: var(--tptl-blue-bg);
    color: var(--tptl-blue);
}

.tptl-ss-cancelled {
    background: var(--tptl-red-bg);
    color: var(--tptl-red-d);
}

.tptl-ss-pending {
    background: var(--tptl-orange-bg);
    color: var(--tptl-orange-d);
}

.tptl-ss-default {
    background: var(--tptl-gray-bg);
    color: var(--tptl-text3);
}

.tptl-cnote {
    font-size: .6rem;
    color: var(--tptl-text3);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, .06);
    padding-top: 3px;
    margin-top: 2px;
    font-style: italic;
}

/* ── variante "large" della Time Line (riquadri più grandi), usata dal
   dialog in sola lettura process::therapeutic_plan_timeline. Le misure
   orizzontali/verticali corrispondenti sono nelle costanti JS di
   tptlRenderTimeline (isLargeTimeline). ── */
.tptl-size-large .tptl-scard {
    width: 186px;
    padding: 12px 14px;
}

.tptl-size-large .tptl-cicon {
    width: 28px;
    height: 28px;
}

.tptl-size-large .tptl-cicon svg {
    width: 15px;
    height: 15px;
}

.tptl-size-large .tptl-ctype-badge {
    font-size: .7rem;
    padding: 2px 7px;
}

.tptl-size-large .tptl-clabel {
    font-size: .95rem;
}

.tptl-size-large .tptl-cdate {
    font-size: .82rem;
}

.tptl-size-large .tptl-cdoc {
    font-size: .8rem;
}

.tptl-size-large .tptl-cstatus {
    font-size: .78rem;
    padding: 3px 8px;
}

.tptl-size-large .tptl-cnote {
    font-size: .78rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
}

.tptl-size-large .tptl-sdot {
    width: 22px;
    height: 22px;
}

/* dialog di dettaglio, che si apre al click su una tappa */
.tptl-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    /* sopra la modale Bootstrap del piano terapeutico (z-index standard 1055) */
    background: rgba(0, 0, 0, .22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.tptl-overlay.tptl-open {
    opacity: 1;
    pointer-events: all;
}

.tptl-dialog {
    background: var(--tptl-surface);
    border-radius: 18px;
    width: min(460px, 94vw);
    box-shadow: 0 32px 80px rgba(0, 0, 0, .18), 0 8px 24px rgba(0, 0, 0, .1);
    transform: scale(.95) translateY(14px);
    transition: transform .24s cubic-bezier(.34, 1.4, .64, 1);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.tptl-overlay.tptl-open .tptl-dialog {
    transform: scale(1) translateY(0);
}

.tptl-dh {
    padding: 18px 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}

.tptl-dico {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tptl-dico svg {
    width: 22px;
    height: 22px;
}

.tptl-dtitle {
    flex: 1;
    padding-top: 2px;
}

.tptl-dname {
    font-size: .98rem;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.tptl-dsub {
    font-size: .75rem;
    color: var(--tptl-text3);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.tptl-dtype-pill {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: var(--tptl-radius-pill);
}

.tptl-dclose {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--tptl-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}

.tptl-dclose:hover {
    background: #e5e5ea;
}

.tptl-dbody {
    padding: 14px 20px 20px;
    overflow-y: auto;
}

.tptl-dgrid {
    display: grid;
    grid-template-columns: 88px 1fr;
    border: 1px solid var(--tptl-border);
    border-radius: var(--tptl-radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.tptl-dr {
    display: contents;
}

.tptl-dr>* {
    padding: 8px 11px;
    font-size: .8rem;
    border-bottom: 1px solid var(--tptl-border);
}

.tptl-dr:last-child>* {
    border-bottom: none;
}

.tptl-dk {
    background: var(--tptl-surface2);
    color: var(--tptl-text3);
    font-weight: 500;
    font-size: .7rem;
    letter-spacing: .01em;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--tptl-border);
}

.tptl-dv {
    background: var(--tptl-surface);
    color: var(--tptl-text);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
}

.tptl-dnotes-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--tptl-text3);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tptl-dnotes-box {
    background: var(--tptl-surface2);
    border: 1px solid var(--tptl-border);
    border-radius: var(--tptl-radius-sm);
    padding: 11px 13px;
    font-size: .8rem;
    color: var(--tptl-text2);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.tptl-step-pill {
    display: inline-flex;
    align-items: center;
    background: var(--tptl-bg);
    border: 1px solid var(--tptl-border-mid);
    font-size: .68rem;
    font-weight: 600;
    color: var(--tptl-text3);
    padding: 2px 8px;
    border-radius: var(--tptl-radius-pill);
}

.tptl-time-range {
    font-size: .75rem;
    color: var(--tptl-text3);
}

.tptl-dstat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
}

.container-xxl {
    max-width: 100% !important;
}