/* LinkedIn Formatting Tool Styles */
.statmat-tool.linkedin-formatter {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  color: #000000; /* LinkedIn text color */
}

.statmat-tool.linkedin-formatter * {
  box-sizing: border-box;
}

.statmat-tool.linkedin-formatter .toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background-color: #f3f2ef; /* LinkedIn light gray background */
  border: 1px solid #dcdac6;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 10px;
}

.statmat-tool.linkedin-formatter .format-btn {
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #666666;
  font-weight: 600;
  transition: all 0.2s;
}

.statmat-tool.linkedin-formatter .format-btn:hover {
  background-color: #ebebeb;
  color: #000000;
}

.statmat-tool.linkedin-formatter .toolbar-divider {
  width: 1px;
  background-color: #dcdac6;
  margin: 0 6px;
}

.statmat-tool.linkedin-formatter .input-wrapper {
  margin-bottom: 12px;
}

.statmat-tool.linkedin-formatter textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid #dcdac6;
  border-radius: 0 0 8px 8px;
  font-size: 15px;
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Fira Sans", Ubuntu, Oxygen, "Oxygen Sans", Cantarell, "Droid Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Lucida Grande", Helvetica, Arial, sans-serif;
  resize: vertical;
  min-height: 200px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #fff;
  line-height: 1.5;
  color: #000000;
}

.statmat-tool.linkedin-formatter textarea:focus {
  outline: none;
  border-color: #0a66c2; /* LinkedIn Blue */
  box-shadow: 0 0 0 1px #0a66c2;
}

.statmat-tool.linkedin-formatter .action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.statmat-tool.linkedin-formatter .char-counter {
  font-size: 14px;
  color: #666666;
}

.statmat-tool.linkedin-formatter .char-counter.warning {
  color: #cc1016; /* LinkedIn Red */
}

.statmat-tool.linkedin-formatter .actions {
  display: flex;
  gap: 12px;
}

.statmat-tool.linkedin-formatter .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  border-radius: 24px; /* LinkedIn style rounded buttons */
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s;
}

.statmat-tool.linkedin-formatter .btn-primary {
  background-color: #0a66c2;
  color: #fff;
}

.statmat-tool.linkedin-formatter .btn-primary:hover {
  background-color: #004182;
}

.statmat-tool.linkedin-formatter .btn-secondary {
  background-color: transparent;
  color: #000000;
  border: 1px solid #666666;
}

.statmat-tool.linkedin-formatter .btn-secondary:hover {
  background-color: rgba(0,0,0,0.08);
  box-shadow: inset 0 0 0 1px #666666;
}

/* LinkedIn Preview Area */
.statmat-tool.linkedin-formatter .preview-section h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 16px;
  color: #666666;
}

.statmat-tool.linkedin-formatter .linkedin-preview-box {
  background-color: #ffffff;
  border: 1px solid #dcdac6;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  max-width: 480px; /* Simulate mobile width */
  margin: 0 auto;
}

.statmat-tool.linkedin-formatter .li-header {
  display: flex;
  margin-bottom: 12px;
}

.statmat-tool.linkedin-formatter .li-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #e8e8e8;
  margin-right: 8px;
}

.statmat-tool.linkedin-formatter .li-user-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.statmat-tool.linkedin-formatter .li-name {
  font-size: 14px;
  font-weight: 600;
  color: #000000;
}

.statmat-tool.linkedin-formatter .li-title {
  font-size: 12px;
  color: #666666;
}

.statmat-tool.linkedin-formatter .li-time {
  font-size: 12px;
  color: #666666;
  margin-top: 2px;
}

.statmat-tool.linkedin-formatter .li-body {
  font-size: 14px;
  line-height: 1.5;
  color: #000000;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Empty State */
.statmat-tool.linkedin-formatter .empty-preview {
  color: #8f8f8f;
  font-style: italic;
}

/* Toast */
.statmat-tool.linkedin-formatter .toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #000000;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 9999;
}

.statmat-tool.linkedin-formatter .toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .statmat-tool.linkedin-formatter .action-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .statmat-tool.linkedin-formatter .actions {
    width: 100%;
  }
  
  .statmat-tool.linkedin-formatter .btn {
    flex: 1;
  }
}

/* Global override for mobile scrolling on long results */
.statmat-tool [class*="result"], 
.statmat-tool [class*="output"],
.statmat-tool [class*="preview"],
.statmat-tool [class*="display"] {
  overflow-x: auto;
  max-width: 100%;
}

/* Global safeguard: ensure main wrapper never exceeds mobile viewport */
.statmat-tool {
  width: 100% !important;
  box-sizing: border-box;
}
