/* PentestAgent TUI Styles */

Screen {
    background: #0a0a0a;
    color: #d4d4d4;
}

/* Splash Screen */
#splash_screen {
    height: 100%;
    width: 100%;
    background: #0a0a0a;
    content-align: center middle;
}

#splash_content {
    width: auto;
    height: auto;
    background: transparent;
    text-align: center;
    padding: 2;
}

/* Main Layout */
#main_container {
    height: 100%;
    padding: 0;
    margin: 0;
    background: #0a0a0a;
}

#content_container {
    height: 1fr;
    padding: 0;
    background: transparent;
}

/* Sidebar */
#sidebar {
    width: 28%;
    background: transparent;
    margin-left: 1;
}

#tools_panel {
    height: 1fr;
    background: transparent;
    border: round #262626;
    border-title-color: #22c55e;
    padding: 1;
    margin-bottom: 1;
}

#stats_panel {
    height: auto;
    max-height: 12;
    background: transparent;
    border: round #262626;
    border-title-color: #22c55e;
    padding: 1;
}

/* Chat Area */
#chat_area {
    width: 72%;
    background: transparent;
}

#chat_history {
    height: 1fr;
    background: transparent;
    border: round #1a1a1a;
    padding: 0 1;
    margin-bottom: 0;
    scrollbar-background: #0a0a0a;
    scrollbar-color: #262626;
    scrollbar-size: 1 1;
}

#chat_display {
    width: 100%;
    padding: 1;
}

/* Status Display */
#status_display {
    height: 1;
    background: transparent;
    margin: 0;
    padding: 0 1;
}

#status_display.hidden {
    display: none;
}

#status_text {
    width: 1fr;
    color: #22c55e;
    text-style: italic;
}

#keymap_text {
    width: auto;
    color: #525252;
}

/* Input Area */
#input_container {
    height: 3;
    background: transparent;
    border: round #525252;
    margin-right: 0;
    padding: 0;
    layout: horizontal;
}

#input_container:focus-within {
    border: round #22c55e;
}

#input_prompt {
    width: auto;
    height: 100%;
    padding: 0 0 0 1;
    color: #525252;
    content-align-vertical: middle;
}

#input_container:focus-within #input_prompt {
    color: #22c55e;
    text-style: bold;
}

#chat_input {
    width: 1fr;
    height: 100%;
    background: #0a0a0a;
    border: none;
    color: #d4d4d4;
    padding: 0;
}

/* Messages */
.user-message {
    color: #3b82f6;
    margin-bottom: 1;
}

.agent-message {
    color: #d4d4d4;
    margin-bottom: 1;
}

.tool-call {
    border-left: thick #f59e0b;
    padding-left: 1;
    margin: 1 0;
    color: #a3a3a3;
}

.tool-call.completed {
    border-left: thick #22c55e;
}

.tool-call.error {
    border-left: thick #ef4444;
}

.finding {
    border-left: thick #ef4444;
    padding-left: 1;
    margin: 1 0;
}

.info {
    color: #22c55e;
}

.warning {
    color: #f59e0b;
}

.error {
    color: #ef4444;
}

/* Help Dialog */
HelpScreen {
    align: center middle;
    background: #0a0a0a 80%;
}

#help_dialog {
    width: 50;
    height: auto;
    padding: 2;
    border: round #22c55e;
    background: #1a1a1a;
}

#help_title {
    color: #22c55e;
    text-style: bold;
    text-align: center;
    margin-bottom: 1;
}

#help_content {
    color: #d4d4d4;
}

/* Quit Dialog */
QuitScreen {
    align: center middle;
    background: #0a0a0a 80%;
}

#quit_dialog {
    width: 30;
    height: auto;
    padding: 2;
    border: round #525252;
    background: #1a1a1a;
}

#quit_title {
    color: #d4d4d4;
    text-style: bold;
    text-align: center;
    margin-bottom: 1;
}

