/* Old English Font Generator Styles */
.statmat-tool.old-english {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  color: #111;
  background-color: #f5f5f0; /* Slight parchment/off-white */
  border-radius: 4px; /* Less rounded for a classic feel */
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 2px solid #222;
  overflow: hidden;
}

.statmat-tool.old-english * {
  box-sizing: border-box;
}

.statmat-tool.old-english .oe-header {
  background-color: #111;
  color: #fff;
  padding: 32px 24px;
  text-align: center;
  border-bottom: 4px double #d4af37; /* Gold double border */
}

.statmat-tool.old-english .oe-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: #d4af37; /* Gold accent */
  font-family: serif;
}

.statmat-tool.old-english .oe-header h2 {
  margin: 0 0 8px 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-family: "Georgia", serif;
}

.statmat-tool.old-english .oe-header p {
  margin: 0;
  font-size: 16px;
  color: #ccc;
  font-style: italic;
  font-family: "Georgia", serif;
}

.statmat-tool.old-english .oe-container {
  padding: 30px;
  background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><g fill="%23e5e5df" fill-opacity="0.4" fill-rule="evenodd"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/></g></svg>');
}

.statmat-tool.old-english .input-section {
  background-color: #fff;
  padding: 24px;
  border: 2px solid #111;
  margin-bottom: 24px;
  box-shadow: 4px 4px 0px #111; /* Brutalist shadow */
}

.statmat-tool.old-english label {
  display: block;
  font-weight: 800;
  color: #111;
  margin-bottom: 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.statmat-tool.old-english textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid #ccc;
  font-size: 20px;
  color: #111;
  background-color: #fafafa;
  transition: all 0.2s;
  resize: vertical;
  font-family: serif;
}

.statmat-tool.old-english textarea:focus {
  outline: none;
  border-color: #111;
  background-color: #fff;
}

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

.statmat-tool.old-english .btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 800;
  border: 2px solid #111;
  background-color: #fff;
  color: #111;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.statmat-tool.old-english .btn-secondary:hover {
  background-color: #111;
  color: #fff;
}

/* Results Section */
.statmat-tool.old-english .results-section {
  background-color: #fff;
  padding: 24px;
  border: 2px solid #111;
  box-shadow: 4px 4px 0px #111;
}

.statmat-tool.old-english .results-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #111;
}

.statmat-tool.old-english .results-header h3 {
  margin: 0;
  font-size: 18px;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

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

.statmat-tool.old-english .font-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border: 1px solid #ccc;
  overflow: hidden;
  transition: all 0.2s;
}

.statmat-tool.old-english .font-card:hover {
  border-color: #111;
}

.statmat-tool.old-english .font-label {
  background-color: #f0f0f0;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #555;
  border-bottom: 1px solid #ccc;
  letter-spacing: 1px;
}

.statmat-tool.old-english .font-output-row {
  display: flex;
}

.statmat-tool.old-english .font-output {
  flex: 1;
  padding: 16px 20px;
  font-size: 26px; 
  color: #000;
  word-break: break-all;
  white-space: pre-wrap;
  border-right: 1px solid #ccc;
}

.statmat-tool.old-english .copy-btn {
  width: 90px;
  background-color: #fff;
  border: none;
  color: #111;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-transform: uppercase;
}

.statmat-tool.old-english .copy-btn:hover {
  background-color: #111;
  color: #fff;
}

.statmat-tool.old-english .copy-icon {
  font-size: 20px;
}

/* Toast */
.statmat-tool.old-english .toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #111;
  color: #d4af37;
  padding: 12px 28px;
  border: 2px solid #d4af37;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 9999;
  text-transform: uppercase;
}

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

@media (max-width: 600px) {
  .statmat-tool.old-english .font-output {
    font-size: 22px;
    padding: 12px 16px;
  }
  .statmat-tool.old-english .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;
}
