/* WritingLaw Author Box - Frontend Styles */

:root {
    --wl-primary: #008080;
    --wl-primary-dark: #006666;
    --wl-primary-light: #00a3a3;
    --wl-text-primary: #1f2937;
    --wl-text-secondary: #6b7280;
    --wl-text-light: #9ca3af;
    --wl-border: #e5e7eb;
    --wl-bg-light: #f9fafb;
    --wl-bg-lighter: #f3f4f6;
    --wl-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --wl-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --wl-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --wl-radius: 8px;
    --wl-radius-lg: 12px;
    --wl-transition: all 0.3s ease;
}

/* Container */
.wl-author-boxes-container {
    margin: 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* Container query for responsive design */
    container-type: inline-size;
}

/* Author Box Base */
.wl-author-box {
    background: white;
    border: 1px solid var(--wl-border);
    border-radius: var(--wl-radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 24px;
    align-items: flex-start;
    box-shadow: var(--wl-shadow);
    transition: var(--wl-transition);
    /* Performance: prevent layout recalculation */
    contain: layout style paint;
    /* Smooth GPU acceleration for hover state */
    will-change: box-shadow, border-color;
}

.wl-author-box:hover {
    box-shadow: var(--wl-shadow-lg);
    border-color: var(--wl-primary-light);
}

/* Profile Image */
.wl-author-box-profile {
    display: flex;
    justify-content: center;
}

.wl-author-box-image-link {
    display: inline-block;
    border-radius: 50%;
    overflow: hidden;
    width: 100px;
    height: 100px;
    transition: var(--wl-transition);
    flex-shrink: 0;
    /* Default style is ring */
    border: 3px solid var(--wl-primary);
}

.wl-author-box-image-link:hover {
    transform: scale(1.05);
}

/* Image Style Variations */
.wl-img-style-ring {
    border: 3px solid var(--wl-primary);
}

.wl-img-style-ring:hover {
    border-color: var(--wl-primary-dark);
}

.wl-img-style-shadow {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wl-img-style-shadow:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.wl-img-style-none {
    border: none !important;
    box-shadow: none;
}

.wl-author-box-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Performance optimization */
    contain: content;
    /* Prevent layout shift */
    aspect-ratio: 1 / 1;
}

/* Content Section */
.wl-author-box-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.wl-author-box-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--wl-primary);
    margin: 0;
}

.wl-author-box-header {
    margin-bottom: 8px;
}

.wl-author-box-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--wl-text-primary);
}

.wl-author-box-name a {
    color: var(--wl-text-primary);
    text-decoration: none;
    transition: color var(--wl-transition);
    border-bottom: 2px solid transparent;
    transition: var(--wl-transition);
}

.wl-author-box-name a:hover {
    color: var(--wl-primary);
    border-bottom-color: var(--wl-primary);
}

.wl-author-box-title {
    margin: 4px 0 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--wl-primary);
    text-transform: capitalize;
}

.wl-author-box-bio {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--wl-text-secondary);
    flex: 1;
}

/* Social Links */
.wl-author-box-social {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.wl-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--wl-bg-light);
    border: 1px solid var(--wl-border);
    border-radius: 50%;
    color: var(--wl-text-secondary);
    text-decoration: none;
    transition: var(--wl-transition);
    font-size: 16px;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}

.wl-social-link i {
    font-style: normal;
    font-weight: normal;
}

.wl-social-link:hover {
    background: var(--wl-primary);
    border-color: var(--wl-primary);
    color: white;
    transform: translateY(-2px);
}

/* Elegant Theme */
.wl-author-box.elegant-theme {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

.wl-author-box.elegant-theme:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wl-author-box {
        grid-template-columns: 80px 1fr;
        gap: 16px;
        padding: 20px;
        margin-bottom: 16px;
    }

    .wl-author-box-image-link {
        width: 80px;
        height: 80px;
        border-width: 2px;
    }

    .wl-author-box-name {
        font-size: 16px;
    }

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

@media (max-width: 480px) {
    .wl-author-box {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .wl-author-box-profile {
        display: flex;
        justify-content: center;
        margin-bottom: 8px;
    }

    .wl-author-box-image-link {
        width: 70px;
        height: 70px;
    }

    .wl-author-box-header {
        text-align: center;
    }

    .wl-author-box-name {
        font-size: 15px;
    }

    .wl-author-box-title {
        text-align: center;
    }

    .wl-author-box-label {
        font-size: 11px;
    }

    .wl-author-box-social {
        gap: 8px;
    }

    .wl-social-link {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .wl-author-box,
    .wl-author-box-image-link,
    .wl-author-box-name a,
    .wl-social-link {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --wl-text-primary: #f3f4f6;
        --wl-text-secondary: #d1d5db;
        --wl-text-light: #9ca3af;
        --wl-border: #374151;
        --wl-bg-light: #1f2937;
        --wl-bg-lighter: #111827;
    }

    .wl-author-box {
        background: #1f2937;
        border-color: var(--wl-border);
    }

    .wl-author-box.elegant-theme {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }

    .wl-social-link {
        background: #111827;
        border-color: var(--wl-border);
    }
}

/* Print styles */
@media print {
    .wl-author-boxes-container {
        break-inside: avoid;
    }

    .wl-social-link {
        display: none;
    }
}
