:root {
    --font-size-index: 24px;
    --font-size-section: 20px;
    --font-size-events: 24px;
    --font-size-menu: 16px;
    --font-size-search: 16px;

    --padding-body: 16px;
    --padding-bottom-body: 128px;
    --padding-button-y: 0.75em;
    --padding-button-x: 1.5em;

    --gap-menu-rows: 0.375em;

    --border-radius-button: 1.5em;
    --underline-offset: 6.5px;
    --underline-thickness: 2px;

    --search-expanded-width: 160px;
}

@font-face {
    font-family: "Renato";
    src: url("fonts/Renato-Regular.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Renato";
    src: url("fonts/Renato-Italic.otf") format("opentype");
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: "Peso";
    src: url("fonts/Peso-Regular.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Peso";
    src: url("fonts/Peso-Normal.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Peso";
    src: url("fonts/Peso-Bold.otf") format("opentype");
    font-weight: bold;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #e5e5e5;
    visibility: hidden;
}

body {
    margin: 0;
    padding: var(--padding-body) var(--padding-body) var(--padding-bottom-body);
    background-color: #e5e5e5;
    visibility: hidden;
}

i {
    font-family: "Renato", sans-serif;
    font-style: italic;
}

ul.results {
    list-style-type: none; /* rimuove bullet di default */
    margin-left: 0;
    padding-left: 0;
    position: relative; /* necessario per posizionamento assoluto interno */
}

ul.results li {
    margin-left: 0;
    padding-left: var(--padding-body); /* larghezza bullet + margine a sinistra per il testo */
    position: relative; /* per il bullet posizionato assolutamente */
}

.bullet::before {
    content: "•";
    font-size: var(--font-size-search);
    line-height: 1.2;
    position: absolute;
    left: 0;
    top: 0;
    width: auto; /* larghezza fissa per allineare */
    text-align: center;
    margin-right: 0; /* tolto perché ora gestito dal padding del li */
    display: inline-block;
}

.page-index {
    font-family: "Renato", sans-serif;
    font-size: var(--font-size-index);
    line-height: 1.2;
    font-weight: normal;
    font-style: normal;
}

.page-index p {
    margin: 0 0 1.2em 0;
}

.page-index a {
    color: black;
    text-decoration: underline;
    text-underline-offset: var(--underline-offset);
    text-decoration-thickness: var(--underline-thickness);
}

.page-index a:hover,
.page-index a:focus,
.page-index a:active {
    text-decoration: none;
    color: black;
}

.page-transparency,
.page-search,
.page-book-detail {
    font-family: "Renato", sans-serif;
    font-size: var(--font-size-section);
    line-height: 1.2;
    font-weight: normal;
    font-style: normal;
}

.page-transparency h1,
.page-stockists h1,
.page-search h1 {
    font-family: "Renato", sans-serif;
    font-size: var(--font-size-section);
    line-height: 1.2;
    font-weight: normal;
    font-style: italic;
    margin-bottom: 1.2em;
}

.transparency-table {
    width: 100%;
    font-family: "Renato", sans-serif;
    font-size: var(--font-size-section);
    line-height: 1.2;
    font-weight: normal;
    border-collapse: collapse;
}

.transparency-table td {
    vertical-align: top;
}

.transparency-table td:first-child {
    width: 33%;
    padding-right: 0.5em; /* metà gap */
}

.transparency-table td:last-child {
    width: 67%;
    padding-left: 0.5em; /* metà gap */
}

.transparency-table a {
    color: black !important;
    text-decoration: none !important;
    cursor: pointer;
}

.transparency-table a:hover,
.transparency-table a:focus,
.transparency-table a:active {
    color: black !important;
    text-decoration: none !important;
}

.page-books {
    font-family: "Renato", sans-serif;
    font-size: var(--font-size-section);
    line-height: 1.2;
    font-weight: normal;
    font-style: normal;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.books-visual {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-y: contain;
    touch-action: pan-x;
}

.book-visual {
    overflow-x: auto;
    overflow-y: hidden;
    position: absolute;
    bottom: 0;
    display: flex;
    font-family: "Renato", sans-serif;
    font-size: var(--font-size-section);
    line-height: 1;
    font-weight: normal;
    font-style: normal;
    color: white;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 1.5px;
    writing-mode: vertical-lr;
    overscroll-behavior-y: contain;
    touch-action: pan-x;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    flex-wrap: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
    min-height: 0;
}

.book-label {
    display: block;
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    writing-mode: vertical-lr;
}

.book-label > span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-height: 99%;
    max-width: 100%;
}

.page-book-detail p {
    margin-bottom: 1.2em;
}

.page-book-detail a {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

.page-book-detail a:hover,
.page-book-detail a:focus,
.page-book-detail a:active {
  text-decoration: none;
}


.book-cover-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding-top: 32px; /* o variabile CSS, o valore fisso */
    padding-bottom: 32px;
}

.page-events {
    font-family: "Renato", sans-serif;
    font-size: var(--font-size-events);
    line-height: 1.2;
    font-weight: normal;
    font-style: normal;
}

.events-container {
    display: flex;
    flex-direction: column;
    gap: var(--padding-body);
}

.ticket {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.ticket-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Verticale */
    align-items: center; /* Orizzontale */
    padding: 1em;
    text-align: center;
    pointer-events: none; /* Rende cliccabile solo lo sfondo, se serve */
}

.ticket-line {
    white-space: nowrap; /* No a capo */
    overflow: hidden; /* Nasconde overflow */
    text-overflow: ellipsis; /* Mostra "…" */
    width: 100%;
}

.ticket svg {
    width: 100%;
    height: auto;
}

.main-content {
    margin: 0;
    padding: 0;
}

.site-menu {
    font-size: var(--font-size-menu);
    position: fixed;
    bottom: 0.5em;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: var(--gap-menu-rows);
    padding: 0;
    z-index: 1000;
}

.menu-row {
    display: flex;
    gap: var(--gap-menu-rows);
    justify-content: center;
}

.site-menu button {
    font-family: "Peso", sans-serif;
    font-weight: 400;
    font-size: var(--font-size-menu);
    padding: var(--padding-button-y) var(--padding-button-x);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: black;
    cursor: pointer;
    user-select: none;
    text-transform: none;
    border-radius: var(--border-radius-button);
}

.site-menu button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.search-icon {
    font-size: var(--font-size-search);
    line-height: 1.2;
    display: inline-block;
    vertical-align: middle;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--font-size-search);
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.9);
}

.search-input {
    position: absolute;
    right: 0;
    width: 0;
    opacity: 0;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-button);
    padding: var(--padding-button-y) var(--padding-button-x);
    font-family: "Peso", sans-serif;
    font-weight: 400;
    font-size: var(--font-size-search);
    color: black;
    outline: none;
    pointer-events: none;
    z-index: 1;
    box-sizing: border-box;
    white-space: nowrap;
}

.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.search-wrapper.expanded .search-input {
    width: var(--search-expanded-width);
    opacity: 1;
    pointer-events: auto;
}

.search-wrapper.expanded .search-toggle {
    visibility: hidden;
}