/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Tool Call Message Styling */
.message.tool {
  background-color: #f1f3f4;
  border: 1px solid #dadce0;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #5f6368;
  position: relative;
  max-width: 80%;
  margin-left: 0;
  margin-right: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message.tool p {
  margin: 0 !important;
  line-height: 1.4 !important;
  color: #5f6368;
  display: inline;
}

.message.tool strong {
  color: #202124;
  font-weight: 500;
}

.message.tool br {
  display: block;
  margin: 4px 0;
  content: "";
}

/* Tool Content Layout */
.tool-content {
  display: block;
}

.tool-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 20px;
}

.tool-summary::before {
  content: "⚙️";
  font-size: 12px;
  opacity: 0.7;
  flex-shrink: 0;
}

.tool-summary p {
  flex: 1;
  margin: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4 !important;
  display: block !important;
}

/* Tool Toggle Button */
.tool-toggle {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #5f6368;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: fit-content;
}

.tool-toggle:hover {
  background-color: #e8eaed;
  color: #202124;
}

.tool-toggle .toggle-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.tool-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

.tool-toggle.expanded .toggle-text {
  content: "Hide details";
}

/* Tool Details */
.tool-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8eaed;
  color: #5f6368;
  font-size: 12px;
  line-height: 1.4;
}

.tool-details p {
  margin: 4px 0 !important;
  color: #5f6368 !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .message.tool {
    background-color: #2a2d31;
    border-color: #3e4248;
    color: #b3b7bb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  .message.tool p {
    color: #b3b7bb !important;
  }

  .message.tool strong {
    color: #e8eaed;
  }

  .message.tool::before {
    opacity: 0.6;
  }

  .tool-toggle {
    color: #b3b7bb;
  }

  .tool-toggle:hover {
    background-color: #3e4248;
    color: #e8eaed;
  }

  .tool-details {
    border-top-color: #3e4248;
    color: #b3b7bb;
  }

  .tool-details p {
    color: #b3b7bb !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .message.tool {
    max-width: 90%;
    font-size: 12px;
    padding: 10px 14px;
    margin: 10px 0;
  }

  .message.tool::before {
    font-size: 11px;
    margin-right: 5px;
  }

  .tool-summary {
    gap: 6px;
  }

  .tool-summary p {
    font-size: 12px;
  }

  .tool-toggle {
    font-size: 10px;
    padding: 3px 6px;
  }

  .tool-details {
    font-size: 11px;
  }
}
