/**
 * Author E-E-A-T Styles
 * 
 * Styles for author boxes, tooltips, and E-E-A-T display elements.
 */

/* ========================================
   Author Box
   ======================================== */

.pdm-author-box {
    background: var(--wp--preset--color--tertiary);
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
}

.pdm-author-box-inner {
    max-width: 100%;
}

.pdm-author-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.pdm-author-avatar {
    flex-shrink: 0;
}

.pdm-author-avatar img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid var(--wp--preset--color--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdm-author-info {
    flex-grow: 1;
}

.pdm-author-name {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.pdm-author-name a {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
    transition: color 0.3s ease;
}

.pdm-author-name a:hover {
    color: var(--wp--preset--color--primary);
}

.pdm-author-title {
    margin: 0;
    font-size: 16px;
    color: var(--wp--preset--color--contrast);
    opacity: 0.7;
    font-style: italic;
}

.pdm-author-bio {
    margin: 20px 0;
    color: var(--wp--preset--color--contrast);
    line-height: 1.7;
    font-size: 15px;
}

.pdm-author-bio p:last-child {
    margin-bottom: 0;
}

.pdm-author-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 0 0;
    padding: 20px 0 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.pdm-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pdm-social-link svg {
    width: 20px;
    height: 20px;
    fill: var(--wp--preset--color--contrast);
    transition: fill 0.3s ease;
}

.pdm-social-link:hover {
    background: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pdm-social-link:hover svg {
    fill: #fff;
}

.pdm-author-link {
    margin-top: 20px;
}

.pdm-view-all-posts {
    display: inline-block;
    padding: 12px 24px;
    background: var(--wp--preset--color--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pdm-view-all-posts:hover {
    background: var(--wp--preset--color--secondary);
    transform: translateX(5px);
}

/* ========================================
   Author Tooltip (Hover Effect)
   ======================================== */

.pdm-author-tooltip-inline {
    text-align: left;
    margin: 15px 0;
}

.pdm-author-tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.pdm-author-trigger {
    cursor: pointer;
    color: var(--wp--preset--color--primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.pdm-author-trigger:hover {
    color: var(--wp--preset--color--secondary);
}

.pdm-author-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--wp--preset--color--base);
    border-radius: 8px;
    padding: 20px;
    width: 320px;
    max-width: 90vw;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.pdm-author-tooltip-wrapper:hover .pdm-author-tooltip,
.pdm-author-tooltip:hover {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 15px);
    pointer-events: auto;
}

/* Tooltip arrow */
.pdm-author-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--wp--preset--color--base);
}

.pdm-author-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: var(--wp--preset--color--base);
    margin-top: 1px;
}

.pdm-tooltip-avatar {
    text-align: center;
    margin-bottom: 15px;
}

.pdm-tooltip-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid var(--wp--preset--color--primary);
}

.pdm-tooltip-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    text-align: center;
    color: var(--wp--preset--color--contrast);
}

.pdm-tooltip-content p {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--wp--preset--color--contrast);
    opacity: 0.8;
    text-align: center;
}

.pdm-tooltip-link {
    display: block;
    text-align: center;
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.pdm-tooltip-link:hover {
    color: var(--wp--preset--color--secondary);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .pdm-author-box {
        padding: 20px;
        margin: 30px 0;
    }

    .pdm-author-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .pdm-author-avatar img {
        width: 80px;
        height: 80px;
    }

    .pdm-author-name {
        font-size: 20px;
    }

    .pdm-author-title {
        font-size: 14px;
    }

    .pdm-author-bio {
        font-size: 14px;
    }

    .pdm-author-social {
        justify-content: center;
        gap: 10px;
    }

    .pdm-social-link {
        width: 40px;
        height: 40px;
    }

    .pdm-social-link svg {
        width: 18px;
        height: 18px;
    }

    .pdm-author-link {
        text-align: center;
    }

    .pdm-view-all-posts {
        display: block;
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Tooltip positioning on mobile */
    .pdm-author-tooltip {
        width: 280px;
        padding: 15px;
    }

    .pdm-tooltip-avatar img {
        width: 60px;
        height: 60px;
    }

    .pdm-tooltip-content h4 {
        font-size: 16px;
    }

    .pdm-tooltip-content p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .pdm-author-box {
        padding: 15px;
        margin: 20px 0;
    }

    .pdm-author-avatar img {
        width: 70px;
        height: 70px;
    }

    .pdm-author-name {
        font-size: 18px;
    }

    .pdm-author-social {
        flex-direction: row;
        justify-content: center;
    }

    .pdm-social-link {
        width: 38px;
        height: 38px;
    }

    .pdm-social-link svg {
        width: 16px;
        height: 16px;
    }
}

