/**
 * Frontend styles for TahlilGar AI plugin
 */

/* Frontend styles for TahlilGar AI plugin */

/* Main Analysis Box - All styles are now scoped to this class */
.expert-analysis-box {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-right: 4px solid #0073aa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    padding: 20px;
    font-family: inherit !important; /* follow site body font and override any previous font */
    direction: rtl;
    text-align: right;
}

/* Force all descendants to follow body font (override theme/component rules) */
.expert-analysis-box, .expert-analysis-box *,
.expert-analysis-box p, .expert-analysis-box li, .expert-analysis-box a,
.expert-analysis-box span, .expert-analysis-box strong, .expert-analysis-box em,
.expert-analysis-box blockquote, .expert-analysis-box h1, .expert-analysis-box h2,
.expert-analysis-box h3, .expert-analysis-box h4, .expert-analysis-box h5,
.expert-analysis-box h6 {
    font-family: inherit !important;
}

/* Background Image */
.expert-analysis-box .analysis-background-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    display: block;
}

/* Analyst Profile Section */
.expert-analysis-box .analyst-profile {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.expert-analysis-box .analyst-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 15px;
    border: 2px solid #f0f0f0;
}

.expert-analysis-box .analyst-info {
    flex: 1;
}

.expert-analysis-box .analysis-box-title {
    margin: 0 0 15px 0;
    font-weight: 700;
}

/* Analysis Content - All child elements are now scoped */
.expert-analysis-box .analysis-content,
.expert-analysis-box .analysis-content * {
    font-family: inherit;
}

.expert-analysis-box .analysis-content {
    line-height: 1.9;
    color: #333;
    margin-bottom: 20px;
}

.expert-analysis-box .analysis-content h1,
.expert-analysis-box .analysis-content h2,
.expert-analysis-box .analysis-content h3,
.expert-analysis-box .analysis-content h4,
.expert-analysis-box .analysis-content h5,
.expert-analysis-box .analysis-content h6 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
    font-family: inherit;
}

.expert-analysis-box .analysis-content p {
    margin-bottom: 15px;
}

.expert-analysis-box .analysis-content ul,
.expert-analysis-box .analysis-content ol {
    margin-bottom: 15px;
    padding-right: 20px;
}

.expert-analysis-box .analysis-content li {
    margin-bottom: 6px;
}

/* Social Links */
.expert-analysis-box .social-links {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.expert-analysis-box .social-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.expert-analysis-box .social-link:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.expert-analysis-box .social-link.telegram:hover {
    background: #0088cc;
    color: white;
    border-color: #0088cc;
}

.expert-analysis-box .social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: transparent;
}

.expert-analysis-box .social-link.linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

/* Analyst Signature */
.expert-analysis-box .analyst-signature {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-style: italic;
    color: #666;
    text-align: center;
}

/* CTA Button */
.expert-analysis-box .cta-section {
    text-align: center;
    margin-top: 20px;
}

.expert-analysis-box .cta-button {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.expert-analysis-box .cta-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

/* Biography Modal - unchanged */
.biography-modal { display: none; position: fixed; z-index: 1000; left:0; top:0; width:100%; height:100%; background-color: rgba(0,0,0,0.5); font-family: inherit; direction: rtl; }
.biography-modal-content { background:#fefefe; margin:5% auto; padding:20px; border-radius:8px; width:80%; max-width:600px; max-height:80vh; overflow-y:auto; position:relative; text-align:right; }
.biography-modal-close { color:#aaa; float:left; font-size:28px; font-weight:bold; cursor:pointer; position:absolute; top:10px; left:15px; }
.biography-modal-close:hover,.biography-modal-close:focus{ color:#000; text-decoration:none; }

/* Responsive Design */
@media (max-width: 768px) {
    .expert-analysis-box {
        margin: 10px 0;
        padding: 15px;
    }
    
    .expert-analysis-box .analyst-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .expert-analysis-box .analyst-avatar {
        margin-left: 0;
        margin-bottom: 10px;
    }
    
    .expert-analysis-box .social-links {
        justify-content: center;
    }
    
    .biography-modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Print Styles */
@media print {
    .expert-analysis-box {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .expert-analysis-box .social-links,
    .expert-analysis-box .cta-section {
        display: none;
    }
}
