/* 
 * WooCommerce Return System Frontend Styles
 * Modern Design with Brand Colors
 * 
 * @author Absardotdev <absardotdev@gmail.com>
 */

/* ===================================
   ORDER SEARCH FORM - MODERN DESIGN
   =================================== */
.wrs-return-form-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrs-return-form-container h2 {
    color: #043044;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.wrs-return-form-container > p {
    color: #6c757d;
    font-size: 16px;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Order Lookup Form */
.wrs-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(4, 48, 68, 0.08);
}

.wrs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.wrs-form-row .wrs-form-group {
    margin-bottom: 0;
}

.wrs-form-group {
    margin-bottom: 24px;
    padding: 0;
}

.wrs-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #043044;
}

.wrs-form-group .required {
    color: #dc3545;
    margin-left: 4px;
}

.wrs-form-group input[type="text"],
.wrs-form-group input[type="email"],
.wrs-form-group select,
.wrs-form-group textarea {
    width: 80%;
    padding: 14px 16px;
    border: none;
    background: #FFF5E7;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #2c3e50;
    box-shadow: 0 1px 3px rgba(4, 48, 68, 0.08);
}

.wrs-form-group input[type="text"]:focus,
.wrs-form-group input[type="email"]:focus,
.wrs-form-group select:focus,
.wrs-form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 48, 68, 0.1), 0 1px 3px rgba(4, 48, 68, 0.12);
    background: white;
}

.wrs-form-group input::placeholder {
    color: #6c757d;
}

/* Form Actions - Center Button */
.wrs-form-actions {
    text-align: center;
    padding-top: 8px;
}

.wrs-button,
.wrs-button-primary {
    display: inline-block;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.wrs-button-primary {
    background: #043044;
    color: #FFF5E7;
    box-shadow: 0 2px 12px rgba(4, 48, 68, 0.08);
}

.wrs-button-primary:hover {
    background: #215A74;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(4, 48, 68, 0.12);
    color: #FFF5E7;
}

.wrs-button-primary:active {
    transform: translateY(0);
}

.wrs-button {
    background-color: #6c757d;
    color: #fff;
    box-shadow: 0 2px 12px rgba(108, 117, 125, 0.08);
}

.wrs-button:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(108, 117, 125, 0.12);
    color: #fff;
}

.wrs-button:disabled,
.wrs-button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner - FIXED */
.wrs-loading {
    display: inline-block;
    margin-left: 12px;
    vertical-align: middle;
}

.wrs-loading::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(4, 48, 68, 0.2);
    border-radius: 50%;
    border-top-color: #043044;
    animation: wrs-spin 0.8s linear infinite;
}

@keyframes wrs-spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   MESSAGES
   =================================== */
.wrs-messages {
    margin-bottom: 24px;
}

.wrs-success-message {
    background: #D4EDDA;
    border-left: 4px solid #28a745;
    color: #155724;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(4, 48, 68, 0.08);
}

.wrs-error-message {
    background: #F8D7DA;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(4, 48, 68, 0.08);
}

/* ===================================
   RETURN FORM SECTIONS
   =================================== */
.wrs-form h3,
.wrs-form h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #043044;
    font-weight: 600;
}

.wrs-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(4, 48, 68, 0.08);
}

.wrs-photo-instructions {
    padding-left: 15px;
    padding-right: 15px;
}

.wrs-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wrs-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.wrs-form-group input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px dashed #215A74;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wrs-form-group input[type="file"]:hover {
    background: #FFF5E7;
    border-color: #043044;
}

.wrs-file-help {
    display: block;
    margin-top: 8px;
    color: #6c757d;
    font-size: 13px;
}

/* Order Summary */
.wrs-order-summary {
    background: white;
    border-left: 4px solid #215A74;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(4, 48, 68, 0.08);
}

.wrs-order-info p {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.7;
    color: #2c3e50;
}

.wrs-order-info strong {
    color: #043044;
    font-weight: 600;
}

.wrs-item {
    border-bottom: 1px solid #eee;
}

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

