/* ============================================
   WanAutomation — Author Box (Frontend)
   Displayed at the bottom of single post content
   ============================================ */

.wanaut-author-box {
    margin: 40px 0 20px;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Thai', sans-serif;
}

/* Header label */
.wanaut-author-box-header {
    background: linear-gradient(135deg, #b71c1c 0%, #e53935 100%);
    padding: 12px 24px;
}

.wanaut-author-box-label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Body */
.wanaut-author-box-body {
    display: flex;
    gap: 20px;
    padding: 24px;
    align-items: flex-start;
}

/* Avatar */
.wanaut-author-box-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.wanaut-author-box-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e53935;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wanaut-author-box-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.3);
}

.wanaut-author-box-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5, #e5e7eb);
    color: #9ca3af;
}

/* Gender badge */
.wanaut-author-box-gender {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.wanaut-author-box-gender.male {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.wanaut-author-box-gender.female {
    background: linear-gradient(135deg, #e91e63, #c2185b);
}

/* Info section */
.wanaut-author-box-info {
    flex: 1;
    min-width: 0;
}

.wanaut-author-box-name {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: #1a1a2e;
}

.wanaut-author-box-name a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wanaut-author-box-name a:hover {
    color: #e53935;
}

.wanaut-author-box-penname {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #e53935;
    letter-spacing: 0.3px;
}

.wanaut-author-box-bio {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #6b7280;
}

/* "View all posts" link */
.wanaut-author-box-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #e53935;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(229, 57, 53, 0.08);
    transition: all 0.2s ease;
}

.wanaut-author-box-link:hover {
    background: #e53935;
    color: #fff;
    transform: translateX(4px);
}

/* ============================================
   Dark mode support
   ============================================ */
@media (prefers-color-scheme: dark) {
    .wanaut-author-box {
        background: #1f2937;
        border-color: #374151;
    }

    .wanaut-author-box-name,
    .wanaut-author-box-name a {
        color: #f3f4f6;
    }

    .wanaut-author-box-bio {
        color: #9ca3af;
    }

    .wanaut-author-box-gender {
        border-color: #1f2937;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
    .wanaut-author-box-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
    }

    .wanaut-author-box-avatar {
        width: 80px;
        height: 80px;
    }

    .wanaut-author-box-name {
        font-size: 18px;
    }

    .wanaut-author-box-bio {
        font-size: 13px;
    }
}