/* citation-finder-tab.css — styles for the "מצא מקור" tab in advisor panel */

/* Hide floating left-side elements when advisor panel is open
   (advisor FAB + email button collide with the panel which sits at left:0 width:520) */
body:has(.advisor-panel.open) .advisor-fab,
body:has(.advisor-panel.open) #sem-result-email-btn,
body:has(.advisor-panel.open) #sem-result-email-toast {
    display: none !important;
}


/* Tab bar */
.cf-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}
.cf-tabs .cf-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cf-tabs .cf-tab:hover {
    background: #f1f5f9;
}
.cf-tabs .cf-tab.active {
    color: #1B3A5F;
    border-bottom-color: #3FA39B;
    background: #fff;
}

/* Tab contents */
.cf-tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}
.cf-tab-content.active {
    display: flex;
}
.cf-tab-citation {
    padding: 14px 16px 16px;
    overflow-y: auto;
}

/* Warning banner */
.cf-warning {
    background: #FFF3CD;
    border: 1px solid #FFCB2F;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.6;
    color: #664D03;
    margin-bottom: 14px;
}
.cf-warning b {
    color: #1B3A5F;
}

.cf-attribution {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 12px;
}
.cf-attribution a {
    color: #475569;
    text-decoration: none;
    border-bottom: 1px dotted #94a3b8;
}
.cf-attribution a:hover { color: #1B3A5F; }

/* Form */
.cf-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1B3A5F;
}
.cf-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    direction: rtl;
}
.cf-textarea:focus {
    outline: none;
    border-color: #3FA39B;
}
.cf-search-btn {
    margin-top: 10px;
    width: 100%;
    background: #3FA39B;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.cf-search-btn:hover { background: #2f8a83; }
.cf-search-btn:disabled { background: #94a3b8; cursor: not-allowed; }

/* Status */
.cf-status {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    min-height: 18px;
}
.cf-status.loading { color: #475569; display: flex; align-items: center; gap: 8px; }
.cf-status.success { color: #059669; }
.cf-status.error { color: #dc2626; }
.cf-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid #cbd5e0;
    border-top-color: #3FA39B;
    border-radius: 50%;
    animation: cf-spin 0.7s linear infinite;
}
@keyframes cf-spin { to { transform: rotate(360deg); } }

/* Result cards */
.cf-results { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.cf-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.cf-card-head {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 6px;
}
.cf-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1B3A5F;
    line-height: 1.5;
    margin-bottom: 4px;
}
.cf-card-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}
.cf-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cf-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
}
.cf-badge-existing { background: #DBEAFE; color: #1E40AF; }
.cf-badge-in-chapter { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.cf-badge-new      { background: #DCFCE7; color: #166534; }
.cf-badge-pdf      { background: #FEF3C7; color: #92400E; }
.cf-badge-pdf:hover{ background: #FDE68A; }
.cf-badge-doi      { background: #E0E7FF; color: #3730A3; }
.cf-badge-doi:hover{ background: #C7D2FE; }
.cf-badge-none     { background: #F1F5F9; color: #64748B; }
.cf-badge-score-hi { background: #DCFCE7; color: #166534; }
.cf-badge-score-mid{ background: #FEF3C7; color: #92400E; }
.cf-badge-score-lo { background: #FEE2E2; color: #991B1B; }

/* Citation lines */
.cf-cite {
    background: #F8FAFC;
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.cf-cite-label {
    font-weight: 700;
    color: #1B3A5F;
    flex-shrink: 0;
}
.cf-cite-text {
    flex: 1;
    color: #1a202c;
    word-break: break-word;
    direction: ltr;
    text-align: left;
}
.cf-copy {
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    color: #1B3A5F;
    flex-shrink: 0;
}
.cf-copy:hover { background: #f1f5f9; }
