/* Reset base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #06538b, #0a74b5);
    color: #fff;
    padding: 20px;
}

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

form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    color: #333;
}

/* Titoli delle sezioni */
.section-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #06538b;
}

/* Stile per le sezioni del form */
.form-section {
    margin-bottom: 20px;
}

/* Stile per i campi input e i dropdown */
label {
    font-weight: bold;
    margin-bottom: 5px;
    display: inline-block;
}

/* Campi input, select e textarea */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    display: block;   /* garantisce che vada sempre a capo */
}

/* Stile specifico per la textarea */
textarea {
    height: 120px;       /* più alta per testo lungo */
    resize: vertical;    /* ridimensionabile solo in verticale */
}

/* Stile del carrello */
.cart-section {
    background-color: #f1f1f1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #06538b;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    margin-bottom: 15px; /* più margine tra i prodotti */
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* allinea sempre in alto */
    gap: 15px; /* spaziatura tra nome e info */
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Allineamento */
.product-name {
    text-align: left;
    flex: 2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 60%;
}


.product-info {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Pulsante per aggiungere/modificare prodotti */
.add-product-button {
    background-color: #06538b;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.add-product-button:hover {
    background-color: #0a74b5;
}

/* Pulsanti di modifica e cancellazione */
.edit-button, .delete-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
}

.delete-button {
    color: red;
}

.edit-button {
    color: #06538b;
}

/* Pulsante di invio */
.submit-button {
    background-color: #06538b;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.submit-button:hover {
    background-color: #0a74b5;
}

/* my order */
/* --- Form ordini --- */
.order-form {
    max-width: 400px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-form label {
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.order-form input[type="email"],
.order-form input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.2s, box-shadow 0.2s;
}

.order-form input[type="email"]:focus,
.order-form input[type="text"]:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 4px rgba(0,102,204,0.4);
}

/* Footer del form */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* Link "Non ricordo il numero dell’ordine" */
.link-left {
    font-size: 13px;
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}
.link-left:hover {
    color: #004c99;
    text-decoration: underline;
}

/* Bottone submit */
.submit-btn {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.2s;
}
.submit-btn:hover {
    background: #004c99;
}

/* Messaggi di errore o conferma */
.error {
    color: #b00020;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}
.success {
    color: #006600;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}
/* --- Finestra di stato (invio modulo) --- */
.status-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.status-box {
    background: #ffffff;
    color: #06538b;
    padding: 25px 40px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}