/* ===== REIKNIVÉLAR - Calculator Pages ===== */

/* Grid of ishusid links */
.reikni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.reikni-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #f9f9f9;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
  gap: 6px;
}
.reikni-box:hover {
  border-color: #0073aa;
  background: #e8f4fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}
.reikni-icon { font-size: 2em; }
.reikni-box strong { font-size: 0.95em; color: #0073aa; }
.reikni-box span { font-size: 0.8em; color: #666; }

/* Calculator box */
.calculator-box {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 24px;
  margin: 20px 0;
  max-width: 750px;
}
.calc-row {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.calc-row label {
  font-weight: 600;
  color: #333;
}
.calc-row input,
.calc-row select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  max-width: 400px;
}
.dims {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dims input { width: 110px; }
.calc-btn {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.calc-btn:hover { background: #005d8a; }
.calc-result {
  margin-top: 20px;
  padding: 16px;
  background: #fff;
  border-left: 4px solid #0073aa;
  border-radius: 4px;
  display: none;
  font-size: 1em;
  line-height: 1.7;
}
.calc-result.visible { display: block; }
.calc-note {
  font-size: 0.82em;
  color: #888;
  margin-top: 4px;
}
/* Price fetch status */
.price-status {
  font-size: 0.82em;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}
.price-status.live { background: #e0f0e0; color: #2a7a2a; }
.price-status.fallback { background: #fff3cd; color: #856404; }
.price-status.loading { background: #e8f4fd; color: #0073aa; }

/* Result tables */
table.result-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 12px;
}
table.result-table th {
  background: #0073aa;
  color: #fff;
  padding: 8px 12px;
  text-align: left;
}
table.result-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}
table.result-table tr:nth-child(even) td { background: #f9f9f9; }
table.result-table tr.highlight td { background: #fff3cd; font-weight: 600; }

/* ===== ORDABOK ===== */
.ordabok-page { max-width: 900px; }
.ordabok-search-wrap {
  position: sticky;
  top: 80px;
  z-index: 100;
  background: #fff;
  padding: 12px 0;
  margin-bottom: 16px;
}
#ordabok-search {
  width: 100%;
  max-width: 500px;
  padding: 12px 16px;
  font-size: 1.1em;
  border: 2px solid #0073aa;
  border-radius: 8px;
  outline: none;
}
.term-card {
  border-bottom: 1px solid #eee;
  padding: 14px 0;
}
.term-card:last-child { border-bottom: none; }
.term-name {
  font-size: 1.05em;
  font-weight: 700;
  color: #0073aa;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.term-eng {
  font-size: 0.72em;
  font-weight: 500;
  color: #888;
  background: #f0f4f8;
  border-radius: 4px;
  padding: 1px 7px;
  font-style: italic;
  flex-shrink: 0;
}
.term-def { color: #444; line-height: 1.6; font-size: 0.95em; }
.letter-divider {
  background: #0073aa;
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 1.1em;
  font-weight: 700;
  margin: 20px 0 10px;
  display: inline-block;
}

/* ===== HEIMILDIR ===== */
.heimildir-page { max-width: 900px; }
.book-list, .tool-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}
.book-card, .tool-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
}
.book-card:hover, .tool-card:hover {
  border-color: #0073aa;
  background: #e8f4fd;
  transform: translateX(4px);
}
.book-icon, .tool-icon { font-size: 2em; flex-shrink: 0; }
.book-info, .tool-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.book-info strong, .tool-info strong { color: #0073aa; font-size: 1.05em; }
.book-info span, .tool-info span { font-size: 0.85em; color: #888; }
.book-info em {
  display: inline-block;
  background: #e0f0e0;
  color: #2a7a2a;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-style: normal;
  margin-top: 4px;
  width: fit-content;
}
.tool-info p { color: #555; font-size: 0.92em; margin: 4px 0 0; line-height: 1.5; }

/* ===== LIVE ÍÐORÐABANKI LOOKUP ===== */
.idord-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 2px solid #e0eaf4;
}
.idord-section h3 {
  font-size: 1.05em;
  color: #003d7a;
  margin-bottom: 6px;
}
.idord-section .idord-subtitle {
  font-size: 0.82em;
  color: #888;
  margin-bottom: 12px;
}
.idord-section .idord-subtitle a {
  color: #0073aa;
}
.idord-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
#idord-input {
  flex: 1;
  min-width: 180px;
  max-width: 380px;
  padding: 9px 13px;
  border: 1.5px solid #0073aa;
  border-radius: 8px;
  font-size: 1em;
  outline: none;
}
#idord-input:focus { border-color: #003d7a; box-shadow: 0 0 0 2px rgba(0,115,170,0.15); }
.idord-spinner {
  font-size: 0.9em;
  color: #0073aa;
  display: none;
}
.idord-card {
  background: #f4f9ff;
  border: 1px solid #c8def4;
  border-left: 4px solid #0073aa;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.idord-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.idord-head strong {
  font-size: 1.05em;
  color: #003d7a;
}
.idord-en {
  font-size: 0.78em;
  color: #666;
  background: #e0eaf5;
  border-radius: 4px;
  padding: 1px 7px;
  font-style: italic;
}
.idord-dict {
  font-size: 0.72em;
  color: #888;
  background: #eeeeee;
  border-radius: 4px;
  padding: 1px 6px;
  font-variant: small-caps;
}
.idord-syn  { font-size: 0.84em; color: #555; margin-bottom: 3px; }
.idord-def  { font-size: 0.9em;  color: #333; line-height: 1.6; }
.idord-exp  { font-size: 0.84em; color: #666; font-style: italic; margin-top: 4px; line-height: 1.5; }
.idord-none { color: #888; font-size: 0.9em; font-style: italic; }
