/* --- EDITOR ONLY STYLES --- */
.glossary-container-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.glossary-header-editor h2 {
    margin: 0 0 10px 0;
    color: #1a202c;
}

.glossary-term-editor {
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 4px;
    padding: 10px;
}

.term-editor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.term-editor-header .label {
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
}

.term-name-input {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    flex: 1;
}

.definition-input {
    font-size: 14px;
    color: #4a5568;
    background: #fff;
    padding: 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
}

/* --- FRONTEND STYLES (Copied from Vanilla version) --- */

.wp-block-technadu-glossary {
  font-family: system-ui,sans-serif,"Arial";
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  margin: 2rem 0;
  color: #1a202c;
}

.glossary-header {
  background-color: rgba(247, 250, 252, 0.8);
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.glossary-header-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .glossary-header-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.glossary-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.glossary-icon {
  padding: 0.5rem;
  background-color: rgba(17, 104, 204, 0.1);
  border-radius: 8px;
  color: #1168cc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glossary-title-text h2 {
  font-family: system-ui,sans-serif,"Arial";
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
  line-height: 1.2;
}

.glossary-title-text span {
  font-family: system-ui,sans-serif,"Arial";
  font-size: 0.875rem;
  color: #718096;
  margin: 0;
}

.glossary-search-wrapper {
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .glossary-search-wrapper {
    width: 250px;
  }
}

.glossary-search-wrapper .glossary-search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.glossary-search-input:focus {
  border-color: #1168cc;
  box-shadow: 0 0 0 3px rgba(17, 104, 204, 0.1);
}

.glossary-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #a0aec0;
  pointer-events: none;
}

.glossary-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.glossary-filter-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-family: system-ui,sans-serif,"Arial";
  font-weight: 500;
  color: #718096;
  border-radius: 9999px;
  transition: all 0.2s;
}

.glossary-filter-btn:hover {
  background-color: #ffffff;
  color: #1a202c;
}

.glossary-filter-btn.active {
  background-color: #1168cc;
  color: #ffffff;
}

.glossary-list {
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.glossary-term-item {
  border-bottom: 1px solid #e2e8f0;
}

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

.glossary-term-trigger {
  width: 100%;
  text-align: left;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s;
}

.glossary-term-trigger:hover,
.glossary-term-trigger:focus {
  background-color: rgba(247, 250, 252, 0.5);
  outline: none;
}

.term-content-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.term-letter {
  font-family: system-ui,sans-serif,"Arial";
  font-size: 0.75rem;
  font-weight: 700;
  color: #a0aec0;
  width: 1.5rem;
  opacity: 0.5;
}

.glossary-term-trigger:hover .term-letter {
  opacity: 1;
}

.term-name {
  font-family: system-ui,sans-serif,"Arial";
  font-size: 1.125rem;
  font-weight: 500;
  color: #1a202c;
  transition: color 0.2s;
}

.glossary-term-item.expanded .term-name {
  color: #1168cc;
}

.glossary-toggle-iconn {
  color: #a0aec0;
  transition: transform 0.2s;
}

.glossary-term-item.expanded .glossary-toggle-icon {
  transform: rotate(180deg);
  color: #1a202c;
}

.glossary-definition {
  display: none;
  background-color: rgba(247, 250, 252, 0.3);
  overflow: hidden;
}

.glossary-term-item.expanded .glossary-definition {
  display: block;
  animation: slideDown 0.3s ease-out;
}

.definition-inner {
  padding: 0.5rem 1.5rem 0.5rem 4rem;
  color: #4a5568;
  font-family: system-ui,sans-serif,"Arial";
  font-size: 0.95rem;
  line-height: 1.6;
  border-left: 4px solid rgba(17, 104, 204, 0.2);
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.glossary-footer {
  padding: 0.75rem 1.5rem;
  background-color: rgba(247, 250, 252, 0.5);
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  font-family: system-ui,sans-serif,"Arial";
  font-size: 0.75rem;
  color: #718096;
}

.glossary-empty {
  padding: 3rem;
  text-align: center;
  color: #718096;
  display: none;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
