/* === 1. STILI ELENCO PRODOTTI === */
.mupd-dashboard-header {
    margin-bottom: 2rem;
}

.mupd-add-new-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
}

.mupd-add-new-button:hover {
    background-color: #1e639b;
    color: #fff;
}

.mupd-product-list-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.mupd-product-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mupd-product-image {
    flex: 0 0 150px;
    margin-right: 2rem;
}

.mupd-product-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}
.mupd-product-action {
    display: flex;
    gap: 30px;
}
@media screen and (max-width: 767px){
    flex-direction: column;
    gap: 12px;

}

.mupd-product-content {
    flex: 1;
}

.mupd-product-category {
    display: inline-flex;
    align-items: center;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.5rem;
}

.mupd-product-category .dashicons {
    font-size: 16px;
    height: auto;
    width: auto;
    margin-right: 6px;
}

.mupd-product-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.5em;
    line-height: 1.2;
}

.mupd-product-excerpt {
    margin: 0 0 1.5rem 0;
    color: #333;
}

.mupd-view-product-link {
    font-weight: bold;
    color: #1a73e8;
    text-decoration: none;
}

.mupd-view-product-link:hover {
    text-decoration: underline;
}

.mupd-product-status {
    font-size: 0.7em;
    font-weight: normal;
    color: #d63638;
    vertical-align: middle;
    margin-left: 10px;
}

/* === 2. STILI FORM ACF CON FLOATING LABELS === */
.acf-form {
    max-width: 700px;
    margin: 2rem auto;
}

.floating-label-wrap {
    position: relative;
    margin-top: 20px;
    margin-bottom: 25px;
}

/* Stile base per tutti i campi input/textarea/select */
.floating-label-wrap input[type="text"],
.floating-label-wrap textarea,
.floating-label-wrap .acf-input-wrap > select { /* Selettore più specifico per la select di ACF */
    width: 100%;
    padding: 18px 12px 6px 12px; /* Più padding in alto per l'etichetta */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    transition: border-color 0.2s ease-in-out;
}

/* Nascondiamo il placeholder, ci serve solo come trigger per il CSS */
.floating-label-wrap input[type="text"]::placeholder,
.floating-label-wrap textarea::placeholder {
    color: transparent;
}

/* Posizionamento iniziale dell'etichetta */
.floating-label-wrap .acf-label label {
    position: absolute;
    top: 14px;
    left: 13px;
    font-size: 16px;
    color: #888;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    background-color: transparent;
    padding: 0;
}

/* Stato "fluttuante" dell'etichetta */
.floating-label-wrap input[type="text"]:focus + .acf-input .acf-label label,
.floating-label-wrap input[type="text"]:not(:placeholder-shown) + .acf-input .acf-label label,
.floating-label-wrap textarea:focus + .acf-input .acf-label label,
.floating-label-wrap textarea:not(:placeholder-shown) + .acf-input .acf-label label,
.floating-label-wrap.has-value .acf-label label {
    top: -8px;
    left: 10px;
    font-size: 12px;
    color: #2271b1;
    background-color: #fff;
    padding: 0 5px;
    font-weight: 600;
}

/* Evidenziazione del bordo quando il campo è in focus o ha un valore */
.floating-label-wrap input[type="text"]:focus,
.floating-label-wrap textarea:focus,
.floating-label-wrap.has-value select {
    outline: none;
    border-color: #2271b1;
}

/* Stile per i campi con errori di validazione */
.acf-field.acf-error .floating-label-wrap input[type="text"],
.acf-field.acf-error .floating-label-wrap textarea,
.acf-field.acf-error .floating-label-wrap select {
    border-color: #dc3232 !important;
}

.acf-field.acf-error .floating-label-wrap .acf-label label {
    color: #dc3232 !important;
}

p.acf-error-message {
    color: #dc3232;
    margin: 5px 0 0 5px !important;
    font-size: 13px;
}

/* Stile specifico per il campo Galleria */
.floating-label-wrap[data-type="gallery"] .acf-label {
    margin-bottom: 10px;
}

.floating-label-wrap[data-type="gallery"] .acf-gallery {
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 10px;
}

.floating-label-wrap[data-type="gallery"] .acf-gallery:hover {
    border-color: #2271b1;
}