/* WC Returns Manager – Frontend form styles */

.wrm-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    font-family: inherit;
}

/* Return conditions notice – inherits site typography */
.wrm-return-notice {
    margin-bottom: 2.5em;
    padding: 14px 18px;
    border-left: 3px solid currentColor;
    opacity: 0.75;
    font-size: inherit;
    line-height: 1.6;
}

.wrm-form-title {
    margin-bottom: 1.25em;
}

/* Form field widths – consistent 100% within wrapper */
.wrm-form-row {
    width: 100%;
    box-sizing: border-box;
}

/* Messages */
.wrm-messages {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 1.2em;
    font-size: 0.95em;
    line-height: 1.5;
}
.wrm-messages.wrm-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}
.wrm-messages.wrm-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form rows */
.wrm-form-row {
    margin-bottom: 1.1em;
}
.wrm-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95em;
}
.wrm-form-row .required {
    color: #c00;
}
.wrm-form-row input[type="text"],
.wrm-form-row input[type="email"],
.wrm-form-row input[type="number"],
.wrm-form-row textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.15s;
    background: #fff;
    color: #333;
}
.wrm-form-row input:focus,
.wrm-form-row textarea:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.12);
}
.wrm-form-row input.wrm-field-error,
.wrm-form-row textarea.wrm-field-error {
    border-color: #d9534f;
}
.wrm-form-row textarea {
    resize: vertical;
    min-height: 100px;
}
.wrm-form-row small {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 4px;
}

/* Products section */
.wrm-products-section {
    margin: 1.4em 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.wrm-products-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: #555;
    font-size: 0.9em;
}

.wrm-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: wrm-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes wrm-spin {
    to { transform: rotate(360deg); }
}

.wrm-products-header {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 10px 16px;
    font-size: 0.95em;
}

.wrm-products-error {
    padding: 14px 16px;
    color: #721c24;
    background: #fff8f8;
    margin: 0;
    font-size: 0.9em;
}

.wrm-products-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wrm-product-item {
    border-bottom: 1px solid #f0f0f0;
}
.wrm-product-item:last-child {
    border-bottom: none;
}
.wrm-product-item label {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    cursor: pointer !important;
    transition: background 0.1s;
    font-weight: normal !important;
    margin: 0 !important;
}
.wrm-product-item label:hover {
    background: #f5f5f5 !important;
}
.wrm-product-item input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    accent-color: #1a1a1a;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
}
.wrm-product-thumb {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px !important;
    max-height: 52px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    border: 1px solid #eee !important;
    display: block !important;
}
.wrm-product-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
}
.wrm-product-name {
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
    word-break: break-word;
}
.wrm-product-sku {
    font-size: 0.8em;
    color: #888;
}
.wrm-product-meta {
    font-size: 0.85em;
    color: #666;
}

/* Submit */
.wrm-form-submit {
    margin-top: 1.4em;
}
.wrm-btn-submit {
    display: inline-block;
    padding: 11px 28px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}
.wrm-btn-submit:hover:not(:disabled) {
    background: #333;
}
.wrm-btn-submit:active:not(:disabled) {
    transform: translateY(1px);
}
.wrm-btn-submit:disabled,
.wrm-btn-submit.wrm-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.wrm-submit-hint {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 0.85em;
}

/* Success state – hide form */
.wrm-form-wrapper.wrm-submitted .wrm-form {
    display: none;
}
