/* WooCommerce Modern Refund Manager - Frontend Styles */

.wmr-refund-section {
    margin-top: 30px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    margin-bottom: 35px;
}

.wmr-open-refund-modal {
    background: #ff6b6b !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wmr-open-refund-modal:hover {
    background: #ff5252 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Modal Styles */
.wmr-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.wmr-modal.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.wmr-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wmr-modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.wmr-modal-close:hover,
.wmr-modal-close:focus {
    color: #000;
}

.wmr-modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 10px;
}

/* Form Styles */
.wmr-form-group {
    margin-bottom: 25px;
}

.wmr-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.wmr-form-group .required {
    color: #ff6b6b;
}

.wmr-items-list {
    border: 1px solid #ddd;
    padding: 15px;
    background: #fafafa;
    max-height: 300px;
    overflow-y: auto;
}

.wmr-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.wmr-item:last-child {
    margin-bottom: 0;
}

.wmr-item:hover {
    border-color: #ff6b6b;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.1);
}

.wmr-item label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.wmr-item-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wmr-item-name {
    font-size: 14px;
    color: #333;
}

.wmr-item-qty {
    display: flex;
    align-items: center;
}

.wmr-item-qty label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.wmr-qty-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
}

.wmr-qty-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.wmr-max-qty {
    color: #666;
    font-size: 13px;
}

#wmr-refund-reason {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#wmr-refund-reason:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Form Actions */
.wmr-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.wmr-form-actions .button {
    flex: 1;
    padding: 12px 24px !important;
    font-size: 15px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none !important;
}

.wmr-form-actions .button-primary {
    background: #ff6b6b !important;
    color: #fff !important;
}

.wmr-form-actions .button-primary:hover {
    background: #ff5252 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.wmr-modal-cancel {
    background: #e0e0e0 !important;
    color: #333 !important;
}

.wmr-modal-cancel:hover {
    background: #d0d0d0 !important;
}

/* Form Message */
.wmr-form-message {
    margin-top: 20px;
    padding: 12px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wmr-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.wmr-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Existing Refund Styles */
.wmr-existing-refund {
    background: #fff;
    padding: 25px;
}

.wmr-existing-refund h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 10px;
}

.wmr-refund-info p {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
}

.wmr-refund-info strong {
    color: #333;
    font-weight: 600;
}

.wmr-status-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wmr-status-pending {
    background: #fff3cd;
    color: #856404;
}

.wmr-status-processing {
    background: #cfe2ff;
    color: #084298;
}

.wmr-status-approved {
    background: #d4edda;
    color: #155724;
}

.wmr-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.wmr-status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.wmr-refund-items {
    list-style: none;
    padding: 15px;
    background: #f9f9f9;
    margin: 10px 0;
}

.wmr-refund-items li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.wmr-refund-items li:last-child {
    border-bottom: none;
}

.wmr-refund-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.wmr-update-refund-btn,
.wmr-cancel-refund-btn {
    padding: 10px 20px !important;
    font-size: 14px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wmr-update-refund-btn {
    background: #4CAF50 !important;
    color: #fff !important;
    border: none !important;
}

.wmr-update-refund-btn:hover {
    background: #45a049 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.wmr-cancel-refund-btn {
    background: #f44336 !important;
    color: #fff !important;
    border: none !important;
}

.wmr-cancel-refund-btn:hover {
    background: #da190b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.wmr-contact-notice {
    background: #e3f2fd;
    padding: 15px;
    border-left: 4px solid #2196F3;
    margin-top: 20px;
    font-size: 14px;
    color: #1565C0;
}

/* Loading State */
.wmr-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wmr-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b6b;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wmr-modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }

    .wmr-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .wmr-item-qty {
        width: 100%;
    }

    .wmr-form-actions {
        flex-direction: column;
    }

    .wmr-refund-actions {
        flex-direction: column;
    }
}