/**
 * APW Referral Export Admin Styles
 * 
 * Styles for the referral export admin interface
 * Provides clean, WordPress-compatible admin styling
 *
 * @package APW_Woo_Plugin
 * @since 1.18.0
 */

/* Export statistics boxes */
.apw-export-stats {
    margin: 20px 0;
}

.apw-stat-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-left: 4px solid #0073aa;
    padding: 20px;
    display: inline-block;
    min-width: 200px;
    text-align: center;
    margin-right: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.apw-stat-box h3 {
    font-size: 2.5em;
    margin: 0;
    color: #0073aa;
    font-weight: 600;
}

.apw-stat-box p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Export options section */
.apw-export-options {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.apw-export-options h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Filter options */
.filter-option {
    transition: all 0.3s ease;
}

.filter-option.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Date inputs styling */
#start_date,
#end_date {
    margin-right: 10px;
}

/* Recent exports table */
.apw-recent-exports {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.apw-recent-exports h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.apw-recent-exports table {
    margin-top: 15px;
}

.apw-recent-exports .button {
    padding: 4px 8px;
    font-size: 12px;
}

/* Loading indicator */
.apw-loading {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-left: 4px solid #00a0d2;
}

.apw-loading .spinner {
    float: none;
    margin: 0 10px 0 0;
}

/* Form error styling */
.form-error {
    animation: slideIn 0.3s ease;
}

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

/* Export button enhancements */
.button.export-button {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    font-weight: 600;
    padding: 8px 16px;
    font-size: 14px;
}

.button.export-button:hover {
    background: #005a87;
    border-color: #005a87;
}

.button.export-button:disabled {
    background: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* Users list page enhancements */
.tablenav .actions .button {
    margin-left: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .apw-stat-box {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
        width: 100%;
    }
    
    .apw-export-options,
    .apw-recent-exports {
        padding: 15px;
    }
    
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .form-table th {
        font-weight: 600;
    }
    
    #start_date,
    #end_date {
        display: block;
        margin: 5px 0;
        width: 100%;
    }
}

/* Success/error message styling */
.notice.notice-success.export-success {
    border-left-color: #46b450;
}

.notice.notice-error.export-error {
    border-left-color: #dc3232;
}

/* Progress indicator for large exports */
.export-progress {
    background: #f1f1f1;
    border-radius: 10px;
    padding: 3px;
    margin: 10px 0;
}

.export-progress-bar {
    background: #0073aa;
    height: 20px;
    border-radius: 8px;
    transition: width 0.3s ease;
}

.export-progress-text {
    text-align: center;
    font-size: 12px;
    margin-top: 5px;
    color: #666;
}

/* Download link styling */
.download-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #0073aa;
    font-weight: 600;
}

.download-link:hover {
    color: #005a87;
}

.download-link::before {
    content: "⬇";
    margin-right: 5px;
    font-size: 16px;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
input:focus,
select:focus,
button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .apw-stat-box {
        border-width: 2px;
    }
    
    .button.export-button {
        border-width: 2px;
    }
}