body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
}

.wrapper {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    padding: 0 15px;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    height: 100px;
}

.container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

p {
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    font-size: 14px;
    text-align: left;
}

input,
select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

input:focus,
select:focus {
    border-color: #323f9e;
    outline: none;
}

button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #323f9e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #28327e;
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

#formMessage {
    margin-top: 15px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    text-align: left;
    animation: fadeIn 0.3s ease;
}

#formMessage.success {
    background: #e6f4ea;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

#formMessage.error {
    background: #fdecea;
    color: #c62828;
    border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #323f9e;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    text-decoration: none;
    box-sizing: border-box;
}

.btn:hover {
    background: #28327e;
}

.btn.secondary {
    background: #fff;
    color: #323f9e;
    border: 1px solid #323f9e;
}

.btn.secondary:hover {
    background: #f0f7fb;
}

.privacy-line {
    text-align: left;
    margin-top: 8px;
    font-size: 14px;
}

.privacy-line input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
    vertical-align: middle;
}

.privacy-line label {
    display: inline;
    font-weight: normal;
    cursor: pointer;
    vertical-align: middle;
}

.privacy-line a {
    color: #323f9e;
    text-decoration: none;
}

.privacy-line a:hover {
    text-decoration: underline;
}

/* ---- Modale informativa privacy (PDF.js) ---- */
.privacy-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    z-index: 1000;
}

.privacy-modal-box {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.privacy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e5e5;
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.privacy-modal-close {
    width: auto;
    margin: 0;
    padding: 0 6px;
    background: none;
    color: #555;
    font-size: 26px;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.privacy-modal-close:hover {
    background: none;
    color: #000;
}

.privacy-pdf {
    flex: 1;
    overflow-y: auto;
    background: #525659;
    padding: 12px;
    text-align: center;
}

.privacy-pdf .pdf-page {
    display: block;
    margin: 0 auto 12px;
    max-width: 100%;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
    background: #fff;
}

.privacy-pdf .pdf-status {
    color: #fff;
    padding: 30px 15px;
}

.privacy-pdf .pdf-error {
    color: #ffb4ab;
}

.privacy-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid #e5e5e5;
}

.privacy-modal-footer .scroll-hint {
    font-size: 13px;
    color: #888;
    text-align: left;
}

.privacy-modal-footer button {
    width: auto;
    margin: 0;
    padding: 10px 18px;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 520px) {
    .privacy-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .privacy-modal-footer button {
        width: 100%;
    }
}
