/**
 * Advanced Refund Manager - Frontend Styles
 */

.arm-refund-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.arm-refund-modal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.arm-refund-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.arm-refund-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.arm-order-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.arm-product-card {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
    width: 100%;
    text-align: left;
}

.arm-product-card .arm-product-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
}

.arm-refund-amount-group .form-control[readonly] {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
    font-weight: 700;
    font-size: 1.1rem;
}

.arm-refund-amount-group .input-group-text {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
    font-weight: 700;
}

.arm-refund-amount-help {
    display: block;
    margin-top: 6px;
}

.arm-products-toolbar .arm-selected-count {
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: middle;
}

.arm-product-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.arm-product-card.selected {
    border-color: #667eea;
    background: #eef0ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.arm-product-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.arm-product-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.arm-image-preview .arm-preview-item {
    position: relative;
    display: inline-block;
}

.arm-image-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.arm-image-preview .arm-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    border: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arm-form-message.alert-success {
    background: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.arm-form-message.alert-danger {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

/* Refund History */
.arm-refund-history {
    margin-bottom: 2rem;
}

.arm-history-products {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.arm-history-product-item,
.arm-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.arm-product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.arm-customer-notes-row td {
    background: #f8f9fa;
    padding-top: 0 !important;
}

/* Status Badges */
.arm-status-badge {
    display: inline-block;
    padding: 0.35em 0.75em;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.arm-badge-pending {
    background: #fff3cd;
    color: #856404;
}

.arm-badge-under-review {
    background: #cfe2ff;
    color: #084298;
}

.arm-badge-approved {
    background: #d1e7dd;
    color: #0f5132;
}

.arm-badge-rejected {
    background: #f8d7da;
    color: #842029;
}

.arm-badge-refunded {
    background: #198754;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .arm-refund-modal .modal-dialog {
        margin: 0.5rem;
    }

    .arm-product-card {
        flex-direction: column;
        text-align: center;
    }

    .arm-history-table thead {
        display: none;
    }

    .arm-history-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 0.5rem;
    }

    .arm-history-table td {
        display: block;
        text-align: right;
        padding: 0.5rem;
        border: none;
    }

    .arm-history-table td::before {
        content: attr(data-title) ": ";
        float: left;
        font-weight: bold;
    }
}

/* Order action link styling */
.woocommerce-orders-table__cell-order-actions .arm_refund {
    background: #667eea !important;
    color: #fff !important;
}

.woocommerce-orders-table__cell-order-actions .arm_refund:hover {
    background: #5a6fd6 !important;
}
