/* Aesthetic Font Generator Styles */
.statmat-tool.aesthetic-font {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  color: #333;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid #eaeaea;
  overflow: hidden;
}

.statmat-tool.aesthetic-font * {
  box-sizing: border-box;
}

.statmat-tool.aesthetic-font .af-header {
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
  color: #fff;
  padding: 32px 24px;
  text-align: center;
}

.statmat-tool.aesthetic-font .af-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.statmat-tool.aesthetic-font .af-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.statmat-tool.aesthetic-font .af-header p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.95;
}

.statmat-tool.aesthetic-font .af-container {
  padding: 30px;
  background-color: #fafafa;
}

.statmat-tool.aesthetic-font .input-section {
  background-color: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #eaeaea;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.statmat-tool.aesthetic-font label {
  display: block;
  font-weight: 600;
  color: #444;
  margin-bottom: 10px;
  font-size: 15px;
}

.statmat-tool.aesthetic-font textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 18px;
  color: #222;
  transition: all 0.2s;
  resize: vertical;
  background-color: #fafafa;
  font-family: inherit;
}

.statmat-tool.aesthetic-font textarea:focus {
  outline: none;
  border-color: #a18cd1;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(161, 140, 209, 0.1);
}

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

.statmat-tool.aesthetic-font .btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.statmat-tool.aesthetic-font .btn-secondary {
  background-color: #f0f0f0;
  color: #555;
}

.statmat-tool.aesthetic-font .btn-secondary:hover {
  background-color: #e4e4e4;
  color: #333;
}

/* Results Section */
.statmat-tool.aesthetic-font .results-section {
  background-color: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #eaeaea;
}

.statmat-tool.aesthetic-font .results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaeaea;
}

.statmat-tool.aesthetic-font .results-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.statmat-tool.aesthetic-font .count-badge {
  background-color: #fbc2eb;
  color: #6a4b9c;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

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

.statmat-tool.aesthetic-font .font-card {
  display: flex;
  background-color: #fafafa;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}

.statmat-tool.aesthetic-font .font-card:hover {
  border-color: #a18cd1;
  box-shadow: 0 4px 12px rgba(161, 140, 209, 0.1);
  transform: translateY(-2px);
}

.statmat-tool.aesthetic-font .font-output {
  flex: 1;
  padding: 16px 20px;
  font-size: 22px;
  color: #111;
  word-break: break-all;
  white-space: pre-wrap;
  border-right: 1px solid #eaeaea;
  cursor: text;
}

.statmat-tool.aesthetic-font .copy-btn {
  width: 80px;
  background-color: transparent;
  border: none;
  color: #a18cd1;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.statmat-tool.aesthetic-font .copy-btn:hover {
  background-color: #fbc2eb;
  color: #fff;
}

.statmat-tool.aesthetic-font .copy-icon {
  font-size: 18px;
}

/* Toast */
.statmat-tool.aesthetic-font .toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: #333;
  color: white;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 9999;
}

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

@media (max-width: 600px) {
  .statmat-tool.aesthetic-font .font-output {
    font-size: 18px;
    padding: 12px 16px;
  }
  .statmat-tool.aesthetic-font .copy-btn {
    width: 60px;
    font-size: 12px;
  }
}

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