/**
 * PainQuestions Engine Frontend Styles
 * Styles for EEAT components: author box, medical disclaimer, quick facts, etc.
 */

/* ==========================================================================
   Author Box
   ========================================================================== */
.pq-author-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pq-author-box__header {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.pq-author-box__content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.pq-author-box__avatar-wrap {
    flex-shrink: 0;
}

.pq-author-box__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pq-author-box__info {
    flex: 1;
    min-width: 0;
}

.pq-author-box__name {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.pq-author-box__title {
    font-size: 14px;
    color: #0369a1;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.pq-author-box__meta {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px 0;
}

.pq-author-box__bio {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 12px 0;
}

.pq-author-box__links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pq-author-box__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #0369a1;
    text-decoration: none;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pq-author-box__link:hover {
    background: #0369a1;
    color: #fff;
    border-color: #0369a1;
}

.pq-author-box__link svg {
    width: 14px;
    height: 14px;
}

.pq-author-box__footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.pq-author-box__date {
    font-size: 12px;
    color: #64748b;
}

/* ==========================================================================
   Medical Reviewer
   ========================================================================== */
.pq-reviewer {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.pq-reviewer__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #047857;
    margin-bottom: 12px;
}

.pq-reviewer__header svg {
    color: #10b981;
}

.pq-reviewer__content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pq-reviewer__avatar-wrap {
    flex-shrink: 0;
}

.pq-reviewer__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.pq-reviewer__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pq-reviewer__name {
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
}

.pq-reviewer__title {
    font-size: 12px;
    color: #047857;
}

.pq-reviewer__date {
    font-size: 11px;
    color: #059669;
}

/* ==========================================================================
   Medical Disclaimer
   ========================================================================== */
.pq-medical-disclaimer {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 32px 0;
}

.pq-medical-disclaimer__header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 12px;
}

.pq-medical-disclaimer__header svg {
    width: 22px;
    height: 22px;
    color: #d97706;
}

.pq-medical-disclaimer p {
    font-size: 14px;
    line-height: 1.6;
    color: #78350f;
    margin: 0 0 10px 0;
}

.pq-medical-disclaimer p:last-child {
    margin-bottom: 0;
}

.pq-medical-disclaimer strong {
    color: #92400e;
}

/* ==========================================================================
   Quick Facts Box
   ========================================================================== */
.pq-quick-facts {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
}

.pq-quick-facts__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 16px;
}

.pq-quick-facts__title svg {
    width: 22px;
    height: 22px;
    color: #3b82f6;
}

.pq-quick-facts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.pq-quick-facts__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pq-quick-facts__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #3b82f6;
}

.pq-quick-facts__value {
    font-size: 14px;
    font-weight: 500;
    color: #1e3a8a;
}

/* ==========================================================================
   Emergency Box
   ========================================================================== */
.pq-emergency-box {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
}

.pq-emergency-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 12px;
}

.pq-emergency-box__header svg {
    width: 24px;
    height: 24px;
    color: #dc2626;
}

.pq-emergency-box ul {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.pq-emergency-box li {
    font-size: 14px;
    color: #7f1d1d;
    margin-bottom: 6px;
    line-height: 1.5;
}

.pq-emergency-box__cta {
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
    margin: 0;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
}

/* ==========================================================================
   Treatment Table
   ========================================================================== */
.pq-treatment-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pq-treatment-table thead {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
}

.pq-treatment-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pq-treatment-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.pq-treatment-table tbody tr:last-child td {
    border-bottom: none;
}

.pq-treatment-table tbody tr:hover {
    background: #f8fafc;
}

/* ==========================================================================
   References
   ========================================================================== */
.pq-references {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
}

.pq-references__title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.pq-references__intro {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.pq-references__list {
    margin: 0;
    padding-left: 24px;
    list-style-type: decimal;
}

.pq-references__list li {
    font-size: 13px;
    color: #475569;
    margin-bottom: 10px;
    line-height: 1.6;
    padding-left: 8px;
}

.pq-references__list li:target {
    background: #fef3c7;
    padding: 8px;
    margin-left: -8px;
    border-radius: 4px;
}

.pq-reference-text {
    display: inline;
}

.pq-reference-link {
    color: #0369a1;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.pq-reference-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Citations (Superscript Links)
   ========================================================================== */
.pq-citation {
    font-size: 11px;
    line-height: 0;
    position: relative;
    vertical-align: super;
}

.pq-citation a {
    color: #0369a1;
    text-decoration: none;
    background: #e0f2fe;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pq-citation a:hover {
    background: #0369a1;
    color: #fff;
}

/* ==========================================================================
   Table Wrapper (for responsive tables)
   ========================================================================== */
.pq-table-wrapper {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pq-table-wrapper .pq-treatment-table {
    margin: 0;
    box-shadow: none;
}

/* ==========================================================================
   Emergency Box Content
   ========================================================================== */
.pq-emergency-box__content {
    margin-bottom: 16px;
}

.pq-emergency-box__content ul {
    margin: 0;
    padding-left: 24px;
}

.pq-emergency-box__content li {
    font-size: 14px;
    color: #7f1d1d;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
    .pq-author-box__content {
        flex-direction: column;
        text-align: center;
    }
    
    .pq-author-box__avatar {
        width: 80px;
        height: 80px;
    }
    
    .pq-author-box__links {
        justify-content: center;
    }
    
    .pq-reviewer__content {
        flex-direction: column;
        text-align: center;
    }
    
    .pq-quick-facts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
