/* ==========================================================================
   Global & Shared Styles
   ========================================================================== */

/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@400;600;700&display=swap');

/* CSS Variables (Color Palette) */
:root {
    --orange-accent: #ff652f;
    --green-accent: #28a745;
    --red-accent: #dc3545;
    --blue-accent: #007bff;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --background-light: #f0f2f5;
    --background-white: #ffffff;
    --border-color: #e9ecef;
}

/* Reset and Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }

a {
    color: var(--blue-accent);
    text-decoration: none;
}

button {
    font-family: 'Titillium Web', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--background-white);
    transition: background-color 0.2s, transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

.card {
    background-color: var(--background-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-top: 1.5rem;
}

/* FAB (Floating Action Button) - Con correzione allineamento */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--green-accent);
    color: white;
    font-size: 2rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.2s, background-color 0.2s;
    /* Correzione allineamento con Flexbox */
    display: flex;
    align-items: center;
    justify-content: center;
}
.fab:hover {
    transform: scale(1.1);
    background-color: #218838;
}

/* Modal Styles (Comuni a tutti i modali) */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: var(--background-white);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.form-group input, .form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Titillium Web', sans-serif;
}
.modal-button { width: 100%; background-color: var(--blue-accent)}
.button-delete { background-color: var(--red-accent); margin-top: 1rem; }

/* Aggiunto stile per il campo honeypot */
.honeypot-field {
    position: absolute;
    left: -5000px;
}

/* Aggiunto stile per bottoni piccoli */
.btn-primary-small {
    background-color: var(--orange-accent);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
}