button.btn-link { background: none; border: none; color: var(--secondary); text-decoration: underline; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:root { --primary: #941750; --secondary: #6c757d; --bg: #f4f7f6; --text: #333; }
/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #212529; /* Testo più scuro per miglior contrasto */
    line-height: 1.6;
}

/* Accessibility: Focus states */
button:focus, input:focus, textarea:focus {
    outline: 3px solid #40e0d0;
    outline-offset: 2px;
}
section { display: none; background: white; padding: 20px; border-radius: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.08); max-width: 550px; margin: 10px auto; width: 95%; }
h2, h3 { color: var(--primary); text-align: center; margin-bottom: 10px; }
input, select, textarea { width: 100%; padding: 15px; margin: 10px 0; border: 1px solid #ddd; border-radius: 12px; font-size: 16px; box-sizing: border-box; }
.grid-buttons { display: grid; grid-template-columns: 1fr; gap: 12px; }
button { background: var(--primary); color: #ffffff; border: none; padding: 18px; border-radius: 12px; font-size: 18px; cursor: pointer; font-weight: 600; transition: 0.2s; width: 100%; }
button:active { transform: scale(0.98); }
#clear-btn {
color: #ffffff !important; /* Forza il colore nero per il testo */
background-color: #ffcccc; /* Opzionale: un rosa pallido per contrasto */
border: none; /* Opzionale: un bordo rosso per chiarezza */
}
.btn-alt { background: var(--secondary); color: #ffffff; margin-top: 15px; }
.question-block { margin-bottom: 20px; padding: 15px; border-left: 5px solid var(--primary); background: #fcfcfc; border-radius: 8px; }
label { display: block; margin-bottom: 8px; font-weight: bold; }
#report-content { border: 2px solid var(--primary); padding: 15px; border-radius: 15px; background: white; width: 100%; box-sizing: border-box; }

.app-logo { width: 132px; height: 132px; margin: 6px auto 10px auto; display: block; border-radius: 24px; background: #ffffff; border: 1px solid #e6e8eb; box-shadow: 0 10px 26px rgba(0,0,0,0.14); object-fit: cover; padding: 10px; box-sizing: border-box; }

.location-point-btn { background: #28a745; color: #ffffff; text-align: left; padding: 14px; }
.location-point-btn.is-platinum { background: linear-gradient(135deg, #b8860b, #f2d16b); color: #1f1f1f; }
.location-point-wrap { display: flex; align-items: center; gap: 12px; }
.location-point-logo { width: 44px; height: 44px; object-fit: contain; background: #ffffff; border-radius: 12px; padding: 6px; box-sizing: border-box; border: 1px solid rgba(0,0,0,0.12); flex: 0 0 auto; }
.location-point-text { display: grid; gap: 2px; }
.location-point-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.platinum-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.4px; background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.18); }

@media (max-width: 480px) {
    body { padding: 5px; }
    section { padding: 15px; }
}
#btn-sos-fisso {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: 4px solid white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 9999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btn-calm-fisso {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 90px;
    height: 70px;
    border-radius: 18px;
    background: #40e0d0;
    color: #053b39;
    border: 4px solid white;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    z-index: 9999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calma-item {
    background: #f8f9fa;
    border: 1px solid #e6e8eb;
    border-radius: 14px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.calma-item-title {
    font-weight: 800;
    color: #333;
    font-size: 14px;
}

.calma-item-text {
    color: #333;
    font-size: 14px;
    line-height: 1.35;
    white-space: pre-line;
}

.calma-item-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calma-section-title {
    font-size: 13px;
    font-weight: 900;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 6px;
}

.calma-add-form {
    background: #ffffff;
    border: 1px solid #e6e8eb;
    border-radius: 16px;
    padding: 12px;
}

.calma-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    background: rgba(64,224,208,0.18);
    border: 1px solid rgba(64,224,208,0.45);
    color: #053b39;
}

.calma-focus {
    margin-top: 14px;
    padding: 18px;
    border-radius: 18px;
    background: #eef6ff;
    border: 2px solid rgba(64,224,208,0.6);
    text-align: center;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 900;
    color: #111;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal SOS */
.modal-sos-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-sos-content {
    background: white;
    width: 90%;
    max-width: 450px;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    max-height: 85vh;
    overflow-y: auto;
}

.sos-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.sos-card {
    background: #f8f9fa;
    padding: 12px 8px;
    border-radius: 15px;
    border: 2px solid #eee;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.sos-card:active {
    background: #e9ecef;
    transform: scale(0.95);
}

/* Card SOS Fullscreen per lo Staff */
.sos-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    padding: 30px;
    box-sizing: border-box;
}

.sos-fullscreen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.sos-fullscreen-text {
    font-size: 24px;
    line-height: 1.4;
    color: #333;
    font-weight: 500;
}

.sos-fullscreen-footer {
    padding: 20px 0;
}

.sos-fullscreen-btn {
    background: var(--primary);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    border: none;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}

.calma-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 21000;
    display: flex;
    flex-direction: column;
}

.calma-fullscreen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px;
    gap: 16px;
}

.calma-fullscreen-title {
    font-size: 16px;
    font-weight: 900;
    color: #053b39;
    text-align: center;
}

.calma-fullscreen-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
    color: #111;
    padding: 14px;
    border-radius: 18px;
    background: #eef6ff;
    border: 2px solid rgba(64,224,208,0.6);
}

.calma-fullscreen-btn {
    background: #40e0d0;
    color: #053b39;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 900;
}

/* Modal Overlay & Content per Inserimento Manuale */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary);
    margin-bottom: 20px;
}

.modal-content label {
    display: block;
    font-size: 14px; /* Aumentato */
    color: #444; /* Più scuro */
    margin-bottom: 5px;
    text-align: left;
    font-weight: 600;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.modal-content .btn-main {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content .btn-alt {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

/* Layout & Sections */
.step-section {
    text-align: center;
}

.welcome-box {
    display: none;
    background: #d4edda;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 5px;
    margin-top: 0px;
    text-align: center;
}

.profile-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.profile-card .grid-buttons button { font-size:16px; }

.input-label {
    font-size: 14px; /* Aumentato da 12px */
    color: #444; /* Più scuro di #666 per contrasto */
    display: block;
    text-align: left;
    margin-bottom: 5px;
    font-weight: 600;
}

.powered-by {
    margin-top: 5px;
    opacity: 0.7;
}

.powered-by p {
    font-size: 12px;
    color: #000000;
    margin-bottom: 5px;
}

.report-box-selection {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.feedback-trigger-box {
    margin-top: 20px;
    text-align: center;
    background: #fff3cd;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ffeeba;
}

.info-container {
    padding: 20px;
    text-align: left;
    line-height: 1.5;
    color: #444;
    font-size: 14px;
}

.privacy-alert {
    background: #f8f9fa;
    border-left: 4px solid #40e0d0;
    padding: 15px;
    margin-bottom: 20px;
}

.legal-footer {
    margin-top: 50px;
    padding: 20px;
    font-size: 13px; /* Aumentato da 11px */
    color: #555; /* Più scuro di #888 */
    text-align: center;
    border-top: 1px solid #ddd;
    background: #fdfdfd;
}

.legal-footer button {
    font-size: 13px; /* Aumentato */
}

.category-title-header {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.btn-back-link {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    margin-bottom: 15px;
    font-weight: bold;
}

.sos-card i {
    font-size: 24px;
}

.sos-card span {
    font-size: 14px;
    font-weight: bold;
}

.btn-close-sos {
    margin-top: 20px;
    background: #6c757d;
}
