/* Stile di base per la pagina */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
    display: block;
    text-align: left;
    overflow-x: hidden;
}

.container {
    background-color: white;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header img {
    width: 60%;
    max-width: 200px;
    height: auto;
    display: block;
    margin: 10px auto;
}

h1 {
    font-size: 20px;
    color: #ca333a;
}

hr.divider {
    border: none;
    border-bottom: 1px solid #ccc;
    margin: 8px 0 15px 0;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.btn-submit, .btn-insert {
    background-color: #ca333a;
    color: white;
    padding: 10px;
    font-size: 14px;
    width: 100%;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-submit:hover, .btn-insert:hover {
    background-color: #9b2d34;
}

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

.select-options {
    width: 100%;
}

/* Stile per i fieldset con effetto bordo attraverso il testo */
fieldset.block {
    border: 2px dashed #ca333a;
    padding: 15px 12px 12px 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    position: relative;
}

fieldset.block legend {
    font-weight: bold;
    padding: 0 8px;
    color: #333;
    font-size: 13px;
    background-color: white;
    margin-left: -5px;
}

/* Rimuovi margine dal primo input/select in ogni fieldset */
fieldset.block > input:first-of-type,
fieldset.block > select:first-of-type {
    margin-top: 0;
}

/* Blocco speciale per il contenitore delle parole chiave */
.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    visibility: hidden;
}

.keywords-container.show {
    visibility: visible;
}

.tag {
    background-color: #ca333a;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    cursor: move;
    font-size: 12px;
}

.tag span {
    margin-right: 6px;
}

.tag .remove-tag {
    cursor: pointer;
    font-size: 16px;
    color: white;
}

.tag .remove-tag:hover {
    color: #f9f9f9;
}

.keyword-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.keyword-input-group input {
    flex: 1;
    height: 38px;
}

.keyword-input-group .btn-insert {
    width: auto;
    padding: 0 15px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