#quit_buttons {
    layout: horizontal;
    height: 3;
    align: center middle;
}

#quit_buttons Button {
    margin: 0 1;
}

/* ===== CREW MODE LAYOUT ===== */

#crew_container {
    height: 100%;
    width: 100%;
    layout: horizontal;
    background: #0a0a0a;
}

#crew_chat_area {
    width: 75%;
    height: 100%;
    background: transparent;
}

#crew_sidebar {
    width: 25%;
    height: 100%;
    background: transparent;
    margin-left: 1;
}

/* Worker Tree */
#workers_tree {
    height: 1fr;
    background: transparent;
    border: round #262626;
    border-title-color: #06b6d4;
    padding: 1;
    margin-bottom: 1;
}

#workers_tree:focus {
    border: round #06b6d4;
}

Tree {
    background: transparent;
    color: #d4d4d4;
    scrollbar-background: transparent;
    scrollbar-color: #404040;
    scrollbar-size: 1 1;
}

Tree > .tree--label {
    text-style: bold;
    color: #06b6d4;
    background: transparent;
}

.tree--node {
    height: 1;
    padding: 0;
    margin: 0;
}

.tree--node-label {
    color: #d4d4d4;
    background: transparent;
    padding: 0 1;
}

.tree--node:hover .tree--node-label {
    background: #1a1a1a;
    color: #ffffff;
}

.tree--node.-selected .tree--node-label {
    background: #1a1a1a;
    color: #06b6d4;
    text-style: bold;
}

/* Crew Stats Panel */
#crew_stats {
    height: auto;
    max-height: 10;
    background: transparent;
    border: round #262626;
    border-title-color: #06b6d4;
    padding: 1;
}

/* Worker status colors */
.worker-running {
    color: #22c55e;
}

.worker-waiting {
    color: #eab308;
}

.worker-complete {
    color: #06b6d4;
}

.worker-error {
    color: #ef4444;
}

/* Crew chat display */
#crew_chat_history {
    height: 1fr;
    background: transparent;
    border: round #1a1a1a;
    padding: 0 1;
    margin-bottom: 0;
    scrollbar-background: #0a0a0a;
    scrollbar-color: #262626;
    scrollbar-size: 1 1;
}

#crew_chat_display {
    width: 100%;
    padding: 1;
}

/* Crew input */
#crew_input_container {
    height: 3;
    background: transparent;
    border: round #525252;
    margin-right: 0;
    padding: 0;
    layout: horizontal;
}

#crew_input_container:focus-within {
    border: round #06b6d4;
}

#crew_input_prompt {
    width: auto;
    height: 100%;
    padding: 0 0 0 1;
    color: #525252;
    content-align-vertical: middle;
}

#crew_input_container:focus-within #crew_input_prompt {
    color: #06b6d4;
    text-style: bold;
}

#crew_chat_input {
    width: 1fr;
    height: 100%;
    background: #0a0a0a;
    border: none;
    color: #d4d4d4;
    padding: 0;
}

/* Crew status bar */
#crew_status_display {
    height: 1;
    background: transparent;
    margin: 0;
    padding: 0 1;
}

#crew_status_text {
    width: 1fr;
    color: #06b6d4;
    text-style: italic;
}

/* Orchestrator thinking message */
.orchestrator-thinking {
    border-left: thick #8b5cf6;
    padding-left: 1;
    margin: 1 0;
    color: #c4b5fd;
}

/* Worker spawn message */
.worker-spawn {
    border-left: thick #06b6d4;
    padding-left: 1;
    margin: 1 0;
    color: #67e8f9;
}

/* Worker result message */
.worker-result {
    border-left: thick #22c55e;
    padding-left: 1;
    margin: 1 0;
    color: #86efac;
}

/* Worker activity (when viewing a specific worker) */
.worker-activity {
    border-left: thick #f59e0b;
    padding-left: 1;
    margin: 0 0 1 0;
    color: #a3a3a3;
}

