/* =========================================================
   contacts.css  –  NRC Vaivari kontaktu lapa
   Tēmas krāsas: #374F99 (zils) · #26a769 (zaļš)
   ========================================================= */

/* ----- Body info bloks virs akordeonam ------------------- */
.contacts-body {
  margin-bottom: 1.75rem;
  background: #f5f7fc;
  border: 1px solid #dde1f0;
  border-top: 3px solid #374F99;
  border-radius: 0 0 10px 10px;
  padding: 1.25rem 1.5rem 1rem;
  font-size: 1.2rem;
  color: #333;
  line-height: 1.6;
}
.contacts-body .text-align-right {
  text-align: right;
  color: #888;
  font-size: .9rem;
  margin: 0 0 .5rem;
}
.contacts-body .text-align-center {
  text-align: center;
  margin: .15rem 0;
}
.contacts-body a {
  color: #374F99;
}
.contacts-body .table {
  width: 100%;
  border-collapse: collapse;
  margin: .85rem 0;
  font-size: .88rem;
}
.contacts-body .table td {
  padding: .35rem .6rem;
  border: none;
  border-bottom: 1px solid #e4e7f2;
  vertical-align: middle;
}
.contacts-body .table tr:last-child td {
  border-bottom: none;
}
.contacts-body .table td:first-child {
  white-space: nowrap;
  color: #374F99;
  font-weight: 600;
  width: 7rem;
}
.contacts-body .table td:last-child {
  white-space: nowrap;
  font-weight: 600;
  text-align: right;
  color: #232429;
}
.contacts-body p {
  margin: .3rem 0;
}
.contacts-body p strong u,
.contacts-body p u strong {
  color: #374F99;
}
.contacts-body p:last-child:empty,
.contacts-body p:last-child > br:only-child {
  display: none;
}

