/* Frontend Styles for WooCommerce Returns Manager */

/* Return Form Styles */
.wc-return-form-container {
    max-width: 800px;
    margin: 20px 0;
    padding: 0;
}

.wc-return-form-container h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.order-details-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.order-details-summary p {
    margin: 8px 0;
    font-size: 14px;
}

/* Form Styles */
.wc-return-request-form .form-row {
    margin-bottom: 20px;
}

.wc-return-request-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.wc-return-request-form .required {
    color: #e74c3c;
}

.wc-return-request-form input[type="text"],
.wc-return-request-form input[type="email"],
.wc-return-request-form select,
.wc-return-request-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.wc-return-request-form input:focus,
.wc-return-request-form select:focus,
.wc-return-request-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Return Items Selection */
.return-items-selection {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    background: #fefefe;
}

.return-items-list {
    margin: 15px 0;
}

.return-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

.return-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.return-item-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    width: 100%;
}

.return-item-checkbox input[type="checkbox"] {
    margin-right: 15px;
    margin-top: 5px;
    width: auto;
    transform: scale(1.2);
}

.return-item-details {
    display: flex;
    align-items: flex-start;
    flex-grow: 1;
}

.item-image {
    margin-right: 15px;
    flex-shrink: 0;
}

.item-image img {
    max-width: 60px;
    height: auto;
    border-radius: 4px;
}

.item-info {
    flex-grow: 1;
}

.item-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.item-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 8px;
}

.item-meta .quantity,
.item-meta .price {
    font-size: 14px;
    color: #666;
}

.item-meta .price {
    font-weight: 600;
    color: #27ae60;
}

.item-meta-details {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.select-all-items {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.select-all-items label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.select-all-items input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* Full Order Return */
.full-order-return {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.order-items-summary {
    margin-top: 15px;
}

.order-item-summary {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.order-item-summary:last-child {
    border-bottom: none;
}

/* Terms and Conditions */
.terms-conditions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    width: auto;
}

.checkbox-label a {
    color: #3498db;
    text-decoration: underline;
}

/* Submit Row */
.submit-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 30px;
}

.wc-return-submit-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wc-return-submit-btn:hover {
    background: #219a52;
}

.button-secondary {
    background: #6c757d;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.button-secondary:hover {
    background: #5a6268;
    color: white;
}

/* Return Policy Info */
.return-policy-info {
    margin-top: 30px;
    padding: 20px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
}

.return-policy-info h4 {
    margin-top: 0;
    color: #1976d2;
}

.return-policy-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.return-policy-info li {
    margin-bottom: 8px;
    color: #333;
}

/* My Returns Page */
.wc-my-returns {
    margin: 20px 0;
}

.returns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.returns-header h2 {
    margin: 0;
    color: #2c3e50;
}

/* Returns Table */
.returns-table-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 25px;
}

.wc-returns-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.wc-returns-table th,
.wc-returns-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.wc-returns-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.wc-returns-table tbody tr:hover {
    background: #f8f9fa;
}

.wc-returns-table a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.wc-returns-table a:hover {
    text-decoration: underline;
}

/* Status and Type Badges */
.return-status-badge,
.return-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-cancelled {
    background: #d6d8db;
    color: #383d41;
}

.type-refund {
    background: #cce7ff;
    color: #004085;
}

.type-exchange {
    background: #d1ecf1;
    color: #0c5460;
}

.type-store_credit {
    background: #d4edda;
    color: #155724;
}

/* Action Buttons */
.return-actions-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.return-actions-buttons .button {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-return {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.view-return:hover {
    background: #2980b9;
    border-color: #2980b9;
    color: white;
}

.cancel-return {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.cancel-return:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.download-label {
    background: #f39c12;
    color: white;
    border-color: #f39c12;
}

.download-label:hover {
    background: #e67e22;
    border-color: #e67e22;
    color: white;
}

/* Returns Summary */
.returns-summary {
    margin: 25px 0;
}

.summary-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Returns Found */
.no-returns-found {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 25px 0;
}

.no-returns-icon {
    margin-bottom: 20px;
    color: #6c757d;
}

.no-returns-found h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.no-returns-found p {
    color: #666;
    margin-bottom: 25px;
}

.no-returns-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Status Legend */
.return-status-legend {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-top: 25px;
}

.return-status-legend h4 {
    margin-top: 0;
    color: #2c3e50;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-description {
    font-size: 13px;
    color: #666;
}

/* Modal Styles */
.wc-return-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

/* Return Details Page */
.wc-return-details {
    max-width: 800px;
    margin: 20px 0;
}

.wc-return-details h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.return-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.return-info p {
    margin: 8px 0;
}

.return-message,
.return-items {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.return-message h4,
.return-items h4 {
    margin-top: 0;
    color: #2c3e50;
}

.return-items ul {
    margin: 10px 0;
    padding-left: 20px;
}

.return-items li {
    margin-bottom: 5px;
}

/* Messages/Communication */
.return-messages {
    margin: 25px 0;
}

.return-messages h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.message {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 6px 6px 0;
}

.message.admin-message {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.message.customer-message {
    background: #d4edda;
    border-left-color: #28a745;
}

.message-date {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* Return Actions */
.return-actions {
    margin-top: 25px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .returns-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .wc-returns-table,
    .wc-returns-table thead,
    .wc-returns-table tbody,
    .wc-returns-table th,
    .wc-returns-table td,
    .wc-returns-table tr {
        display: block;
    }
    
    .wc-returns-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .wc-returns-table tr {
        border: 1px solid #e9ecef;
        border-radius: 6px;
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .wc-returns-table td {
        border: none;
        padding: 8px 0;
        position: relative;
        padding-left: 50% !important;
    }
    
    .wc-returns-table td:before {
        content: attr(data-title) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #2c3e50;
    }
    
    .return-item-details {
        flex-direction: column;
    }
    
    .item-image {
        margin-right: 0;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .legend-items {
        grid-template-columns: 1fr;
    }
    
    .submit-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .submit-row .button {
        text-align: center;
    }
    
    .no-returns-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .no-returns-actions .button {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .wc-return-form-container,
    .wc-my-returns,
    .wc-return-details {
        margin: 10px 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .return-actions-buttons {
        justify-content: center;
    }
    
    .return-actions-buttons .button {
        flex: 1;
        min-width: 80px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.wc-return-request-form input:focus,
.wc-return-request-form select:focus,
.wc-return-request-form textarea:focus,
.button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

