/* dictionary.css — Morocco Hykayat interactive dictionary popup */

.dict-word {
  cursor: pointer;
  border-bottom: 1px dotted #c9762c;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dict-word:hover,
.dict-word:focus {
  background-color: rgba(201, 118, 44, 0.15);
  border-radius: 3px;
}

.dict-popup {
  position: absolute;
  z-index: 1000;
  width: 280px;
  max-width: 90vw;
  background: #fff8f0;
  border: 1px solid #e8b384;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(60, 30, 0, 0.18);
  padding: 14px 16px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  animation: dict-fade-in 0.15s ease;
}

@keyframes dict-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dict-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e8843c;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.dict-popup-word {
  font-size: 1.15rem;
  font-weight: 700;
  color: #b45309;
}

.dict-popup-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: #a16207;
  cursor: pointer;
  padding: 0 2px;
}

.dict-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.dict-label {
  min-width: 68px;
  font-weight: 600;
  color: #9a5b1f;
  flex-shrink: 0;
}

.dict-value {
  color: #3a2a1a;
}

.dict-meaning .dict-value { font-style: italic; }
.dict-example .dict-value { color: #5a4632; }
.dict-review-note { font-size: 0.78rem; color: #a16207; margin-top: 6px; }

.dict-loading {
  display: flex;
  justify-content: center;
  padding: 22px;
}

.dict-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #f0d9c0;
  border-top-color: #e8843c;
  border-radius: 50%;
  animation: dict-spin 0.7s linear infinite;
}

@keyframes dict-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .dict-popup { width: 240px; }
}
