﻿@page {
    size: A5;
    margin: 6mm;
}

@media print {
  @page { size: A5; margin: 6mm }
}
.footer h5{
    font-size: 10px !important;
}
/* Rimuove i punti dalle liste */
.footer ul {
  list-style-type: none; /* niente bullets */
  padding-left: 0;       /* elimina padding a sinistra */
  margin: 0;             /* elimina margine predefinito */
}

/* Imposta interlinea minima per gli elementi della lista */
.footer ul li {
  line-height: 1.2;      /* puoi regolare: 1.1 piu compatto, 1.3 piu spazioso */
  margin-bottom: 2px;    /* piccolo spazio tra le righe */
  font-size:8px;
}
.indicator-wrapper {
    position: relative; /* Crea il contesto per il posizionamento */
    width: 180px;
    height: 110px;
}

.axis-background {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* Immagine dietro */
}

svg {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2; /* Freccia davanti */
    overflow: visible; /* IMPORTANTE: permette alla freccia di uscire dai bordi senza sparire */
}
.footer table{
     width: 100%;
}
body {
    background-color: #f8f9fa;
    padding: 10px;
    padding-top: 10px;
}

.action-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.action-menu .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: 500;
}

.action-menu .btn i {
    font-size: 16px;
}

 .prescription-container {
    width: 148mm;
    min-height: 210mm;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.header {
    border-bottom: 2px solid #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 200px;
    height: auto;
}

.header-info {
    margin-left: 15px;
}

.header-info h6 {
    color: #0d9488;
    font-size: 11px;
    margin: 0;
    font-weight: 600;
}

.header-info h4 {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
}

.header-info p {
    font-size: 11px;
    margin: 0;
    color: #666;
}

.header-contact {
    text-align: right;
    font-size: 9px;
    color: #666;
    line-height: 1.3;
}

.main-content {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.info-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-field label {
    font-weight: 600;
    margin: 0;
}

.info-field input {
    border: none;
    border-bottom: 1px solid #333;
    padding: 2px 8px;
    font-size: 13px;
    outline: none;
    background-color: #f3f4f6;
}

.axis-indicators {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.axis-container {
    text-align: center;
}

.indicator-wrapper {
    position: relative;
    display: inline-block;
    width: 180px;
    height: 130px;
}

.axis-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 179px;
    height: auto;
    z-index: 1;
}
.axis-backgrounddx {
    position: absolute;
    top: 0;
    left: 0;
    width: 178px;
    height: auto;
    z-index: 1;
}

.indicator-wrapper svg {
    position: absolute;
    top: 10px;
    left: 0;
    z-index: 2;
}

.axis-label {
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: bold;
    z-index: 3;
    width: 100%;
}

.prescription-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 15px;
}

.prescription-table th,
.prescription-table td {
    border: 1px solid #333;
    padding: 4px;
    text-align: center;
}

.prescription-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.prescription-table input {
    border: none;
    width: 100%;
    text-align: center;
    font-size: 11px;
    outline: none;
    background-color: #f3f4f6;
}

.cell-label {
    font-size: 8px;
    color: #666;
    line-height: 1.2;
    width: 70px;
    position: absolute;
    margin-left: 48px;
    min-height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.prisma-section {
    text-align: center;
    margin:  0;
    font-size: 14px;
}

.additional-fields {
    margin-top: 20px;
}

.field-group {
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
    margin-bottom: 6px;
}

.field-group label {
    font-size: 11px;
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

.field-group input,
.field-group textarea {
    border: none;
    width: 100%;
    font-size: 11px;
    outline: none;
    background-color: #f3f4f6;
    resize: none;
}

.footer-text {
    font-size: 9px;
    color: #666;
    font-style: italic;
    margin-top: 15px;
}

.prescription-wrapper {
    display: none;
}

.prescription-wrapper.active {
    display: block;
}

#prescrizioneForm2 input[type="text"],
#prescrizioneForm2 input[type="date"] {
    font-size: 16px;   /* testo piu piccolo/grande */
}

#prescrizioneForm2 .prescription-container {
    display: flex;
    flex-direction: column;
}

#prescrizioneForm2 .form2-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#prescrizioneForm2 .form2-editor-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#prescrizioneForm2 #ednote.form2-editor {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #dcdcdc;
    line-height: 1.2;
    white-space: pre-wrap;
    tab-size: 4;
    -moz-tab-size: 4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Stessa interlinea per paragrafi e a-capo forzati */
#prescrizioneForm2 #ednote.form2-editor p,
#prescrizioneForm2 #ednote.form2-editor div {
    line-height: inherit;
    margin: 0;
    white-space: inherit;
    tab-size: inherit;
    -moz-tab-size: inherit;
    overflow-wrap: inherit;
    word-break: inherit;
}

