.woocommerce-rma-manager {
    margin-bottom: 2em;
}

.rma-actions {
    margin-bottom: 2em;
}

.woocommerce-rma-form {
    background: #f8f8f8;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 2em;
}

.returnable-items {
    width: 100%;
    margin-bottom: 1.5em;
    border-collapse: collapse;
}

.returnable-items th,
.returnable-items td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.returnable-items th {
    background: #f5f5f5;
}

.return-quantity {
    width: 60px;
}

.item-condition {
    width: 100%;
    min-width: 150px;
}

.item-photos {
    max-width: 100%;
}

.rma-details {
    background: #f8f8f8;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 2em;
}

.rma-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.rma-item-photo {
    max-width: 100px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.rma-item-photo:hover {
    border-color: #999;
}

.rma-notes {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 2em;
}

.rma-instructions {
    background: #e8f5e9;
    padding: 20px;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    margin: 2em 0;
}

.rma-instructions h3 {
    margin-top: 0;
    color: #2e7d32;
}

/* Status badges */
.rma-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-received {
    background: #e3f2fd;
    color: #1565c0;
}

.status-processing {
    background: #fff8e1;
    color: #f9a825;
}

.status-completed {
    background: #c8e6c9;
    color: #1b5e20;
}

.status-rejected {
    background: #ffebee;
    color: #c62828;
}

.status-cancelled {
    background: #f5f5f5;
    color: #616161;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .returnable-items {
        display: block;
        overflow-x: auto;
    }
    
    .returnable-items th,
    .returnable-items td {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .return-quantity {
        width: 50px;
    }
    
    .item-condition {
        min-width: 100px;
    }
}

/* Invoice Search Styles */
.rma-invoice-search-wrapper {
    position: relative;
    margin-bottom: 2em;
}

.invoice-search-input {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.invoice-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.invoice-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 500px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.invoice-search-results-inner {
    padding: 15px;
}

.invoice-search-results h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.invoice-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.invoice-result-item {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.invoice-result-item:hover {
    background: #f5f5f5;
    border-color: #007cba;
}

.invoice-result-main {
    margin-bottom: 5px;
}

.invoice-result-details {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.invoice-total {
    font-weight: 600;
    color: #333;
}

.selected-invoice-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.selected-invoice-display h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.change-invoice {
    margin-top: 10px;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-error {
    color: #dc3545;
}