/* AgentsWidget — self-contained styles for the shared "Connect an Agent"
   modal (agents-widget.js). Loaded by both the OSINT Navigator frontend and
   Data Navigator's /data pages; uses var() fallbacks so it renders the same
   on either stylesheet's tokens. */

.aw-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.aw-overlay[hidden] {
    display: none;
}

.aw-card {
    background: var(--bg-card, #ffffff);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 760px;
    width: 100%;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.aw-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--border, rgba(55, 65, 81, 0.12));
}

.aw-header h2 {
    margin: 0;
    color: var(--text, #374151);
    font-size: 18px;
    font-weight: 650;
}

.aw-subtitle {
    margin: 4px 0 0;
    color: var(--text-muted, #6b7280);
    font-size: 13px;
    line-height: 1.45;
}

.aw-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-muted, #6b7280);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.aw-close:hover {
    background: rgba(55, 65, 81, 0.06);
}

.aw-body {
    padding: 16px 24px 22px;
    overflow-y: auto;
}

.agents-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.agent-select-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #6b7280);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.agent-select-wrap {
    position: relative;
    display: inline-flex;
    min-width: 230px;
}

.agent-select-wrap::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--text-muted, #6b7280);
    border-bottom: 1.5px solid var(--text-muted, #6b7280);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.agent-select {
    width: 100%;
    appearance: none;
    padding: 8px 34px 8px 12px;
    color: var(--text, #374151);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, rgba(55, 65, 81, 0.16));
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    line-height: 1.35;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.agent-select:hover {
    border-color: rgba(36, 81, 201, 0.28);
}

.agent-select:focus {
    outline: none;
    border-color: var(--blue, #2451c9);
    box-shadow: 0 0 0 3px rgba(36, 81, 201, 0.1);
}

.agent-setup-card {
    padding: 16px 0 0;
    margin-bottom: 4px;
    border: 1px solid var(--border, rgba(55, 65, 81, 0.12));
    border-radius: 8px;
    background: var(--bg-card, #ffffff);
}

.agent-setup-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 0 16px 10px;
}

.agent-method-badge {
    display: inline-block;
    margin-bottom: 7px;
    padding: 3px 8px;
    color: var(--blue, #2451c9);
    background: rgba(36, 81, 201, 0.08);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.agent-setup-title {
    margin: 0 0 6px;
    color: var(--text, #374151);
    font-size: 17px;
    font-weight: 650;
    text-transform: none;
    letter-spacing: 0;
}

.agent-description,
.agent-verify {
    margin: 0 16px 12px;
    color: var(--text-light, #4b5563);
    font-size: 13px;
    line-height: 1.55;
}

.agent-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    color: var(--blue, #2451c9);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, rgba(55, 65, 81, 0.16));
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.15s ease;
}

.agent-secondary-btn:hover {
    border-color: rgba(36, 81, 201, 0.35);
    background: rgba(36, 81, 201, 0.05);
}

.agent-secondary-btn[hidden] {
    display: none;
}

.agent-warning {
    margin: 0 16px 12px;
    padding: 10px 12px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.45;
}

.agent-steps {
    margin: 0 16px 14px 34px;
    padding: 0;
    color: var(--text-light, #4b5563);
    font-size: 13px;
    line-height: 1.55;
}

.agent-steps li {
    margin-bottom: 4px;
}

.agent-command-block {
    margin: 0;
    overflow: hidden;
    border-top: 1px solid var(--border, rgba(55, 65, 81, 0.12));
    background: #1a2332;
}

.agent-prompt-block {
    background: #202a3a;
}

.agent-command-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    color: #c9d1d9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 600;
}

.agent-command-block pre {
    margin: 0;
    padding: 12px;
    overflow-x: auto;
    background: none;
    max-height: none;
}

.agent-command-block code {
    color: #c9d1d9;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    background: none;
    padding: 0;
}

.aw-copy {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    color: #8b949e;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.aw-copy:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #c9d1d9;
}

.agent-resource-links {
    display: flex;
    gap: 12px;
    padding: 12px 16px 16px;
    flex-wrap: wrap;
}

.agent-resource-links a {
    color: var(--blue, #2451c9);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.agent-resource-links a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .agents-toolbar {
        flex-wrap: wrap;
    }

    .agent-select-wrap {
        flex: 1;
        min-width: 0;
    }
}

/* Trigger buttons under the search bar (Agents / Submit a tool|source) —
   shared so both products' under-bar buttons are pixel-identical. */

.mcp-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: var(--blue, #2451c9);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, rgba(55, 65, 81, 0.12));
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: var(--shadow, 0 1px 3px rgba(0, 0, 0, 0.04));
}

.mcp-trigger:hover {
    border-color: rgba(36, 81, 201, 0.3);
    box-shadow: var(--shadow-hover, 0 2px 8px rgba(0, 0, 0, 0.06));
}

.mcp-trigger-icon {
    color: var(--gold, #ecbb2d);
    flex-shrink: 0;
}

.mcp-trigger-label {
    letter-spacing: -0.01em;
}
