/* RMA MX — Frontend Styles */

/* Badge */
.rma-mx-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
}

/* Form */
.rma-mx-form { max-width: 800px; }
.rma-mx-form h2 { margin-bottom: 16px; }

.rma-mx-field { margin-bottom: 16px; }
.rma-mx-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.rma-mx-field select,
.rma-mx-field input[type="text"],
.rma-mx-field input[type="email"],
.rma-mx-field input[type="number"],
.rma-mx-field textarea { width: 100%; max-width: 100%; }

.rma-mx-radio-group { display: flex; flex-direction: column; gap: 6px; }
.rma-mx-radio-group label { font-weight: 400; cursor: pointer; }

/* Items table */
.rma-mx-items-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.rma-mx-items-table th,
.rma-mx-items-table td { padding: 10px 8px; border-bottom: 1px solid #eee; text-align: left; }
.rma-mx-items-table thead th { font-weight: 600; border-bottom: 2px solid #ddd; }
.rma-mx-col-check { width: 40px; text-align: center; }
.rma-mx-col-qty { width: 120px; }
.rma-mx-col-price { width: 100px; }
.rma-mx-col-product { display: flex; align-items: center; gap: 8px; }
.rma-mx-thumb img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }

/* Refund estimate */
.rma-mx-refund-estimate {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 15px;
}

/* Buttons */
.rma-mx-actions { display: flex; gap: 8px; margin-top: 16px; }
.rma-mx-btn { text-decoration: none; }
.rma-mx-btn--primary { font-weight: 600; }
.rma-mx-btn--cancel { color: #d63638; border-color: #d63638; }
.rma-mx-order-actions { margin-top: 16px; display: flex; gap: 8px; }

/* Alert */
.rma-mx-alert {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}
.rma-mx-alert--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.rma-mx-alert--error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Policy box */
.rma-mx-policy {
    background: #f0f6fc;
    border: 1px solid #c3d9ed;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* Detail page */
.rma-mx-detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
@media (max-width: 768px) { .rma-mx-detail-grid { grid-template-columns: 1fr; } }
.rma-mx-info-table { width: 100%; }
.rma-mx-info-table th { text-align: left; padding: 6px 12px 6px 0; color: #666; white-space: nowrap; width: 140px; }
.rma-mx-info-table td { padding: 6px 0; }

/* My account list table */
.rma-mx-table { width: 100%; border-collapse: collapse; }
.rma-mx-table th,
.rma-mx-table td { padding: 10px 8px; border-bottom: 1px solid #eee; text-align: left; }
.rma-mx-table thead th { font-weight: 600; border-bottom: 2px solid #ddd; }
.rma-mx-empty { color: #666; font-style: italic; padding: 20px 0; }

/* Guest form */
.rma-mx-guest-form { max-width: 400px; }

/* Exchange picker */
.rma-mx-exchange-row td { padding-top: 0 !important; }
.rma-mx-exchange-picker { padding: 8px 0 12px; }
.rma-mx-exchange-picker label { font-weight: 600; display: block; margin-bottom: 4px; font-size: 13px; }
.rma-mx-exchange-picker select { width: 100%; max-width: 400px; }
.rma-mx-exchange-notice { background: #f0f8ff; border-left: 3px solid #337ab7; padding: 10px 14px; margin-bottom: 16px; }
.rma-mx-btn--exchange { background: #17a2b8 !important; color: #fff !important; border-color: #17a2b8 !important; }

/* Warranty badge */
.rma-mx-warranty-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--warranty-color, #27ae60);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0;
}
.rma-mx-warranty-text { margin: 8px 0; }
.rma-mx-warranty-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; flex-shrink: 0; }
.rma-mx-warranty-tooltip-trigger {
    position: relative;
    cursor: help;
    font-size: 14px;
    opacity: 0.85;
}
.rma-mx-warranty-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    z-index: 100;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.rma-mx-warranty-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}
.rma-mx-warranty-tooltip-trigger:hover .rma-mx-warranty-tooltip,
.rma-mx-warranty-tooltip-trigger:focus-within .rma-mx-warranty-tooltip,
.rma-mx-warranty-tooltip-trigger:focus .rma-mx-warranty-tooltip {
    display: block;
}

/* Warranty SAV button */
.rma-mx-btn--warranty { background: #8e44ad !important; color: #fff !important; border-color: #8e44ad !important; }
