/* 
 * WooCommerce Return System v2.0 - Clean Modern Design
 * Brand Colors: #043044 (Primary), #215A74 (Secondary), #FFF5E7 (Accent)
 * Design Philosophy: Minimalist, Clean, Elegant
 * 
 * @author Absardotdev <absardotdev@gmail.com>
 */

/* ===================================
   CSS VARIABLES - BRAND IDENTITY
   =================================== */
:root {
    --wrs-primary: #043044;
    --wrs-secondary: #215A74;
    --wrs-accent: #FFF5E7;
    --wrs-accent-dark: #F5E8D0;
    --wrs-primary-light: rgba(4, 48, 68, 0.05);
    --wrs-primary-medium: rgba(4, 48, 68, 0.1);
    --wrs-secondary-light: rgba(33, 90, 116, 0.05);
    --wrs-success: #28a745;
    --wrs-danger: #dc3545;
    --wrs-text: #2c3e50;
    --wrs-text-light: #6c757d;
    --wrs-shadow-soft: 0 2px 12px rgba(4, 48, 68, 0.08);
    --wrs-shadow-medium: 0 4px 20px rgba(4, 48, 68, 0.12);
    --wrs-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --wrs-radius: 12px;
    --wrs-radius-sm: 8px;
}

/* ===================================
   FORM CONTAINER
   =================================== */
#wrs-return-form {
    max-width: 880px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wrs-text);
}

/* ===================================
   SECTION HEADERS - CLEAN & MINIMAL
   =================================== */
.wrs-form-section h3,
.wrs-form-section h4 {
    background: var(--wrs-primary);
    color: var(--wrs-accent);
    padding: 18px 24px;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--wrs-radius) var(--wrs-radius) 0 0;
}

/* ===================================
   FORM SECTIONS - CARD STYLE
   =================================== */
.wrs-form-section {
    background: white;
    border-radius: var(--wrs-radius);
    margin-bottom: 24px;
    box-shadow: var(--wrs-shadow-soft);
    overflow: hidden;
    transition: var(--wrs-transition);
}

.wrs-form-section:hover {
    box-shadow: var(--wrs-shadow-medium);
}

.wrs-form-section-content {
    padding: 28px;
    background: var(--wrs-accent);
}

/* ===================================
   ORDER SUMMARY - CLEAN CARD
   =================================== */
.wrs-order-summary {
    background: white;
    border-left: 4px solid var(--wrs-secondary);
    border-radius: var(--wrs-radius-sm);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-order-info p {
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--wrs-text);
}

.wrs-order-info strong {
    color: var(--wrs-primary);
    font-weight: 600;
}

/* ===================================
   RETURN FEE - ACCENT HIGHLIGHT
   =================================== */
