/* Stili per il Modal - Mobile First */

/* CONTENITORE GENERALE */
.wc-po-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    visibility: visible !important;
    opacity: 1 !important;
}

/* SFONDO SCURO */
.wc-po-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* SCATOLA BIANCA */
.wc-po-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 550px;
    margin: auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* INPUT */
.wc-po-form-group input[type="text"],
.wc-po-form-group input[type="email"],
.wc-po-form-group input[type="tel"],
.wc-po-form-group input[type="number"],
.wc-po-form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc !important;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #ffffff !important;
    color: #333333 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    z-index: 20;
}

.wc-po-form-group input:focus,
.wc-po-form-group textarea:focus {
    border-color: #00bcd4 !important;
    outline: none;
    background-color: #fff !important;
}

/* TASTO CHIUDI */
.wc-po-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    line-height: 1;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 20;
}
.wc-po-modal-close:hover {
    opacity: 1;
}

/* TITOLO */
#wc-po-modal-title {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    color: #3c3950;
    text-transform: uppercase;
    text-align: center;
}

/* INFO PRODOTTO */
.wc-po-product-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    border-left: 3px solid #00bcd4;
}
.wc-po-product-info p {
    margin: 5px 0;
    font-size: 15px;
    color: #555;
}

/* LAYOUT FORM */
.wc-po-form-group {
    margin-bottom: 20px;
}
.wc-po-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}
.wc-po-form-group .required {
    color: #e2401c;
}
.wc-po-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* MESSAGGI */
.wc-po-messages {
    padding: 20px;
    border-radius: 3px;
    text-align: center;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
}
.wc-po-messages.success {
    background-color: #e6f7e6;
    border: 1px solid #a0d4a0;
    color: #006400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.wc-po-messages.error {
    background-color: #fbeae5;
    border: 1px solid #e2401c;
    color: #b32100;
}

/* FOOTER (Centrato) */
.wc-po-form-footer {
    text-align: center; /* MODIFICATO: Era right */
    margin-top: 25px;
}
#wc-po-submit-button {
    padding: 12px 30px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.wc-po-close-success {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    text-transform: uppercase;
    font-size: 13px;
}
.wc-po-close-success:hover {
    background-color: #555;
}

body.wc-po-modal-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .wc-po-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}