/* --- Generic Terminal Component Styles (New Look) --- */

/* Prevent text selection */
body, .terminal-component { /* Apply to body or specific elements */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE/Edge */
  user-select: none;         /* Standard */
  /* Prevent tap highlight overlay on mobile */
  -webkit-tap-highlight-color: transparent;
}

/* Ensure inputs are still selectable/editable */
/* You might need to be more specific if other inputs exist */
input, textarea, [contenteditable="true"] {
   -webkit-user-select: text !important;
   -moz-user-select: text !important;
   -ms-user-select: text !important;
   user-select: text !important;
}

/* Specifically allow selection on terminal history if needed */
/*
.terminal-history {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
*/

/* DIFFERENT HEIGHTS */
.h20 {
  height: 20%;
}
.h30 {
  height: 30%;
}
.h40 {
  height: 40%;
}
.h50 {
  height: 50%;
}
.h60 {
  height: 60%;
}
.h70 {
  height: 70%;
}
.h80 {
  height: 80%;
}
.h90 {
  height: 90%;
}
.h100 {
  height: 100%;
}

.terminal-body .user{
  color: #06c1e2aa;
}

/* Container for overall positioning/sizing (can be overridden) */
.terminal-component {
  flex-grow: 1; /* **** Allow component to take remaining vertical space **** */
  width: 100%; /* Or your desired width */
  /* max-width: 800px; */
  margin-bottom: 1rem; /* Space at the very bottom */
  display: flex; /* Needed for child window with height 100% */
  flex-direction: column;
  min-height: 0; /* Important flexbox fix for overflow */
  /* REMOVE fixed height/max-height if you want it to fill space */
  /* height: 60%; */
  /* max-height: 450px; */
}

.terminal-window {
  width: 100%;
  /* height: 100%;  */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Keep contents within rounded corners */
  border-radius: 5px; /* From previous style */
  min-height: 0; /* Important flexbox fix */
  /* background, box-shadow etc. */
}

/* Applying styles from .fakeMenu */
.terminal-header {
  width: 100%;
  height: 25px;
  background-color: #bbb; /* from .fakeMenu */
  border-top-right-radius: 5px; /* from .fakeMenu */
  border-top-left-radius: 5px; /* from .fakeMenu */
  display: flex;
  align-items: center;
  padding: 0 8px; /* Add some padding for buttons */
  box-sizing: border-box; /* from .fakeMenu */
  flex-shrink: 0;
  position: relative; /* Context for button positioning */
}

.terminal-buttons {
  /* Use absolute positioning to mimic 'top: 6px; left: 6px;' */
  position: absolute;
  top: 50%;
  left: 8px; /* Padding of header */
  transform: translateY(-50%);
  display: flex;
}

/* Applying styles from .fakeButtons */
.terminal-button {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  border: 1px solid #000; /* Base border */
  display: block;
  margin-right: 5px; /* Space between buttons */
}

/* Applying specific colors/borders from .fakeButtons, .fakeMinimize, .fakeZoom */
.terminal-button.red-btn {
  background-color: #ff3b47;
  border-color: #9d252b;
}

.terminal-button.yellow-btn {
  background-color: #ffc100;
  border-color: #9d802c;
}

.terminal-button.green-btn {
  background-color: #00d742;
  border-color: #049931;
  margin-right: 0; /* No margin on last button */
}

/* Title - optional, simple centering */
.terminal-title {
  flex-grow: 1;
  text-align: center;
  font-family: sans-serif;
  font-size: 0.8rem;
  color: #333; /* Darker color for light header */
  line-height: 25px; /* Match header height */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 50px; /* Space for buttons */
}

/* Applying styles from .fakeScreen */
.terminal-body {
  background-color: rgb(18, 25, 32);
  box-sizing: border-box; /* from .fakeScreen */
  width: 100%; /* from .fakeScreen */
  margin: 0 auto; /* from .fakeScreen */
  padding: 10px; /* from .fakeScreen */
  border-bottom-left-radius: 5px; /* from .fakeScreen */
  border-bottom-right-radius: 5px; /* from .fakeScreen */
  flex-grow: 1; /* Allow body to fill remaining space */
  overflow-y: auto;
  color: #00d742; /* Text color from .fakeScreen p */
  font-family: monospace; /* Font from .fakeScreen p */
  font-size: 0.7em;
  /* font-size: 16px; */
  line-height: 1.5; /* Adjust as needed */
  /* white-space: pre-wrap;  */
  position: relative; /* For cursor */
  cursor: text; /* Change cursor to text type when hovering body */
}

/* --- Styles for Interactive Terminal Input --- */
.terminal-line {
  min-height: 1.5em; /* Ensure lines have consistent height */
  /* Inherit text color and font from terminal-body */
  color: inherit;
  font-family: inherit;
  font-size: 0.7em; 
  line-height: inherit;
  white-space: pre-wrap;
}

.terminal-history {
  margin-bottom: 5px; /* Space below history lines */
}

.current-input-line {
  display: flex;
  align-items: center;
}

.prompt {
  /* Style the '$ ' prompt if needed */
  flex-shrink: 0; /* Prevent prompt from shrinking */
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  flex-grow: 1; /* Take remaining space on the line */
  /* Inherit text styles */
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  padding: 0; /* Remove default input padding */
  /* Blinking cursor via caret color */
  caret-color: #ae1616; 
  caret-shape: block;
}



/* Styles for text elements directly inside terminal body */
/* (Alternative to '.fakeScreen p') */
.terminal-body > * {
  /* You might not need specific p styling if text nodes are added directly */
  /* Or you can style direct text content using terminal-body styles */
  padding: 0; /* Reset padding for direct text nodes */
  margin: 0 0 5px 0; /* Basic margin between lines/elements */
}
