@import url("https://fonts.googleapis.com/css2?family=Amiri&family=Noto+Sans+Hebrew:wght@400;700&family=Noto+Sans+Brahmi&family=Noto+Sans+Ethiopic:wght@400;700&family=Noto+Sans+Phoenician&display=swap");

#solar-gematria-container {
  max-width: 1000px;
  margin: 20px 0;
  font-family:
    "Noto Sans Hebrew", "Amiri", "Noto Sans Brahmi", "Noto Sans Ethiopic",
    "Noto Sans Phoenician", "Noto Sans", sans-serif !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

#gematria-form,
#lookup-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

#gematria-input,
#lookup-input {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  position: relative; /* Ensure z-index works */
  z-index: 10; /* High z-index to ensure interactability */
}

#gematria-submit,
#lookup-submit {
  padding: 12px 24px;
  font-size: 16px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
  position: relative; /* Ensure z-index works */
  z-index: 10; /* High z-index to ensure interactability */
}

#gematria-submit:hover,
#lookup-submit:hover {
  background: #005a87;
}

#gematria-result {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 6px;
  margin: 20px 0;
  display: none;
}

#gematria-result.show {
  display: block;
}

.result-row {
  margin: 12px 0;
  display: flex;
  align-items: center;
}

.result-label {
  font-weight: bold;
  width: 120px;
  margin-right: 15px;
  color: #333;
}

.result-content {
  flex: 1;
}

.result-glyphs {
  font-size: 32px;
  font-family:
    "Noto Sans Hebrew", "Amiri", "Noto Sans Brahmi", "Noto Sans Ethiopic",
    "Noto Sans Phoenician", "Noto Sans", sans-serif !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.solar-glyph {
  display: inline-block;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  font-weight: bold !important;
}

.result-phonetic {
  font-family: "Courier New", monospace;
  background: #eee;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}

.result-value {
  font-size: 24px;
  font-weight: bold;
  color: #0073aa;
}

.result-matches {
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
}

.result-matches h4 {
  margin-top: 0;
  color: #333;
}

.matches-list {
  list-style: none;
  padding: 0;
}

.match-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 15px;
  align-items: center;
}

.match-item:last-child {
  border-bottom: none;
}

.match-word {
  font-weight: bold;
  min-width: 100px;
}

.match-phonetic {
  font-family: "Courier New", monospace;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  min-width: 120px;
  font-size: 12px;
}

.match-glyphs {
  font-size: 20px;
  font-family:
    "Noto Sans Hebrew", "Amiri", "Noto Sans Brahmi", "Noto Sans Ethiopic",
    "Noto Sans Phoenician", "Noto Sans", sans-serif !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.match-count {
  font-size: 12px;
  color: #666;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 5px;
}

.loading,
.error,
.no-matches {
  padding: 15px;
  text-align: center;
  border-radius: 6px;
  margin: 10px 0;
}

.loading {
  background: #e7f3ff;
  color: #0073aa;
  border: 1px solid #b3d9ff;
}

.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.no-matches {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}
