/* Frontend Styles */
.request_return{
    background-color: #C06038;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}
.return_status[aria-label="Statut de retour: En attente"] {
    background-color: #ffc107;
    color: #000;
    border: none;
    font-weight: 500;
}
.return_status[aria-label="Statut de retour: Approuvé"] {
    background-color: #28a745;
    color: #fff;
    border: none;
}
.return_status[aria-label="Statut de retour: Refusé"] {
    background-color: #dc3545;
    color: #fff;
    border: none;
}
.return_status[aria-label="Statut de retour: Terminé"] {
    background-color: #17a2b8;
    color: #fff;
    border: none;
}
.return-request-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    overflow-y: auto;
}

.return-request-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e4e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #1d2327;
}

.modal-body {
    padding: 20px;
}

/* Order Items Table */
.return-items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.return-items-table th,
.return-items-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
}

.return-items-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #1d2327;
}

.return-items-table tr:hover {
    background-color: #f8f9fa;
}

/* Product Selection */
.product-select {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #e2e4e7;
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 500;
    color: #1d2327;
    margin-bottom: 5px;
}

.product-sku {
    font-size: 13px;
    color: #666;
}

.quantity-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-select input {
    width: 60px;
    padding: 8px;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    text-align: center;
}

/* Return Reason */
.return-reason {
    margin: 20px 0;
}

.return-reason textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Submit Button */
.submit-return {
    background-color: #C06038;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    text-align: center;
}

.submit-return:hover {
    background-color: #135e96;
}

/* Return Status Styles */
.return-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.return-status.status-pending {
    background-color: #f0b849;
    color: #fff;
}

.return-status.status-approved {
    background-color: #46b450;
    color: #fff;
}

.return-status.status-denied {
    background-color: #dc3232;
    color: #fff;
}

.return-status.status-completed {
    background-color: #C06038;
    color: #fff;
}

.return-status.status-none {
    background-color: #f0f0f1;
    color: #50575e;
}

/* Override WooCommerce status styles */
.woocommerce-orders-table .return-status {
    margin: 2px 0;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
}

.woocommerce-orders-table .return-status.status-pending {
    background-color: #f0b849 !important;
    color: #fff !important;
}

.woocommerce-orders-table .return-status.status-approved {
    background-color: #46b450 !important;
    color: #fff !important;
}

.woocommerce-orders-table .return-status.status-denied {
    background-color: #dc3232 !important;
    color: #fff !important;
}

.woocommerce-orders-table .return-status.status-completed {
    background-color: #C06038 !important;
    color: #fff !important;
}

.woocommerce-orders-table .return-status.status-none {
    background-color: #f0f0f1 !important;
    color: #50575e !important;
}

/* My Account Orders Table */
.woocommerce-orders-table .return-status {
    margin: 2px 0;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .wc-return-request-modal-header h2 {
        font-size: 17px;
    }
    .modal-content {
        width: 95%;
        margin: 10px auto;
    }

    .product-select {
        flex-direction: column;
        align-items: flex-start;
    }

    .quantity-select {
        width: 100%;
        justify-content: space-between;
    }

    .return-items-table {
        display: block;
        overflow-x: auto;
    }

    .woocommerce-orders-table .return-status {
        display: block;
        margin: 5px 0;
    }
}
td.quantity-column {
    font-size: small;
}
.wc-return-request-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.wc-return-request-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.wc-return-request-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 2;
    animation: modalFadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-return-request-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e4e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.wc-return-request-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1d2327;
}

.wc-return-request-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-return-request-modal-close:hover {
    background: #f0f0f1;
    color: #1d2327;
}

.wc-return-request-modal-body {
    padding: 24px;
}

.wc-return-request-items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 0 24px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wc-return-request-items-table th,
.wc-return-request-items-table td {
    padding-top: 10px;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
}

.wc-return-request-items-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #1d2327;
    font-size: 16px;
}

.wc-return-request-items-table tr:hover {
    background-color: #f8f9fa;
}

.wc-return-request-reason {
    margin-top: 24px;
}

.wc-return-request-reason label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d2327;
}

