/**
 * ThemeRuby Multi Authors - Frontend Styles
 *
 * Styles for the author box and other frontend elements.
 *
 * @package ThemeRuby_Multi_Authors
 * @since   1.0.0
 */

/* ============================================================================
   AUTHOR BOX
   ========================================================================= */

.tma-author-box {
    display: flex;
    flex-flow: column nowrap;
    gap: 15px;
    width: 100%;
    margin: 0 0 1.5em;
    padding: 10px 20px;
    border: 1px solid #8883;
    border-radius: 5px;
}

.tma-author-box-title {
    padding-bottom: 7px;
    display: flex;
    line-height: 1;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid #8883;
}

.tma-author-box-title svg {
    width: 22px;
}

.tma-author-box-title span {
    font-size: .9rem;
    font-weight: 600;
}

.tma-author-box-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e1e1e;
}

.tma-author-box-authors {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tma-author-box-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tma-author-avatar {
    flex-shrink: 0;
    padding-top: 5px;
}

.tma-author-avatar img {
    border-radius: 50%;
    max-width: 60px;
    width: 100%;
}

.tma-author-info {
    flex: 1;
}

.tma-author-name {
    margin: 0 0 5px 0;
    font-size: max(13px, .8rem);
    font-weight: 600;
    line-height: 1.3;
}

.tma-author-name a {
    text-transform: capitalize;
    text-decoration: none !important;
    color: inherit;
}

.tma-author-bio {
    font-size: min(.8rem, 13px);
    line-height: 1.7;
    opacity: .7;
}

.tma-author-bio p {
    margin: 0 0 10px 0;
}

.tma-author-bio p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Shortcode Styles
   ========================================================================== */
a.tma-author-link {
    text-decoration: none;
    font-weight: 600;
}

.tma-author-link:hover {
    text-decoration: underline;
}

.tma-author-name {
    font-weight: 600;
}

.tma-author-count {
    display: inline-block;
    font-weight: 600;
    color: inherit;
}

/** author list */
.tma-author-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tma-author-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #8883;
}

.tma-author-list-item:last-child {
    border-bottom: none;
}

.tma-author-list-avatar {
    flex-shrink: 0;
}

.tma-author-list-avatar img {
    border-radius: 100%;
}

.tma-author-post-count {
    color: #aaa;
    font-size: .8rem;
    margin-left: auto;
}

/* Author Avatars Shortcode */
.tma-author-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tma-author-avatar-item {
    display: inline-block;
}

.tma-author-avatar-item img {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tma-author-avatar-item a:hover img {
    transform: scale(1.1);
}

.tma-author-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tma-author-avatar-item {
    display: inline-flex;
    flex-shrink: 0;
}

.tma-avatar-link {
    display: block;
    line-height: 0;
    border-radius: 100%;
    overflow: hidden;
    transition: opacity .2s;
}

.tma-avatar-link:hover {
    opacity: .8;
}

.tma-author-avatars img {
    border-radius: 100%;
    display: block;
}

/* Author List Shortcode */
.tma-author-list-avatar {
    flex-shrink: 0;
}

.tma-author-list-avatar img {
    border-radius: 50%;
    vertical-align: middle;
}

.tma-author-list-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

/* Author Count Shortcode */
.tma-author-count {
    display: inline-block;
    padding: 4px 12px;
    background: #f6f8fa;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* Shortcode Author Box */
.tma-shortcode-box {
    margin: 30px 0;
}

.tma-shortcode-box .tma-author-box-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* Author Link in Shortcodes */
.tma-author-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.tma-author-link:hover {
    color: #0073aa;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tma-author-avatars {
        gap: 5px;
    }

    .tma-author-list-item {
        flex-wrap: wrap;
    }

    .tma-author-post-count {
        margin-left: 0;
        width: 100%;
        margin-top: 5px;
    }
}
