/**
 * Styles for WooCommerce Order Withdrawal Plugin
 *
 * @package WC_Recesso_Ordine
 */

/* ==========================================================================
   Notice Box (View Order Page)
   ========================================================================== */
.wc-recesso-notice-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.wc-recesso-notice-box:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.wc-recesso-notice-content {
    flex: 1 1 500px;
    margin-right: 20px;
}

.wc-recesso-notice-title {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.wc-recesso-notice-title .dashicons {
    color: #3b82f6;
    margin-right: 8px;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.wc-recesso-notice-text {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.wc-recesso-notice-action {
    flex: 0 0 auto;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .wc-recesso-notice-action {
        margin-top: 0;
    }
}

/* ==========================================================================
   Stepper UI
   ========================================================================== */
.wc-recesso-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto 40px auto;
    padding: 0 10px;
}

.wc-recesso-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.wc-recesso-step-item .step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #cbd5e1;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wc-recesso-step-item .step-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.wc-recesso-step-item.active .step-num {
    background-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.wc-recesso-step-item.active .step-label {
    color: #1e293b;
    font-weight: 600;
}

.wc-recesso-step-line {
    flex: 1;
    height: 3px;
    background-color: #e2e8f0;
    margin: 0 15px;
    margin-top: -24px;
    position: relative;
    z-index: 0;
    transition: all 0.3s ease;
}

.wc-recesso-step-line.active {
    background-color: #3b82f6;
}

/* ==========================================================================
   Form and Cards Styling
   ========================================================================== */
.wc-recesso-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    max-width: 700px;
    margin: 0 auto;
}

.wc-recesso-section {
    margin-bottom: 25px;
}

.wc-recesso-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.wc-recesso-form .form-row {
    margin-bottom: 20px;
}

.wc-recesso-form .form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
    font-size: 0.9rem;
}

.wc-recesso-form .form-row input[type="text"],
.wc-recesso-form .form-row input[type="email"],
.wc-recesso-form .form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #1e293b;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wc-recesso-form .form-row input[type="text"]:focus,
.wc-recesso-form .form-row input[type="email"]:focus,
.wc-recesso-form .form-row textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.wc-recesso-form .form-row input.readonly {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
}

.wc-recesso-items-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 15px;
    max-height: 150px;
    overflow-y: auto;
}

.wc-recesso-items-box ul {
    margin: 0;
    padding-left: 20px;
}

.wc-recesso-items-box li {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 6px;
}

.wc-recesso-items-box li:last-child {
    margin-bottom: 0;
}

.wc-recesso-form .form-row .description {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #64748b;
}

/* ==========================================================================
   Preview Card (Step 2)
   ========================================================================== */
.wc-recesso-preview-card {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.wc-recesso-legal-heading {
    color: #b45309;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.wc-recesso-legal-body {
    font-size: 0.95rem;
    color: #451a03;
    line-height: 1.6;
}

.wc-recesso-legal-body p {
    margin-bottom: 12px;
}

.wc-recesso-legal-body hr {
    border: 0;
    border-top: 1px solid #fef3c7;
    margin: 15px 0;
}

.wc-recesso-legal-body .small {
    font-size: 0.8rem;
}

/* Consent Box */
.wc-recesso-consent-box {
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.checkbox-container input {
    margin-top: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.checkbox-label {
    color: #1e293b;
    line-height: 1.4;
    font-weight: 500;
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */
.wc-recesso-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    margin-top: 10px;
}

.button.wc-recesso-btn-primary {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.button.wc-recesso-btn-primary:hover {
    background-color: #2563eb !important;
}

.button.wc-recesso-btn-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.button.wc-recesso-btn-danger:hover {
    background-color: #dc2626 !important;
}

.button.wc-recesso-btn-secondary {
    background-color: #64748b !important;
    color: #ffffff !important;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.button.wc-recesso-btn-secondary:hover {
    background-color: #475569 !important;
}

.wc-recesso-btn-link {
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-weight: 500 !important;
    text-decoration: underline !important;
    cursor: pointer;
}

.wc-recesso-btn-link:hover {
    color: #1e293b !important;
}

/* ==========================================================================
   Success and Receipt Box (Step 3)
   ========================================================================== */
.wc-recesso-success-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.wc-recesso-success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.wc-recesso-success-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    line-height: 1.6;
}

.wc-recesso-success-box h2 {
    color: #16a34a;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
}

.wc-recesso-success-text {
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.wc-recesso-receipt-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

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

.receipt-label {
    color: #64748b;
    font-weight: 500;
}

.receipt-value {
    color: #1e293b;
    font-weight: 600;
}

.wc-recesso-email-info {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 30px;
}

.wc-recesso-success-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.wc-recesso-success-actions .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

/* ==========================================================================
   Print Layout Configuration
   ========================================================================== */
@media print {
    /* Hide everything on the page except the receipt card */
    body * {
        visibility: hidden;
    }
    
    .wc-recesso-success-box,
    .wc-recesso-success-box *,
    .wc-recesso-receipt-card,
    .wc-recesso-receipt-card * {
        visibility: visible;
    }
    
    .wc-recesso-success-box {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    /* Hide non-printable elements in the receipt */
    .wc-recesso-success-icon,
    .wc-recesso-success-actions,
    .wc-recesso-stepper {
        display: none !important;
    }
}
