/* Text Outline Generator Styles */
.statmat-tool.text-outline {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  color: #3f3f46;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid #e4e4e7;
  overflow: hidden;
}

.statmat-tool.text-outline * {
  box-sizing: border-box;
}

.statmat-tool.text-outline .to-header {
  background: #fff;
  color: #18181b;
  padding: 32px 24px;
  text-align: center;
  border-bottom: 2px solid #e4e4e7;
}

.statmat-tool.text-outline .to-icon {
  font-size: 38px;
  margin-bottom: 8px;
  font-weight: 300;
}

.statmat-tool.text-outline .to-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 1px;
}

.statmat-tool.text-outline .to-header p {
  margin: 0;
  font-size: 16px;
  color: #71717a;
}

.statmat-tool.text-outline .to-container {
  padding: 30px;
  background-color: #fafafa;
}

.statmat-tool.text-outline .input-section {
  background-color: #fff;
  padding: 24px;
  border-radius: 8px;
  border: 1px dashed #d4d4d8;
  margin-bottom: 24px;
}

.statmat-tool.text-outline label {
  display: block;
  font-weight: 400;
  color: #52525b;
  margin-bottom: 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.statmat-tool.text-outline textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  font-size: 20px;
  color: #18181b;
  transition: all 0.2s;
  resize: vertical;
  font-family: inherit;
  font-weight: 300;
}

.statmat-tool.text-outline textarea:focus {
  outline: none;
  border-color: #18181b;
  box-shadow: 0 0 0 1px #18181b;
}

.statmat-tool.text-outline .input-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.statmat-tool.text-outline .btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 400;
  border: 1px solid #e4e4e7;
  background-color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.statmat-tool.text-outline .btn-secondary {
  color: #52525b;
}

.statmat-tool.text-outline .btn-secondary:hover {
  border-color: #18181b;
  color: #18181b;
}

/* Results Section */
.statmat-tool.text-outline .results-section {
  background-color: #fff;
  padding: 24px;
  border-radius: 8px;
  border: 1px dashed #d4d4d8;
}

.statmat-tool.text-outline .results-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f4f4f5;
}

.statmat-tool.text-outline .results-header h3 {
  margin: 0;
  font-size: 16px;
  color: #18181b;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 300;
}

.statmat-tool.text-outline .font-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.statmat-tool.text-outline .font-card {
  display: flex;
  flex-direction: column;
  background-color: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.2s;
}

.statmat-tool.text-outline .font-card:hover {
  border-color: #18181b;
}

.statmat-tool.text-outline .font-label {
  background-color: #f4f4f5;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  color: #71717a;
  border-bottom: 1px solid #e4e4e7;
  letter-spacing: 1px;
}

.statmat-tool.text-outline .font-output-row {
  display: flex;
}

.statmat-tool.text-outline .font-output {
  flex: 1;
  padding: 16px;
  font-size: 24px;
  color: #18181b;
  word-break: break-all;
  white-space: pre-wrap;
  border-right: 1px solid #e4e4e7;
  font-weight: 300;
}

.statmat-tool.text-outline .copy-btn {
  width: 90px;
  background-color: #fff;
  border: none;
  color: #18181b;
  font-weight: 400;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.statmat-tool.text-outline .copy-btn:hover {
  background-color: #f4f4f5;
}

.statmat-tool.text-outline .copy-icon {
  font-size: 20px;
}

/* Toast */
.statmat-tool.text-outline .toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #18181b;
  color: white;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 300;
  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;
  letter-spacing: 1px;
}

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

@media (max-width: 600px) {
  .statmat-tool.text-outline .font-output {
    font-size: 20px;
    padding: 12px;
  }
  .statmat-tool.text-outline .copy-btn {
    width: 70px;
  }
}

/* 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;
}
