/* ====================================
   Diritto di Recesso WooCommerce
   Frontend CSS
   ==================================== */

.rw-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: inherit;
}

.rw-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #1a1a1a;
}

/* Info box normativa */
.rw-info-box {
    background: #f0f4ff;
    border-left: 4px solid #3a6fd8;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 28px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}
.rw-info-box p { margin: 0 0 8px; }
.rw-info-box p:last-child { margin-bottom: 0; }

/* Notices */
.rw-notice {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.5;
}
.rw-notice h2 {
    margin: 0 0 10px;
    font-size: 1.2em;
}
.rw-success {
    background: #edfbf0;
    border: 1px solid #5cb85c;
    color: #2d6a2d;
}
.rw-error {
    background: #fdf2f2;
    border: 1px solid #e74c3c;
    color: #922b21;
}
.rw-warning {
    background: #fef9e7;
    border: 1px solid #f39c12;
    color: #7d6608;
}

/* Form fields */
.rw-field {
    margin-bottom: 20px;
}
.rw-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
    font-size: 14px;
}
.rw-field input[type="text"],
.rw-field input[type="email"],
.rw-field input[type="number"],
.rw-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: #fff;
}
.rw-field input[readonly] {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}
.rw-field input:focus,
.rw-field textarea:focus {
    outline: none;
    border-color: #3a6fd8;
    box-shadow: 0 0 0 3px rgba(58,111,216,0.12);
}
.rw-field textarea {
    resize: vertical;
    min-height: 100px;
}
.rw-help {
    margin: 5px 0 0;
    font-size: 12px;
    color: #777;
}

/* Required / Optional */
.rw-required {
    color: #e74c3c;
    margin-left: 2px;
}
.rw-optional {
    font-weight: normal;
    color: #888;
    font-size: 12px;
    margin-left: 4px;
}

/* Checkbox field */
.rw-checkbox-field label {
    font-weight: normal;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
}
.rw-checkbox-field input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #c0392b;
}

/* Submit button */
.rw-submit-area {
    margin-top: 28px;
}
.rw-btn-recesso {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}
.rw-btn-recesso:hover {
    background: #a93226;
}
.rw-btn-recesso:active {
    transform: scale(0.99);
}
.rw-btn-recesso:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.rw-legal-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: #777;
    text-align: center;
    line-height: 1.5;
}

/* Footer link */
#rw-footer-link {
    text-align: center;
    padding: 8px;
    font-size: 12px;
}
#rw-footer-link a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.7;
}
#rw-footer-link a:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
    .rw-wrapper { padding: 0 12px; }
    .rw-btn-recesso { font-size: 15px; padding: 13px 20px; }
}
