/* =========================================================
   RESET & BASE
========================================================= */

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
}


/* =========================================================
   APP BAR
========================================================= */

.appbar {
    background: linear-gradient(90deg, #1976d2, #4a90e2);
    color: white;
    padding: 18px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    padding: 20px;
    max-width: 600px;
    margin: auto;
}


/* =========================================================
   TEXTFIELD (Material Style)
========================================================= */

.textfield {
    position: relative;
    margin-top: 25px;
}

.textfield input {
    width: 100%;
    padding: 18px 16px;
    font-size: 20px;
    border-radius: 14px;
    border: 3px solid #4a90e2;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    outline: none;
    transition: 0.25s;
}

.textfield input:focus {
    border-color: #1976d2;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.textfield label {
    position: absolute;
    left: 16px;
    top: 20px;
    font-size: 18px;
    color: #555;
    font-weight: 600;
    transition: 0.25s ease;
    pointer-events: none;
}

.textfield input:focus + label,
.textfield input:not(:placeholder-shown) + label {
    top: -8px;
    left: 12px;
    font-size: 14px;
    color: #1976d2;
    background: white;
    padding: 0 4px;
}


/* =========================================================
   AUTOCOMPLETE
========================================================= */

.autocomplete-suggestions {
    border-radius: 8px;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 16px;
	max-height: 520px !important;
}

.autocomplete-suggestion {
    position: relative;
    overflow: hidden;
}

.autocomplete-suggestion:active::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    background: rgba(25,118,210,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(20);
    transition: 0.4s;
}

.autocomplete-selected {
    background: #e3f2fd;
}

.autocomplete-suggestion {
    padding: 14px 18px !important;   /* spazio verticale maggiore */
    font-size: 20px !important;      /* più grande e leggibile */
    line-height: 1.5 !important;     /* distanzia il testo */
    cursor: pointer;
}

.autocomplete-suggestions {
    line-height: 1.5 !important;     /* distanzia l’intero elenco */
}

.autocomplete-suggestion + .autocomplete-suggestion {
    border-top: 1px solid #e0e0e0;   /* separatore tra le righe */
}








/* =========================================================
   CARD RISULTATI
========================================================= */

.card {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    margin-top: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.20);
    border-left: 6px solid #1976d2;
    font-size: 18px;
}

.card strong {
    font-size: 20px;
    color: #c62828;
}


/* =========================================================
   HERO HEADER
========================================================= */

.hero-header {
    width: 100%;
    height: 32vh;
    min-height: 150px;
    max-height: 260px;
    background: url('/img/header-2.jpg') center/contain no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    position: relative;
}

.hero-header::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.hero-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 90px;
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}

.hero-title {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 26px;
    font-weight: 700;
    color: blue;
    text-shadow: 0 3px 6px rgba(0,0,0,0.5);
    white-space: nowrap;
    z-index: 2;
}


/* =========================================================
   INSTALL BAR (PWA)
========================================================= */

.install-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    background: linear-gradient(90deg, #1976d2, #4a90e2);
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.install-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.install-left div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.install-bar img {
    width: 42px;
    height: auto;
    margin-right: 12px;
    flex-shrink: 0;
}

.install-bar button {
    background: #ffca28;
    color: #333;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transition: 0.2s;
    flex-shrink: 0;
}


/* =========================================================
   MOBILE OPTIMIZATION
========================================================= */

@media (max-width: 600px) {

    .container {
        max-width: 100%;
        padding: 16px;
    }

    .appbar {
        font-size: 22px;
        padding: 14px;
    }

    .hero-title {
        font-size: 26px;
    }

    .textfield input {
        font-size: 22px;
        padding: 20px 18px;
    }

    .textfield label {
        font-size: 22px;
    }
	
    .autocomplete-suggestions {
        font-size: 20px;
    }

	.autocomplete-suggestion {
		padding: 14px 18px;
		font-size: 20px;
		line-height: 1.5;
	}
	
    .card {
        font-size: 18px;
    }

    .card strong {
        font-size: 20px;
    }
}