.wc-return-request-reason textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.wc-return-request-reason textarea:focus {
    border-color: #C06038;
    outline: none;
    box-shadow: 0 0 0 1px #C06038;
}

.wc-return-request-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e4e7;
}

.wc-return-request-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wc-return-request-cancel {
    background: #f0f0f1;
    border: 1px solid #e2e4e7;
    color: #1d2327;
}

.wc-return-request-cancel:hover {
    background: #e2e4e7;
}

.wc-return-request-actions button[type="submit"] {
    background: #C06038;
    border: none;
    color: #fff;
}

.wc-return-request-actions button[type="submit"]:hover {
    background: #135e96;
}

/* Product Selection Styles */
.wc-return-request-items-table .product-column {
    width: 40%;
}

.wc-return-request-items-table .quantity-column,
.wc-return-request-items-table .return-quantity-column {
    width: 20%;
    text-align: center;
}

.wc-return-request-items-table .select-column {
    width: 40px;
    text-align: center;
}

.wc-return-request-items-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wc-return-request-items-table input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    text-align: center;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .wc-return-request-reason textarea{
        width: 95%;
    }
    .wc-return-request-items-table th {
        font-size: 13px;
    }
    .product-name {
        font-size: small;
    }
    .wc-return-request-items-table th, .wc-return-request-items-table td {
        padding-top:5px;
    }
    .wc-return-request-modal-content {
        width: 95%;
        margin: 10px auto;
    }

    .wc-return-request-items-table {
        display: block;
        overflow-x: auto;
        height: 300px;
    }

    .wc-return-request-actions {
        flex-direction: column;
    }

    .wc-return-request-actions button {
        width: 100%;
    }
}

/* Return Status Badges */
.return-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.return-status-badge.approved {
    background-color: #28a745;
    color: #fff;
}

.return-status-badge.pending {
    background-color: #ffc107;
    color: #000;
}

.return-status-badge.denied {
    background-color: #dc3545;
    color: #fff;
}

.return-status-badge.completed {
    background-color: #17a2b8;
    color: #fff;
}

/* Request Return Button */
.button.request_return.badge-warning {
    background-color: #ffc107;
    color: #000;
    border: none;
    padding: 0.5em 1em;
    border-radius: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.button.request_return.badge-warning:hover {
    background-color: #e0a800;
    color: #000;
    text-decoration: none;
}

/* My Account Orders Table Adjustments */
.woocommerce-orders-table .button.return-status-badge {
    pointer-events: none;
    cursor: default;
    opacity: 1;
}

.woocommerce-orders-table .button.return-status-badge:hover {
    text-decoration: none;
}

.wc-return-request-items-table tr.wc-return-request-item {
    transition: background-color 0.2s ease;
}

.wc-return-request-items-table tr.wc-return-request-item:hover {
    background-color: #f8f9fa;
}

.wc-return-request-items-table tr.wc-return-request-item.selected {
    background-color: #f0f7ff;
    border-left: 3px solid #C06038;
}

.wc-return-request-items-table tr.wc-return-request-item td {
    transition: background-color 0.2s ease;
}

.wc-return-request-items-table tr.wc-return-request-item:hover td {
    background-color: #f8f9fa;
}

.wc-return-request-items-table tr.wc-return-request-item.selected td {
    background-color: #f0f7ff;
}

/* Ensure checkbox and quantity input are not affected by row hover */
.wc-return-request-items-table tr.wc-return-request-item:hover .select-column,
.wc-return-request-items-table tr.wc-return-request-item:hover .return-quantity-column {
    background-color: transparent;
}

/* Improve checkbox styling */
.wc-return-request-items-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #C06038;
}

/* Improve quantity input styling */
.wc-return-request-items-table input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.wc-return-request-items-table input[type="number"]:focus {
    border-color: #C06038;
    outline: none;
    box-shadow: 0 0 0 1px #C06038;
}

.wc-return-request-items-table input[type="number"]:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Return Status in Orders Table */
.woocommerce-orders-table__row--status-attente-retour .woocommerce-orders-table__cell-order-status {
    position: relative;
    padding-left: 30px;
}



.woocommerce-orders-table__row--status-attente-retour .woocommerce-orders-table__cell-order-status::after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 12px;
} 