#prescrizioneForm2 #ednote.form2-editor .editor-tab-stop {
    display: inline-block;
    min-width: 8px;
    white-space: pre;
    vertical-align: baseline;
}

.print-mode {
    background: #fff !important;
}

.print-mode body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}

.print-mode .no-print,
.print-mode .action-menu {
    display: none !important;
}

.print-mode #prescriptions {
    position: fixed;
    inset: 0;
    overflow: hidden !important;
}

.print-mode #prescriptions .prescription-wrapper {
    display: none !important;
}

.print-mode #prescriptions .prescription-wrapper.active {
    display: block !important;
    position: fixed;
    inset: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.print-mode #prescriptions .prescription-wrapper.active > .prescription-container {
    width: 136mm !important;
    height: 198mm !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box;
    box-shadow: none !important;
    overflow: hidden !important;
}

.print-mode #prescrizioneForm2 .prescription-container {
    display: flex;
    flex-direction: column;
}

.print-mode #prescrizioneForm2 .form2-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
    overflow: hidden;
}

.print-mode #prescrizioneForm2 .form2-editor-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.print-mode #prescrizioneForm2 #ednote {
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    border: none !important;
}

.print-mode #prescrizioneForm2 .form2-signature {
    margin-top: auto !important;
    margin-bottom: calc(4mm + 40px) !important;
    padding-right: 45px;
}

.print-mode #prescrizioneForm2 .form2-footer-wrap {
    margin: 0 !important;
    padding: 0 !important;
}

.print-mode .info-field input,
.print-mode .prescription-table input,
.print-mode .field-group input,
.print-mode .field-group textarea {
    border: none !important;
    background-color: transparent !important;
}


@media print {
    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
    }

    body * {
        visibility: hidden !important;
    }

    .no-print,
    .action-menu {
        display: none !important;
    }

    #prescriptions {
        position: fixed;
        inset: 0;
        overflow: hidden !important;
    }

    #prescriptions .prescription-wrapper {
        display: none !important;
    }

    #prescriptions .prescription-wrapper.active,
    #prescriptions .prescription-wrapper.active * {
        visibility: visible !important;
    }

    #prescriptions .prescription-wrapper.active {
        display: block !important;
        position: fixed;
        inset: 0;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        break-before: avoid-page !important;
        break-after: avoid-page !important;
        break-inside: avoid-page !important;
    }

    #prescriptions .prescription-wrapper.active > .prescription-container {
        width: 136mm !important;
        height: 198mm !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box;
        box-shadow: none !important;
        overflow: hidden !important;
    }

    #prescrizioneForm2 .prescription-container {
        display: flex;
        flex-direction: column;
    }

    #prescrizioneForm2 .form2-main {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 0 !important;
        border-bottom: 0 !important;
        overflow: hidden;
    }

    #prescrizioneForm2 .form2-editor-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    #prescrizioneForm2 #ednote {
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        border: none !important;
    }

    #prescrizioneForm2 .form2-signature {
        margin-top: auto !important;
        margin-bottom: calc(4mm + 40px) !important;
        padding-right: 45px;
    }

    #prescrizioneForm2 .form2-footer-wrap {
        margin: 0 !important;
        padding: 0 !important;
        page-break-inside: avoid;
    }

    .info-field input,
    .prescription-table input,
    .field-group input,
    .field-group textarea {
        border: none !important;
        background-color: transparent !important;
    }
}