.wrs-fee-info {
    background: var(--wrs-secondary);
    color: white;
    border-radius: var(--wrs-radius-sm);
    padding: 20px 24px;
    margin: 20px 0;
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-fee-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.wrs-info-icon {
    font-size: 24px;
    color: var(--wrs-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.wrs-fee-text {
    margin: 0;
    line-height: 1.7;
    color: white;
}

.wrs-fee-text strong {
    color: var(--wrs-accent);
    font-weight: 700;
}

.wrs-fee-text small {
    display: block;
    margin-top: 8px;
    opacity: 0.9;
}

/* ===================================
   FORM INPUTS - CLEAN STYLE
   =================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: white;
    border-radius: var(--wrs-radius-sm);
    font-size: 15px;
    transition: var(--wrs-transition);
    color: var(--wrs-text);
    box-shadow: 0 1px 3px rgba(4, 48, 68, 0.08);
}

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

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* ===================================
   ITEM SELECTION - ELEGANT CARDS
   =================================== */
.wrs-return-items {
    display: grid;
    gap: 14px;
}

.wrs-item-row {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: white;
    border-radius: var(--wrs-radius-sm);
    transition: var(--wrs-transition);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(4, 48, 68, 0.08);
}

.wrs-item-row:hover {
    box-shadow: var(--wrs-shadow-soft);
    transform: translateY(-2px);
}

.wrs-item-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 16px;
    cursor: pointer;
    accent-color: var(--wrs-primary);
}

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

.wrs-item-name {
    font-weight: 600;
    color: var(--wrs-primary);
    font-size: 15px;
    margin-bottom: 6px;
}

.wrs-item-meta {
    font-size: 13px;
    color: var(--wrs-text-light);
}

/* ===================================
   QUANTITY SELECTOR - INLINE STYLE
   =================================== */
.wrs-quantity-wrapper {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--wrs-primary-light);
    border-radius: var(--wrs-radius-sm);
    border-left: 3px solid var(--wrs-secondary);
    display: none;
}

.wrs-quantity-wrapper label {
    display: block;
    margin-bottom: 8px;
    color: var(--wrs-primary);
    font-weight: 600;
    font-size: 14px;
}

.wrs-quantity-select {
    width: 100%;
    max-width: 180px;
    padding: 10px 14px;
    border: none;
    border-radius: var(--wrs-radius-sm);
    font-size: 15px;
    background: white;
    color: var(--wrs-text);
    cursor: pointer;
    transition: var(--wrs-transition);
    box-shadow: 0 1px 3px rgba(4, 48, 68, 0.08);
}

.wrs-quantity-select:hover {
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-quantity-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--wrs-primary-medium);
}

/* ===================================
   SUGGESTION BOX - SUBTLE WARNING
   =================================== */
.wrs-suggestion,
.wrs-notice {
    margin: 20px 0;
    animation: slideDown 0.4s ease-out;
}

