/**
 * Frontend styles for the returns form
 */
.wsu-returns-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Honeypot field styling - make absolutely sure it's hidden */
.wsu-returns-message {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    pointer-events: none;
}

.wsu-returns-step {
    margin-bottom: 30px;
}

.wsu-returns-field {
    margin-bottom: 20px;
}

.wsu-returns-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.wsu-returns-select,
.wsu-returns-field input[type="text"],
.wsu-returns-field input[type="email"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 16px;
}

.wsu-returns-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.wsu-returns-overlay-content {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    max-width: 600px;
    width: 90%;
    position: relative;
}

.wsu-returns-overlay-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.wsu-returns-error {
    color: #dc3232;
    padding: 10px;
    border: 1px solid #dc3232;
    border-radius: 4px;
    background: #fbeaea;
    margin-bottom: 20px;
}

.wsu-returns-success {
    color: #46b450;
    padding: 10px;
    border: 1px solid #46b450;
    border-radius: 4px;
    background: #ecf7ed;
    margin-bottom: 20px;
}

/* Order items styles - will be used in step 3 */
.wsu-returns-items {
    margin-bottom: 20px;
}

.wsu-returns-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.wsu-returns-item-disabled {
    opacity: 0.6;
    background-color: #f5f5f5;
    position: relative;
}

.wsu-returns-item-disabled label {
    cursor: not-allowed;
}

.wsu-returns-item-disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.wsu-returns-item-reason {
    margin-top: 5px;
    color: #e53935;
    font-size: 0.9em;
    font-style: italic;
}

.wsu-returns-item-image {
    width: 80px;
    margin-right: 15px;
}

.wsu-returns-item-details {
    flex-grow: 1;
}

.wsu-returns-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.wsu-returns-checkbox-group {
    margin: 15px 0;
}

.wsu-returns-checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.wsu-returns-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

.wsu-returns-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.wsu-returns-button:hover {
    background: #005177;
}

.wsu-returns-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.wsu-returns-select-all {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 4px;
}

.wsu-returns-select-all label {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.wsu-returns-select-all input[type="checkbox"] {
    margin-right: 10px;
}

/* Feedback form styles */
.wsu-returns-feedback {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feedback-intro {
    text-align: center;
    margin-bottom: 30px;
}

.feedback-intro h3 {
    color: #333;
    font-size: 24px;
    margin: 0 0 10px;
}

.feedback-intro p {
    color: #666;
    margin: 0;
}

.wsu-returns-rating {
    margin: 30px 0;
    text-align: center;
}

.rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 5px;
    margin-bottom: 10px;
}

.rating-star {
    cursor: pointer;
    position: relative;
}

.rating-star input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating-star .star {
    display: block;
    font-size: 40px;
    color: #ddd;
    transition: transform 0.2s, color 0.2s;
}

.rating-star:hover .star,
.rating-star:hover ~ .rating-star .star,
.rating-star input[type="radio"]:checked ~ .rating-star .star {
    color: #ffd700;
    transform: scale(1.1);
}

.rating-star:hover .star {
    transform: scale(1.2);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.wsu-returns-field {
    margin-bottom: 20px;
}

.wsu-returns-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

#feedbackComment {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 100px;
    font-size: 14px;
    transition: border-color 0.2s;
}

#feedbackComment:focus {
    border-color: #666;
    outline: none;
}

#feedbackComment::placeholder {
    color: #999;
}

.wsu-returns-actions {
    text-align: center;
}

.wsu-returns-button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.wsu-returns-button:hover {
    background: #135e96;
}

.wsu-returns-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.feedback-success {
    background: #ecf7ed;
    color: #1b472f;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    animation: fadeIn 0.3s ease-out;
}

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

/* Custom CSS for Select2 integration */
.wsu-returns-select2 {
    width: 100% !important;
    max-width: 100%;
}

/* Match WooCommerce's select2 styling */
.select2-container .select2-selection--single {
    margin: 0;
    max-width: 100%;
    outline: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding: 3px 24px 4px 8px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: #96588a;
}

.wsu-returns-item.item-excluded {
    opacity: 0.75;
    cursor: not-allowed;
    position: relative;
}

.wsu-returns-item.item-excluded:hover {
    opacity: 0.8;
}

.wsu-returns-item.item-excluded label {
    cursor: not-allowed;
}

.wsu-returns-item.item-excluded input[type="checkbox"] {
    cursor: not-allowed;
}

.return-exclusion-note {
    display: block;
    color: #e53935;
    font-size: 0.9em;
    margin-top: 4px;
}
