/* Estremi-GM - Stili del plugin (indipendenti dal tema) */

/* Form container */
.estremi-form {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

.estremi-form fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.estremi-form legend {
    font-size: 16px;
    font-weight: 600;
    padding: 0 10px;
    width: auto;
    border: none;
    margin-bottom: 10px;
}

/* Riga del form */
.estremi-form .estremi-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

/* Label */
.estremi-form .estremi-label {
    width: 140px;
    min-width: 140px;
    text-align: right;
    font-weight: 600;
    padding-right: 10px;
}

/* Campi input e select */
.estremi-form .estremi-fields {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.estremi-form input[type="text"],
.estremi-form input[type="number"],
.estremi-form input[type="date"],
.estremi-form select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    min-height: 34px;
    box-sizing: border-box;
}

.estremi-form input[type="text"] {
    min-width: 200px;
    flex: 1;
}

.estremi-form input[type="number"] {
    width: 120px;
}

.estremi-form input[type="date"] {
    width: 160px;
}

.estremi-form select {
    min-width: 150px;
    max-width: 100%;
}

.estremi-form select.estremi-select-wide {
    flex: 1;
    min-width: 250px;
}

/* Checkbox inline */
.estremi-form .estremi-checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    white-space: nowrap;
}

/* Bottone cerca */
.estremi-form .estremi-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background: #5cb85c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: background .2s;
}

.estremi-form .estremi-submit:hover {
    background: #449d44;
}

/* Risultati */
.estremi-riepilogo {
    background: #d9edf7;
    border: 1px solid #bce8f1;
    color: #31708f;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.estremi-errore {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
    text-align: center;
}

.estremi-info {
    background: #d9edf7;
    border: 1px solid #bce8f1;
    color: #31708f;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
    text-align: center;
}

/* Classificazione */
.estremi-classificazione {
    background: #d9edf7;
    border: 1px solid #bce8f1;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 80%;
}

.estremi-classificazione h4 {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .estremi-form .estremi-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .estremi-form .estremi-label {
        width: 100%;
        text-align: left;
        margin-bottom: 4px;
    }
    .estremi-form .estremi-fields {
        width: 100%;
    }
    .estremi-form input[type="text"],
    .estremi-form input[type="number"],
    .estremi-form select {
        width: 100%;
        min-width: unset;
    }
}
