/* ═══════════════════════════════════════════════════════ */
/* Agent Control Panel                                     */
/* ═══════════════════════════════════════════════════════ */

.agent-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.agent-panel {
    background: #1A1E28;
    border: 1px solid #333;
    border-radius: 12px;
    min-width: 340px;
    max-width: 420px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.ap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #2a2a40;
}

.ap-header h3 {
    margin: 0;
    font-size: 16px;
    color: #e0e0e0;
}

.ap-close {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

.ap-close:hover {
    color: #fff;
}

.ap-body {
    padding: 12px 18px;
    overflow-y: auto;
}

.ap-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e1e38;
}

.ap-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ap-section.ap-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.ap-section-title {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.ap-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #c0c0c0;
}

.ap-global-row {
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
}

.ap-hint {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

/* Toggle switch */
.ap-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.ap-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ap-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #333;
    border-radius: 22px;
    transition: background 0.25s;
}

.ap-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #888;
    border-radius: 50%;
    transition: transform 0.25s, background 0.25s;
}

.ap-toggle input:checked + .ap-slider {
    background: #2d5a2d;
}

.ap-toggle input:checked + .ap-slider::before {
    transform: translateX(18px);
    background: #4caf50;
}

.ap-toggle input:disabled + .ap-slider {
    cursor: not-allowed;
    opacity: 0.5;
}