.wrs-suggestion-box {
    background: #FFF9E6;
    border-left: 4px solid #F39C12;
    border-radius: var(--wrs-radius-sm);
    padding: 20px 24px;
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-suggestion-box h5 {
    margin: 0 0 12px 0;
    color: #AD6800;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.wrs-resizer-link {
    color: var(--wrs-primary) !important;
    text-decoration: none;
    font-weight: 600;
    transition: var(--wrs-transition);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.wrs-resizer-link:hover {
    border-bottom-color: var(--wrs-primary);
}

/* ===================================
   NOTICE BOX - INFO STYLE
   =================================== */
.wrs-notice-box {
    background: var(--wrs-secondary-light);
    border-left: 4px solid var(--wrs-secondary);
    border-radius: var(--wrs-radius-sm);
    padding: 20px 24px;
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-notice-box h5 {
    margin: 0 0 12px 0;
    color: var(--wrs-primary);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wrs-notice-icon {
    font-size: 20px;
}

.wrs-notice-box p {
    margin: 10px 0 0 0;
    color: var(--wrs-text);
    line-height: 1.7;
}

/* ===================================
   PHOTO UPLOAD - CLEAN DROPZONE
   =================================== */
#photo-upload-section {
    transition: var(--wrs-transition);
}

.wrs-photo-upload-area {
    border: 2px dashed var(--wrs-secondary);
    border-radius: var(--wrs-radius-sm);
    padding: 36px;
    text-align: center;
    background: white;
    transition: var(--wrs-transition);
    cursor: pointer;
}

.wrs-photo-upload-area:hover {
    background: var(--wrs-primary-light);
    border-color: var(--wrs-primary);
}

.wrs-photo-upload-area.drag-over {
    background: var(--wrs-accent);
    border-color: var(--wrs-primary);
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-upload-icon {
    font-size: 48px;
    color: var(--wrs-secondary);
    margin-bottom: 16px;
}

.wrs-upload-text {
    color: var(--wrs-text);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.wrs-upload-hint {
    color: var(--wrs-text-light);
    font-size: 13px;
}

#photo-required-indicator,
#photo-optional-indicator {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 10px;
}

#photo-required-indicator {
    background: var(--wrs-danger);
    color: white;
}

#photo-optional-indicator {
    background: var(--wrs-secondary);
    color: white;
}

/* ===================================
   BUTTONS - MODERN & CLEAN
   =================================== */
.wrs-button-primary,
.wrs-button-secondary,
button[type="submit"] {
    display: inline-block;
    padding: 14px 32px;
    margin: 8px 12px 8px 0;
    border: none;
    border-radius: var(--wrs-radius-sm);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--wrs-transition);
    letter-spacing: 0.3px;
}

.wrs-button-primary,
button[type="submit"] {
    background: var(--wrs-primary);
    color: var(--wrs-accent);
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-button-primary:hover,
button[type="submit"]:hover {
    background: var(--wrs-secondary);
    transform: translateY(-2px);
    box-shadow: var(--wrs-shadow-medium);
    color: var(--wrs-accent);
}

.wrs-button-primary:active,
button[type="submit"]:active {
    transform: translateY(0);
}

.wrs-button-secondary {
    background: white;
    color: var(--wrs-primary);
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-button-secondary:hover {
    background: var(--wrs-accent);
    transform: translateY(-2px);
    box-shadow: var(--wrs-shadow-medium);
    color: var(--wrs-primary);
}

/* ===================================
   REQUIRED INDICATOR
   =================================== */
.required {
    color: var(--wrs-danger);
    font-weight: bold;
    margin-left: 3px;
}

/* ===================================
   LOADING SPINNER
   =================================== */
.wrs-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 245, 231, 0.3);
    border-radius: 50%;
    border-top-color: var(--wrs-accent);
    animation: spin 0.8s linear infinite;
}

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

/* ===================================
   MESSAGES - CLEAN ALERTS
   =================================== */
.wrs-message {
    padding: 16px 20px;
    border-radius: var(--wrs-radius-sm);
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.4s ease-out;
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-message.success {
    background: #D4EDDA;
    border-left: 4px solid var(--wrs-success);
    color: #155724;
}

.wrs-message.error {
    background: #F8D7DA;
    border-left: 4px solid var(--wrs-danger);
    color: #721c24;
}

.wrs-message.info {
    background: var(--wrs-secondary-light);
    border-left: 4px solid var(--wrs-secondary);
    color: var(--wrs-primary);
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   ADMIN SETTINGS
   =================================== */
.wrs-test-email {
    background: var(--wrs-accent);
    border-radius: var(--wrs-radius-sm);
    padding: 24px;
    margin-top: 24px;
    box-shadow: var(--wrs-shadow-soft);
}

.wrs-test-email h3 {
    margin-top: 0;
    color: var(--wrs-primary);
    font-weight: 600;
}

.wrs-test-email .button {
    margin-right: 12px;
}

#test-email-result {
    margin-top: 20px;
}

.wrs-test-email .notice {
    margin: 12px 0;
    padding: 12px 18px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .wrs-form-section h3,
    .wrs-form-section h4 {
        font-size: 16px;
        padding: 16px 20px;
    }
    
    .wrs-form-section-content {
        padding: 20px;
    }
    
    .wrs-suggestion-box,
    .wrs-notice-box {
        padding: 18px 20px;
    }
    
    .wrs-button-primary,
    .wrs-button-secondary,
    button[type="submit"] {
        display: block;
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
    
    .wrs-fee-notice {
        gap: 12px;
    }
    
    .wrs-item-row {
        padding: 16px;
    }
    
    .wrs-quantity-select {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    #wrs-return-form {
        padding: 0 8px;
    }
    
    .wrs-order-summary {
        padding: 16px;
    }
    
    .wrs-upload-icon {
        font-size: 40px;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
*:focus-visible {
    outline: 3px solid var(--wrs-secondary);
    outline-offset: 2px;
}

.screen-reader-text {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
