/* Base form wrapper */
.vfp-form-wrapper {
    max-width: 700px;
    margin: 0 0 20px 0 !important; /* !important per sovrascrivere stili tema */
    padding-top: 0 !important;
}

/* Grid layout per campi */
.vfp-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    margin-top: 0; /* NO spazio sopra la grid */
}

.vfp-field-wrapper {
    box-sizing: border-box;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
}

/* Etichette esterne */
.vfp-label-external label {
    display: block;
    font-weight: 600;
    margin: 0 0 6px 0; /* Solo margin-bottom, resto a 0 */
    font-size: 14px;
}

/* Etichette interne (solo placeholder) */
.vfp-label-internal label {
    display: none;
}

/* Input e textarea styling */
.vfp-form-wrapper input[type="text"],
.vfp-form-wrapper input[type="email"],
.vfp-form-wrapper textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    margin: 0 !important; /* FORZA margin 0 */
}

.vfp-form-wrapper input[type="text"]:focus,
.vfp-form-wrapper input[type="email"]:focus,
.vfp-form-wrapper textarea:focus {
    outline: none;
    border-color: #B28E3A;
}

.vfp-form-wrapper textarea {
    min-height: 100px;
    resize: vertical;
    margin: 0 !important; /* FORZA margin 0 anche su textarea */
}

/* RIMOSSO placeholder hardcoded - ora usa il colore dinamico dal form-render.php */

/* Privacy checkbox */
.vfp-privacy {
    margin-bottom: 20px;
}

.vfp-privacy label {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.vfp-privacy input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.vfp-privacy a {
    color: #B28E3A;
    text-decoration: underline;
}

/* Submit button wrapper */
.vfp-submit-wrapper {
    margin-top: 20px;
}

.vfp-submit-wrapper.vfp-align-left {
    text-align: left;
}

.vfp-submit-wrapper.vfp-align-center {
    text-align: center;
}

.vfp-submit-wrapper.vfp-align-right {
    text-align: right;
}

/* Submit button */
.vfp-submit-btn {
    background-color: #B28E3A;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.vfp-submit-btn svg {
    flex-shrink: 0;
}

.vfp-submit-btn:hover {
    background-color: #9D782C;
}

/* Button width options */
.vfp-btn-width-auto {
    width: auto;
}

.vfp-btn-width-50 {
    width: 50%;
    min-width: 200px;
}

.vfp-btn-width-100 {
    width: 100%;
}

/* Error messages */
.vfp-errors {
    border-left: 4px solid #cc0000;
    padding: 15px 20px;
    background: #ffecec;
    margin-bottom: 20px;
    border-radius: 4px;
}

.vfp-errors ul {
    margin: 0;
    padding-left: 20px;
}

.vfp-errors li {
    margin-bottom: 5px;
}

/* Success messages */
.vfp-success {
    border-left: 4px solid #46b450;
    padding: 15px 20px;
    background: #f0fff4;
    margin-bottom: 20px;
    border-radius: 4px;
}

.vfp-success p {
    margin: 0;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .vfp-field-wrapper {
        width: 100% !important;
    }
    
    .vfp-btn-width-50,
    .vfp-btn-width-100 {
        width: 100%;
    }
    
    .vfp-submit-wrapper {
        text-align: center !important;
    }
}

/* Admin preview styling */
#vfp-preview-container .vfp-form-wrapper {
    max-width: 100%;
}

#vfp-preview-container .vfp-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Admin table styles */
.vfp-submissions-table {
    margin-top: 20px;
}

.vfp-submissions-table .check-column {
    width: 40px;
}

.vfp-bulk-actions {
    margin-bottom: 15px;
}

.vfp-bulk-actions select,
.vfp-bulk-actions button {
    margin-right: 10px;
}
