/**
 * Enhanced Author Archive - Base Styles
 * Path: assets/css/eaa-styles.css
 * Common styles for both template modes
 */

/* ==========================================================================
   Loading States
   ========================================================================== */

.eaa-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.eaa-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #333;
    animation: eaa-spin 0.8s linear infinite;
}

@keyframes eaa-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading text */
.eaa-loading-text {
    margin-left: 10px;
    font-size: 14px;
}

/* ==========================================================================
   End Message
   ========================================================================== */

.eaa-end-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.eaa-icon-check::before {
    content: "✓";
    margin-right: 5px;
    color: #46b450;
}

/* ==========================================================================
   Error Messages
   ========================================================================== */

.eaa-error-message {
    text-align: center;
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* ==========================================================================
   Load More Button
   ========================================================================== */

.eaa-load-more-wrapper {
    text-align: center;
    margin: 30px 0;
}

.eaa-load-more-btn {
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.eaa-load-more-btn:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.eaa-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.eaa-load-more-btn.loading {
    opacity: 0.7;
}

/* ==========================================================================
   Post Meta (Reviewers)
   ========================================================================== */

.eaa-reviewer {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
}

.eaa-reviewer img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 5px;
    object-fit: cover;
}

.eaa-reviewer a {
    text-decoration: none;
    color: inherit;
}

.eaa-reviewer a:hover {
    text-decoration: underline;
}

.eaa-post-reviewers {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

/* Hide on mobile */
@media (max-width: 768px) {
    .eaa-hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .eaa-hide-desktop {
        display: none !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.eaa-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to content link */
.eaa-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100000;
}

.eaa-skip-link:focus {
    top: 0;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .eaa-load-more-wrapper,
    .eaa-loading,
    .eaa-social-links {
        display: none !important;
    }
}

/* ==========================================================================
   Transitions
   ========================================================================== */

.eaa-post-item {
    opacity: 0;
    animation: eaa-fadeIn 0.5s ease forwards;
}

@keyframes eaa-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple items */
.eaa-post-item:nth-child(1) { animation-delay: 0.1s; }
.eaa-post-item:nth-child(2) { animation-delay: 0.2s; }
.eaa-post-item:nth-child(3) { animation-delay: 0.3s; }
.eaa-post-item:nth-child(4) { animation-delay: 0.4s; }
.eaa-post-item:nth-child(5) { animation-delay: 0.5s; }

/* ==========================================================================
   Dark Mode Support (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .eaa-loading,
    .eaa-end-message {
        color: #ccc;
    }
    
    .eaa-spinner {
        border-color: rgba(255, 255, 255, 0.1);
        border-top-color: #fff;
    }
    
    .eaa-load-more-btn {
        background: #1a73e8;
    }
    
    .eaa-load-more-btn:hover {
        background: #1557b0;
    }
}