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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e8e0d0;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(31, 39, 72, 0.15);
}

h1 {
    color: #1f2748;
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #1f2748;
    text-align: center;
    margin-bottom: 60px;
    font-size: 14px;
    font-style: italic;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    color: #1f2748;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #1f2748;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: #c91340;
    box-shadow: 0 0 0 3px rgba(201, 19, 64, 0.2);
}

.row {
    display: flex;
    gap: 15px;
}

.row .form-group {
    flex: 1;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #c91340;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #1f2748;
    color: #e8e0d0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 19, 64, 0.3);
}

.required {
    color: #c91340;
}

.success-message {
    background-color: #e8e0d0;
    color: #1f2748;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    border: 2px solid #1f2748;
}

.error-message {
    background-color: #ff4444;
    color: #ffffff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.partecipanti-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #1f2748;
}

.partecipanti-section h3 {
    color: #1f2748;
    margin-bottom: 20px;
    font-size: 20px;
}

.partecipante-row {
    background-color: #e8e0d0;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #c91340;
}

.add-partecipante-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #e8e0d0;
    color: #1f2748;
    border: 2px solid #1f2748;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.add-partecipante-btn:hover {
    background-color: #1f2748;
    color: #e8e0d0;
}

.add-partecipante-btn::before {
    content: '+';
    font-size: 20px;
    font-weight: bold;
}

.remove-partecipante-btn {
    background-color: #ff4444;
    color: #ffffff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
    transition: all 0.3s;
}

.remove-partecipante-btn:hover {
    background-color: #cc0000;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-icon input {
    flex: 1;
}

.search-icon-btn {
    width: 45px;
    height: 45px;
    background-color: #e8e0d0;
    border: 2px solid #1f2748;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.search-icon-btn:hover {
    background-color: #c91340;
}

.search-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: #1f2748;
    transition: stroke 0.3s;
}

.search-icon-btn:hover svg {
    stroke: #e8e0d0;
}

.search-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-icon-btn.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.info-message {
    background-color: #e8e0d0;
    color: #1f2748;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    border: 2px solid #1f2748;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 39, 72, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(31, 39, 72, 0.3);
}

.modal-content h3 {
    color: #1f2748;
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.company-option {
    background-color: #e8e0d0;
    border: 2px solid #1f2748;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.company-option:hover {
    background-color: #c91340;
    border-color: #c91340;
    transform: translateX(5px);
}

.company-option:hover h4,
.company-option:hover p {
    color: #ffffff;
}

.company-option h4 {
    color: #1f2748;
    margin-bottom: 8px;
    font-size: 16px;
    transition: color 0.3s;
}

.company-option p {
    color: #666;
    font-size: 14px;
    margin: 4px 0;
    transition: color 0.3s;
}

.modal-close-btn {
    width: 100%;
    padding: 12px;
    background-color: #ff4444;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    background-color: #cc0000;
}
