/* ==========================================================================
   WC Recesso Digitale — Frontend CSS
   ========================================================================== */

/* Bottone recesso nella lista ordini */
.wcrd-recesso-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #1a5276;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease;
}
.wcrd-recesso-btn:hover {
    background: #154360;
}

/* --------------------------------------------------------------------------
   Form wrapper
   -------------------------------------------------------------------------- */
.wcrd-form-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 22px 22px 18px;
    border: 1px solid #d6e4ef;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
    box-shadow: 0 10px 28px rgba(21, 67, 96, 0.10);
}

/* Evita doppio effetto card dentro il popup modale */
.wcrd-modal-box .wcrd-form-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.wcrd-form-title {
    font-size: 22px;
    margin-bottom: 6px;
    color: #1a5276;
}

.wcrd-form-desc {
    color: #555;
    margin-bottom: 20px;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Campi
   -------------------------------------------------------------------------- */
.wcrd-field-group {
    margin-bottom: 18px;
}

.wcrd-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.wcrd-required {
    color: #c0392b;
}

.wcrd-select,
.wcrd-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wcrd-select:focus,
.wcrd-textarea:focus {
    border-color: #1a5276;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,82,118,0.1);
}

.wcrd-textarea {
    resize: vertical;
    min-height: 90px;
}

/* --------------------------------------------------------------------------
   Lista prodotti (checkbox)
   -------------------------------------------------------------------------- */
.wcrd-items-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 14px;
    background: #fafafa;
    margin-bottom: 8px;
}

.wcrd-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.wcrd-item-row:last-child {
    border-bottom: none;
}

.wcrd-item-row label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.wcrd-select-all-label {
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Privacy checkbox
   -------------------------------------------------------------------------- */
.wcrd-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
}

.wcrd-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Pulsante submit
   -------------------------------------------------------------------------- */
.wcrd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s;
}

.wcrd-btn-primary {
    background: #1a5276;
    color: #fff;
}

.wcrd-btn-primary:hover {
    background: #154360;
}

.wcrd-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Messaggi
   -------------------------------------------------------------------------- */
.wcrd-form-messages {
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.wcrd-form-messages.wcrd-success {
    background: #eafaf1;
    border-left: 4px solid #27ae60;
    color: #1e8449;
}

.wcrd-form-messages.wcrd-error {
    background: #fdedec;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.wcrd-notice {
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 8px 24px rgba(21, 67, 96, 0.08);
}

.wcrd-notice-info {
    background: #eaf4fb;
    border-left: 4px solid #2980b9;
    color: #1a5276;
}

/* --------------------------------------------------------------------------
   Nota legale
   -------------------------------------------------------------------------- */
.wcrd-legal-note {
    font-size: 12px;
    color: #888;
    margin-top: 14px;
    line-height: 1.5;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* --------------------------------------------------------------------------
   Modale
   -------------------------------------------------------------------------- */
.wcrd-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcrd-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    cursor: pointer;
}

.wcrd-modal-box {
    position: relative;
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 660px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    animation: wcrdModalIn 0.25s ease;
}

@keyframes wcrdModalIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wcrd-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0 4px;
}
.wcrd-modal-close:hover { color: #333; }

/* --------------------------------------------------------------------------
   Login required
   -------------------------------------------------------------------------- */
.wcrd-login-required {
    padding: 14px 16px;
    background: #fef9e7;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(21, 67, 96, 0.08);
}

@media (max-width: 768px) {
    .wcrd-form-wrapper {
        padding: 18px 16px 14px;
    }
}
