/* Extra styles for the multilingual build. Does not change the original CSS (header.css/site.css).
   The language picker matches the neighbouring navigation buttons (.navlinks a). */

/* Galleries list: anchor each gallery photo to the TOP-LEFT corner (instead of the default
   centre crop), so the card window shows the top-left portion that fits. */
.gallery-card__cover img { object-position: left top; }

/* Live contact form modal (opened by the header "Contact" link). */
.op-contact {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20, 25, 35, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.op-contact__box {
  background: #fff; color: #182230;
  width: min(480px, 100%); max-height: 88vh; overflow: auto;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.op-contact__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #e2e6ee; font-size: 16px;
}
.op-contact__close { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: #667085; }
.op-contact__form { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.op-contact__field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #475467; }
.op-contact__field input, .op-contact__field textarea {
  font: inherit; font-size: 14px; color: #182230;
  padding: 9px 11px; border: 1px solid #d4dce8; border-radius: 8px; background: #fff;
}
.op-contact__field textarea { resize: vertical; min-height: 90px; }
.op-contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.op-contact__status { min-height: 18px; font-size: 13px; color: #667085; }
.op-contact__status--err { color: #c0392b; }
.op-contact__status--ok { color: #1a7f4b; }
.op-contact__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.op-contact__actions button { font: inherit; font-size: 14px; padding: 9px 16px; border-radius: 8px; cursor: pointer; border: 1px solid #d4dce8; }
.op-contact__cancel { background: #f7f9fc; color: #475467; }
.op-contact__submit { background: #69645c; color: #fff; border-color: #69645c; }
.op-contact__submit:disabled { opacity: .6; cursor: default; }

.op-lang {
  display: inline-flex;
  align-items: center;
}

.op-lang__select {
  appearance: none;
  -webkit-appearance: none;
  /* Same pill style as .navlinks a (see assets/css/header.css). */
  border: 1px solid rgba(66, 63, 57, .20);
  background-color: rgba(248, 248, 247, .70);
  color: var(--ink, #252422);
  font: inherit;
  line-height: 1.2;
  padding: 10px 32px 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
  /* Small arrow on the right (currentColor so it matches the text). */
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 1px),
    calc(100% - 12px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.op-lang__select:hover {
  transform: translateY(-1px);
  background-color: #f8f8f7;
  border-color: rgba(66, 63, 57, .34);
}

.op-lang__select:focus {
  outline: none;
  border-color: rgba(66, 63, 57, .40);
}

.op-lang__select option {
  color: #252422;
  background: #fff;
}

@media (max-width: 640px) {
  .op-lang__select {
    padding: 9px 30px 9px 11px;
    font-size: 14px;
  }
}

/* DB comment extras: round face-crop avatar (for a comment about a person) + on-demand
   "Translate" toggle. The avatar is the open photo cropped to the face box via CSS. */
.comment-card__face {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-color: rgba(107, 106, 103, 0.12);
  vertical-align: middle;
  flex: 0 0 auto;
}
.comment-card__translate {
  margin-top: 0.4rem;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  color: #69645c;
  cursor: pointer;
  text-decoration: underline;
}
.comment-card__translate:hover { opacity: 0.8; }
.comment-card__translate:disabled { opacity: 0.6; cursor: default; text-decoration: none; }

/* Add-a-language picker modal (opened by the "…" option in the language selector). */
.op-langpicker {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20, 25, 35, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.op-langpicker__box {
  background: #fff; color: #182230;
  width: min(520px, 100%); max-height: 80vh;
  border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.op-langpicker__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #e2e6ee; font-size: 16px;
}
.op-langpicker__close { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: #667085; }
.op-langpicker__hint { padding: 10px 16px; color: #667085; font-size: 13px; }
.op-langpicker__list {
  padding: 8px 12px 12px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.op-langpicker__item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 10px; border: 1px solid #d4dce8; border-radius: 8px;
  background: #f7f9fc; cursor: pointer; text-align: left; font: inherit;
}
.op-langpicker__item:hover { background: #eef3f9; }
.op-langpicker__endonym { font-weight: 600; }
.op-langpicker__english { font-size: 12px; color: #667085; }
.op-langpicker__status { padding: 0 16px 12px; color: #245edb; font-size: 13px; min-height: 18px; }

/* "Please wait" modal shown while a newly chosen language is translated. */
.op-langpicker__box--wait { width: min(360px, 100%); }
.op-langwait {
  padding: 26px 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.op-langwait__spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #d4dce8; border-top-color: #245edb;
  animation: op-spin .8s linear infinite;
}
.op-langwait__text { font-size: 15px; color: #182230; }
.op-langwait__lang { font-size: 18px; font-weight: 700; color: #245edb; }
@keyframes op-spin { to { transform: rotate(360deg); } }

.op-langwait__count { font-size: 13px; color: #667085; }