/* ----- Rīkjosla (meklēšana) ----------------------------- */
.contacts-page .contacts-tools {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.contacts-page .contacts-search-wrap {
  position: relative;
  width: min(520px, 100%);
}

.contacts-page .contacts-search-icon {
  position: absolute;
  left: .7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #919297;
  pointer-events: none;
  display: flex;
}

.contacts-page .contacts-search {
  width: 100%;
  padding: .55rem .7rem .55rem 2.1rem;
  border: 1px solid #c8cad0;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  color: #232429;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

.contacts-page .contacts-search:hover {
  border-color: #374F99;
}

.contacts-page .contacts-search:focus {
  outline: none;
  border-color: #374F99;
  box-shadow: 0 0 0 3px rgba(55, 79, 153, .15);
}

.contacts-page .contacts-search-clear {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #919297;
  padding: .25rem;
  border-radius: 4px;
  display: none;
  align-items: center;
  transition: color .15s;
}
.contacts-page .contacts-search-clear:hover { color: #232429; }
.contacts-page .contacts-search-clear.visible { display: flex; }

.contacts-page .contacts-tools__meta {
  font-size: .9rem;
  color: #666;
  padding: .25rem .6rem;
  background: #f0f2f8;
  border-radius: 20px;
  border: 1px solid #d8dce8;
  white-space: nowrap;
  display: none;
}
.contacts-page .contacts-tools__meta.visible { display: block; }

/* Pogas: atvērt / aizvērt visas */
.contacts-page .contacts-tools-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}
.contacts-page .contacts-tools-actions__right {
  margin-left: auto;
  display: flex;
  gap: .4rem;
}
.contacts-page .contacts-btn {
  padding: .4rem .85rem;
  font-size: .85rem;
  font-family: inherit;
  border: 1px solid #c8cad0;
  border-radius: 7px;
  background: #fff;
  color: #374F99;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: background .15s, border-color .15s, color .15s;
  font-weight: 500;
}
.contacts-page .contacts-btn:hover {
  background: #f0f2f8;
  border-color: #374F99;
}

/* ----- Accordion ----------------------------------------- */
.contacts-page .contacts-acc-item {
  border: 1px solid #dde0ea;
  border-radius: 10px;
  margin-bottom: .6rem;
  background: #fff;
  transition: box-shadow .15s;
  overflow: clip;
}
.contacts-page .contacts-acc-item:hover {
  box-shadow: 0 2px 8px rgba(55, 79, 153, .1);
}
.contacts-page .contacts-acc-item[open] {
  overflow: visible;
  box-shadow: 0 3px 14px rgba(55, 79, 153, .12);
  border-color: #b0b9d8;
}

.contacts-page .contacts-acc-summary {
  cursor: pointer;
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  list-style: none;
  user-select: none;
  transition: background .12s;
}
.contacts-page .contacts-acc-summary::-webkit-details-marker { display: none; }
.contacts-page .contacts-acc-summary::marker { display: none; }
.contacts-page .contacts-acc-summary:hover { background: #f5f6fb; }

.contacts-page .contacts-acc-chevron {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #eef0f8;
  border: 1px solid #d8dce8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374F99;
  flex-shrink: 0;
  transition: background .15s, transform .2s;
}
.contacts-page .contacts-acc-item[open] .contacts-acc-chevron {
  background: #374F99;
  color: #fff;
  border-color: #374F99;
}
.contacts-page .contacts-acc-item[open] .contacts-acc-chevron svg {
  transform: rotate(180deg);
}
.contacts-page .contacts-acc-chevron svg { transition: transform .22s ease; }

.contacts-page .contacts-acc-title {
  font-weight: 600;
  font-size: .95rem;
  color: #232429;
  flex: 1;
}
.contacts-page .contacts-acc-item[open] .contacts-acc-title {
  color: #374F99;
}

.contacts-page .contacts-acc-count {
  font-size: .8rem;
  font-weight: 700;
  color: #26a769;
  background: #e8f7f0;
  border: 1px solid rgba(38, 167, 105, .25);
  border-radius: 20px;
  padding: .15rem .6rem;
  min-width: 28px;
  text-align: center;
}

/* ----- Grupas saturs ------------------------------------- */
.contacts-page .contacts-group-body {
  padding: 0 0 .5rem;
  border-top: 1px solid #eef0f7;
  animation: acc-open .18s ease;
}

@keyframes acc-open {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----- Desktop tabula ------------------------------------ */
.contacts-page .contacts-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.contacts-page .contacts-table-wrap::-webkit-scrollbar { height: 4px; }
.contacts-page .contacts-table-wrap::-webkit-scrollbar-track { background: #f5f5f5; }
.contacts-page .contacts-table-wrap::-webkit-scrollbar-thumb { background: #d8dce8; border-radius: 2px; }

.contacts-page .contacts-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: .875rem;
}
/* Pārraksta template.css un bootstrap.css  "table > thead > tr > th/td" u.c. border stilus */
.contacts-page .contacts-table > thead > tr > th,
.contacts-page .contacts-table > thead > tr > td,
.contacts-page .contacts-table > tbody > tr > th,
.contacts-page .contacts-table > tbody > tr > td,
.contacts-page .contacts-table > tfoot > tr > th,
.contacts-page .contacts-table > tfoot > tr > td {
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  border-top: none !important;
}
/* Rindas atdalītājs — tikai apakšēja līnija */
.contacts-page .contacts-table > tbody > tr > td {
  border-bottom: 1px solid #f0f1f6 !important;
}
.contacts-page .contacts-table > tbody > tr:last-child > td {
  border-bottom: none !important;
}
/* Galvenes apakšējā līnija */
.contacts-page .contacts-table > thead > tr > th {
  border-bottom: 1px solid #dde0ea !important;
}
.contacts-page .contacts-table thead tr {
  background: #f5f6fb;
  border-bottom: 1px solid #dde0ea;
}
.contacts-page .contacts-table th {
  padding: .5rem .65rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #666;
  white-space: nowrap;
  /* pārraksta tēmas/bootstrap border stilus */
  border: none !important;
  border-top: none !important;
  border-color: transparent !important;
}
.contacts-page .contacts-table td {
  padding: .55rem .65rem;
  border: none !important;
  border-bottom: 1px solid #f0f1f6 !important;
  border-top: none !important;
  border-color: #f0f1f6 !important;
  vertical-align: top;
  color: #232429;
  line-height: 1.45;
font-size: 1.2rem;
}
.contacts-page .contacts-table tbody tr:last-child td {
  border-bottom: none;
}
.contacts-page .contacts-table tbody tr:hover td {
  background: #f8f9fd;
}
.contacts-page .contacts-table tbody tr[hidden] {
  display: none;
}
.contacts-page .contacts-table td:first-child {
  color: #888;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.contacts-page .contacts-table td:nth-child(2) {
  font-weight: 500;
}
.contacts-page .contacts-table td:nth-child(3) {
  color: #555;
}
.contacts-page .contacts-table td a {
  color: #374F99;
  text-decoration: none;
  transition: color .15s;
}
.contacts-page .contacts-table td a:hover {
  color: #26a769;
  text-decoration: underline;
}

/* ----- Mobile kartiņas ----------------------------------- */
.contacts-page .contacts-cards {
  display: grid;
  gap: .5rem;
  padding: .4rem .75rem .25rem;
}
.contacts-page .contacts-cards [hidden] {
  display: none !important;
}

/* contact-card — paragraph template izveido .contact-card */
.contacts-page .contact-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: .75rem;
  padding: .75rem .65rem;
  border: 1px solid #eef0f7;
  border-radius: 8px;
  background: #fafbfe;
  transition: background .12s, border-color .12s;
}
.contacts-page .contact-card:hover {
  background: #f5f6fb;
  border-color: #c8cad8;
}

.contacts-page .contact-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef0f8, #dde0ea);
  border: 1.5px solid #c8cad8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #374F99;
  flex-shrink: 0;
  letter-spacing: -.02em;
}

.contacts-page .contact-card__header {
  width: 100%;
  min-width: 0;
}

.contacts-page .contact-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #232429;
  margin: 0 0 .2rem;
  line-height: 1.3;
}

.contacts-page .contact-card__role {
  font-size: .92rem;
  color: #555;
  margin-bottom: .4rem;
}

.contacts-page .contact-card__meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  width: 100%;
}

.contacts-page .contact-card__row {
  display: flex;
  font-size: 1.0rem;
  align-items: baseline;
  width: 100%;
  gap: .4rem;
}

.contacts-page .contact-card__row dt {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  color: #bbb;
  white-space: nowrap;
  flex-shrink: 0;
  order: 2;
  padding-top: 1px;
}

.contacts-page .contact-card__row dd {
  display: block !important;
  margin: 0 !important;
  color: #444;
  line-height: 1.4;
  order: 1;
  flex: 1;
  word-break: break-word;
  text-align: right !important;
}

/* E-pasts — garš, iet vairākās rindās */
.contacts-page .contact-card__row--email dd {
  word-break: break-all;
}

.contacts-page .contact-card__row dd a {
  color: #374F99;
  text-decoration: none;
  transition: color .15s;
}
.contacts-page .contact-card__row dd a:hover {
  color: #26a769;
  text-decoration: underline;
}

.contacts-page .contact-card__note {
  margin-top: .35rem;
  font-size: .8rem;
  color: #888;
  font-style: italic;
  border-top: 1px solid #eee;
  padding-top: .3rem;
}

/* ----- Nav rezultātu ------------------------------------ */
.contacts-page .contacts-no-results {
  text-align: center;
  padding: 3rem 1rem;
  display: none;
}
.contacts-page .contacts-no-results.visible { display: block; }
.contacts-page .contacts-no-results-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.contacts-page .contacts-no-results h3 { color: #555; font-size: 1.1rem; margin: 0 0 .3rem; }
.contacts-page .contacts-no-results p { color: #888; font-size: .9rem; }

.contacts-page .contacts-btn--export {
  text-decoration: none;
  border-color: #26a769;
  color: #26a769;
  margin-left: .25rem;
}
.contacts-page .contacts-btn--export:hover {
  background: #e8f7f0;
  border-color: #26a769;
  color: #1e8a57;
}

.contacts-page .contacts-btn--import {
  text-decoration: none;
  border-color: #c8cad0;
  color: #374F99;
  margin-left: .25rem;
}
.contacts-page .contacts-btn--import:hover {
  background: #f0f2f8;
  border-color: #374F99;
}

/* ----- Import forma (/kontakti/import) ------------------- */
.contacts-import-preview {
  background: #f0f7f4;
  border: 1px solid #26a769;
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}
.contacts-import-preview__title {
  color: #1e8a57;
  font-size: 1.1rem;
  margin: 0 0 .6rem;
}
.contacts-import-preview__stats {
  font-size: .95rem;
  margin: 0 0 1rem;
  color: #333;
}
.contacts-import-preview__warning {
  color: #b45309;
  font-size: .9rem;
  margin: .75rem 0 0;
  padding: .5rem .75rem;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 6px;
}
.contacts-import-table {
  width: 100%;
  font-size: .875rem;
  border-collapse: collapse;
  margin-bottom: .5rem;
}
.contacts-import-table th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #666;
  padding: .3rem .5rem;
  border-bottom: 1px solid #dde0ea;
}
.contacts-import-table td {
  padding: .3rem .5rem;
  border-bottom: 1px solid #f0f1f6;
  color: #333;
}

/* ----- Responsive --------------------------------------- */
@media (max-width: 899px) {
  .contacts-page .contacts-desktop { display: none; }
  .contacts-page .contacts-tools-actions { display: none; }
}
@media (min-width: 900px) {
  .contacts-page .contacts-cards { display: none; }
}
