@media print {
    #feedback-box {
        display: none;
    }

    .feedback-box-title {
        display: none;
    }

    #share-to-applications {
        display: none;
    }

    .grid.receipt-box {
        box-shadow: 0 2px 10px #ffffff;
        margin-top: 0;
        margin-bottom: 0;
    }

    .additionalInformation .grid.receipt-box {
        border-top: 1px solid lightgray;
    }

    .main-content {
        background-color: #ffffff;
    }
}

body {
    margin: 0;
    font-family: Calibri, sans-serif;
    font-weight: 400;
    font-size: 11pt;
    font-style: normal;
}

.main-content {
    min-height: 100vh;
    background-color: #f5f5f5;
}

.print-content {
    max-width: 84mm;
    margin: 0 auto;
}

.container,
.additionalInformation {
    display: flex;
    justify-content: center;
    align-items: center;
}

.additionalInformation pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 400;
    font-size: 11pt;
    font-style: normal;
}

.feedback-box {
    grid-row: span 4;
}

.receipt-box {
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #ffffff;
    max-width: 80mm;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 8px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 20mm);
    grid-auto-rows: minmax(15pt, auto);
    line-height: normal;
}

.colspan-1 {
    grid-column: span 1;
}

.rowspan-1 {
    grid-row: span 1;
}

.colspan-2 {
    grid-column: span 2;
}

.rowspan-2 {
    grid-row: span 2;
}

.colspan-3 {
    grid-column: span 3;
}

.rowspan-3 {
    grid-row: span 3;
}

.logo-cell {
    grid-column: span 4;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2em 0;
}

.flex {
    display: flex;
}

.justify-center {
    align-items: center;
}

.align-center {
    justify-content: center;
}

.align-left {
    justify-content: start;
}

.align-right {
    justify-content: end;
}

.font-xl {
    font-size: 16pt;
    font-weight: 700;
}

.font-md {
    font-size: 11pt;
    font-weight: 700;
}

.border-double-top {
    border-top: 3px double black;
    margin-bottom: 7px;
}

.border-double-bottom {
    border-bottom: 3px double black;
    margin-bottom: 7px;
}

.border-small-top {
    border-top: 0.5pt solid black;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-top: 5px;
}

.border-small-bottom {
    border-bottom: 0.5pt solid black;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.fat-text {
    font-weight: 700;
}

.right-aligned-text {
    display: flex;
    justify-content: end;
}

.centered-text {
    display: flex;
    justify-content: center;
}

.full-width {
    grid-column: span 4;
}

.fiscalcode-cell {
    font-size: 11px;
    margin-top: 1em;
}

.fiscalcode-cell .signature-value {
    max-width: 40mm;
    margin: 0 20mm;
}

.powered-by {
    font-size: 14px;
    text-align: center;
    line-height: 1.5em;
    margin-bottom: 1em;
}

.powered-by a {
    color: #000000;
    text-decoration-style: dotted;
    cursor: pointer;
}

.powered-by .powered-by-id {
    font-size: 13px;
}

.qrcode-cell {
    grid-column: span 4;
    grid-row: span 7;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1em 0;
}

.ft-logo-cell {
    grid-column: span 4;
    grid-row: span 3;
}

.ft-logo-cell>img {
    margin: 10px auto;
    display: block;
}

.ft-logo-cell a {
    text-decoration: none;
}
.font-small {
    font-size: 0.8em;
}

.font-very-small {
    font-size: 0.7em;
}
.rating {
    font-family: FontAwesome;
    font-size: 3em;
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    padding-top: 5px;
}

.rating>input {
    display: none;
}

.rating>label {
    position: relative;
    width: 1.1em;
    color: #ffc600;
    cursor: pointer;
}

.rating>label::before {
    content: "";
    position: absolute;
    opacity: 0;
}

.rating>label:hover:before,
.rating>label:hover~label:before {
    opacity: 1 !important;
}

.rating>input:checked~label:before {
    opacity: 1;
}

.rating:hover>input:checked:not([disabled])~label:before {
    opacity: 0.4;
}

.rating>input:disabled~label:before {
    cursor: not-allowed;
}

/* signatures box */
div.signature-key {
    padding-top: 0.5em;
}

div.signature-value, div.signature-key {
    inline-size: 80mm;
    overflow-wrap: break-word;
    display: inline-block;
    text-align: center;
}

.grid>.signatures {
    border-top: 0.5pt solid black;
}

/* merchant footer text (receipt setting footertext): keep its line breaks */
div.footer-text {
    white-space: pre-line;
}

.grid>.signatures~.signatures {
    border: none;
}

.receipt-hero-share-box {
    grid-row: span 5;
    grid-column: span 4;
    border-top: 0.5pt solid black;
    font-size: 0.9em;
}

#share-to-applications {
    text-align: center;
    padding: 0.5em 0;
}

#share-to-applications p {
    margin: 1em auto 0.5em auto;
}

#share-to-applications a {
    text-decoration: none;
    cursor: pointer;
    width: 5.5em;
    color: black;
    display: inline-block;
    text-align: center;
    margin: 0.5em 0.25em 1em 0.25em;
    font-size: 0.8em;
    vertical-align: top;
}

#share-to-applications img {
    margin: 0.5em 0 0.8em 0;
    cursor: pointer;
}

#share-to-applications .partner-link-label {
    display: inline-block;
}

#share-to-applications .app-icon {
    width: 47px;
    height: 47px;
    background: white;
    border-radius: 10px;
    border: 0.50px #C7C7C7 solid;
    margin: 0.5em auto;
}

/* Error state styling */
.error-banner {
    background-color: #fff3cd;
    border: 3px solid #dc3545;
    border-radius: 5px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    align-items: flex-start;
}

.error-icon {
    font-size: 36px;
    color: #dc3545;
    margin-right: 15px;
    line-height: 1;
}

.error-content {
    flex: 1;
}

.error-title {
    font-size: 14pt;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.error-subtitle {
    font-size: 10pt;
    color: #856404;
    margin-bottom: 10px;
    font-style: italic;
}

.error-message {
    font-size: 9pt;
    color: #333;
    background-color: #fff;
    padding: 8px;
    margin: 5px 0;
    border-left: 3px solid #dc3545;
    border-radius: 3px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
}

@media print {
    .error-banner {
        background-color: #fff !important;
        border: 3px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .error-icon {
        color: #000 !important;
    }
    
    .error-title {
        color: #000 !important;
    }
    
    .error-subtitle {
        color: #000 !important;
    }
}