.wrs-item-checkbox {
    display: block;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wrs-item-checkbox:hover {
    background-color: #f8f9fa;
}

.wrs-item-checkbox input[type="checkbox"] {
    margin-right: 15px;
    vertical-align: top;
    margin-top: 5px;
}

.wrs-item-details {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.wrs-item-image {
    flex-shrink: 0;
}

.wrs-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

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

.wrs-item-info h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.wrs-item-meta {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
}

.wrs-item-meta span {
    display: inline-block;
    margin-right: 10px;
}

.wrs-item-quantity,
.wrs-item-price {
    margin: 4px 0;
    font-size: 14px;
}

.wrs-item-price {
    font-weight: 600;
    color: #333;
}

/* ===================================
   ITEMS LIST
   =================================== */
.wrs-items-list {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(4, 48, 68, 0.08);
}

.wrs-item {
    border-bottom: 1px solid rgba(4, 48, 68, 0.08);
    background: white;
}

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

.wrs-item-checkbox {
    display: block;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wrs-item-checkbox:hover {
    background-color: #FFF5E7;
}

.wrs-item-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 16px;
    vertical-align: top;
    margin-top: 5px;
    cursor: pointer;
    accent-color: #043044;
}

.wrs-item-details {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.wrs-item-image {
    flex-shrink: 0;
}

.wrs-item-image img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(4, 48, 68, 0.08);
}

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

.wrs-item-info h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #043044;
}

.wrs-item-meta {
    margin: 4px 0;
    color: #6c757d;
    font-size: 14px;
}

.wrs-item-meta span {
    display: inline-block;
    margin-right: 10px;
}

.wrs-item-quantity,
.wrs-item-price {
    margin: 4px 0;
    font-size: 14px;
}

.wrs-item-price {
    font-weight: 600;
    color: #043044;
}

.wrs-photo-item {
    width: 120px;
    text-align: center;
}

.wrs-photo-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wrs-photo-name {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    word-break: break-word;
}

/* Shipping Information */
.wrs-shipping-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.wrs-return-address {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.wrs-return-address h5 {
    margin: 0 0 8px 0;
    color: #333;
}

.wrs-return-address address {
    font-style: normal;
    line-height: 1.5;
    color: #666;
}

/* Form Actions */
.wrs-form-actions {
    text-align: center;
    padding-top: 20px;
}

.wrs-button,
.wrs-button-primary {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wrs-button {
    background-color: #666;
    color: #fff;
}

.wrs-button:hover {
    background-color: #555;
    color: #fff;
}

.wrs-button-primary {
    background-color: #007cba;
    color: #fff;
}

.wrs-button-primary:hover {
    background-color: #005a87;
    color: #fff;
}

.wrs-button:disabled,
.wrs-button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wrs-loading {
    margin-left: 15px;
    color: #666;
    font-style: italic;
}

/* Error State */
.wrs-error {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.wrs-error h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.wrs-error p {
    color: #666;
    margin-bottom: 20px;
}

/* ===================================
   PHOTO PREVIEW
   =================================== */
.wrs-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.wrs-photo-item {
    width: 120px;
    text-align: center;
}

.wrs-photo-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(4, 48, 68, 0.08);
}

.wrs-photo-name {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
    word-break: break-word;
}

/* ===================================
   SHIPPING INFORMATION
   =================================== */
.wrs-shipping-info {
    background: #FFF5E7;
    padding: 20px 24px;
    border-radius: 8px;
    border-left: 4px solid #215A74;
    box-shadow: 0 1px 3px rgba(4, 48, 68, 0.08);
}

.wrs-return-address {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(4, 48, 68, 0.1);
}

.wrs-return-address h5 {
    margin: 0 0 8px 0;
    color: #043044;
    font-weight: 600;
}

.wrs-return-address address {
    font-style: normal;
    line-height: 1.6;
    color: #2c3e50;
}

/* ===================================
   ERROR STATE
   =================================== */
.wrs-error {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(4, 48, 68, 0.08);
}

.wrs-error h3 {
    color: #dc3545;
    margin-bottom: 15px;
    font-weight: 600;
}

.wrs-error p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .wrs-return-form-container {
        padding: 20px 10px;
    }
    
    .wrs-form {
        padding: 24px;
    }
    
    .wrs-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .wrs-item-details {
        flex-direction: column;
        text-align: center;
    }
    
    .wrs-item-image {
        align-self: center;
    }
    
    .wrs-photo-preview {
        justify-content: center;
    }
    
    .wrs-button,
    .wrs-button-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wrs-return-form-container h2 {
        font-size: 24px;
    }
    
    .wrs-form {
        padding: 20px;
    }
    
    .wrs-photo-item {
        width: 100px;
    }
    
    .wrs-photo-item img {
        width: 100px;
        height: 100px;
    }
}

/* ===================================
   HAT RESIZER SUGGESTION
   =================================== */

.wrs-suggestion {
    margin: 20px 0;
    animation: wrs-slideDown 0.3s ease-out;
}

.wrs-suggestion-box {
    background: #FFF9E6;
    border-left: 4px solid #F39C12;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(4, 48, 68, 0.08);
}

.wrs-suggestion-box h5 {
    color: #AD6800;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wrs-suggestion-icon {
    font-size: 24px;
}

.wrs-suggestion-box p {
    color: #7D4E00;
    margin: 0 0 20px 0;
    line-height: 1.7;
}

.wrs-suggestion-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 !important;
}

.wrs-resizer-button {
    background: #4caf50;
    color: white !important;
    text-decoration: none !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

.wrs-resizer-button:hover {
    background: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    color: white !important;
    text-decoration: none !important;
}

.wrs-resizer-button:active {
    transform: translateY(0);
}

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

/* Responsive for Suggestion */
@media (max-width: 768px) {
    .wrs-suggestion-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wrs-resizer-button,
    .wrs-button-secondary {
        width: 100%;
        margin-bottom: 10px;
    }
}
