/* =============================================================
   WP Modal — Shared Modal Styles
   Material Design elevation & animation reference
   ============================================================= */

@keyframes wp-modal-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes wp-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* =============================================================
   Content Modal  (company/team profiles)
   Trigger : [data-modal-trigger="id"]
   Dialog  : <dialog id="..." class="wp-modal">
   Close   : <button class="wp-modal__close">
   ============================================================= */

dialog.wp-modal {
  position: fixed;
  inset: 0;
  margin: 5vh auto 0;
  padding: 48px 56px 40px;
  width: min(640px, 90vw);
  max-height: 88vh;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow:
    0 8px 10px -5px rgba(0, 0, 0, 0.20),
    0 16px 24px  2px rgba(0, 0, 0, 0.14),
    0 6px  30px  5px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
  text-align: center;
}

dialog.wp-modal[open] {
  animation: wp-modal-in 220ms ease-out;
}

dialog.wp-modal::backdrop {
  background: rgba(0, 0, 0, 0.54);
  animation: wp-backdrop-in 220ms ease-out;
}

/* Close button */
.wp-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: rgba(0, 0, 0, 0.54);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.wp-modal__close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.87);
}

.wp-modal__close svg { display: block; }

/* Inner content (reuse existing team profile styles) */
dialog.wp-modal .team-lists__person-photo {
  margin: 0 auto 20px;
}

dialog.wp-modal .team-lists__person-photo img {
  width: 30%;
  margin-bottom: 15px;
}

dialog.wp-modal .team-lists__person-name {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.87);
}

dialog.wp-modal .team-lists__person-name-2022 {
  font-size: 20px;
  font-weight: 700;
}

dialog.wp-modal .team-lists__person-role {
  margin-bottom: 24px;
  font-size: 14px;
  font-style: italic;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.54);
}

dialog.wp-modal .team-lists__person-description {
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.7;
  text-align: left;
  color: rgba(0, 0, 0, 0.75);
}

dialog.wp-modal .team-lists__person-description-2022 {
  font-size: 16px;
}

dialog.wp-modal .team-lists__person-description-2022 p {
  margin-bottom: 12px;
}

dialog.wp-modal .team-lists__person-sns {
  margin-top: 16px;
}

dialog.wp-modal .team-lists__person-sns a {
  display: inline-block;
  margin: 0 8px;
  vertical-align: middle;
}

dialog.wp-modal .team-lists__person-sns a img {
  width: 25px;
  height: 25px;
}

dialog.wp-modal .team-lists__person-sns a .behance {
  width: 28px;
  height: 20px;
  margin-bottom: -5px;
}

dialog.wp-modal::-webkit-scrollbar { width: 4px; }
dialog.wp-modal::-webkit-scrollbar-track { background: transparent; }
dialog.wp-modal::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 50, 0.18);
  border-radius: 4px;
}

@media screen and (max-width: 767px) {
  dialog.wp-modal {
    padding: 40px 24px 32px;
    width: 90vw;
    margin-top: 4vh;
  }

  dialog.wp-modal .team-lists__person-description {
    font-size: 13px;
  }
}


/* =============================================================
   Lightbox  (featuresprice / careers / download previews)
   Trigger : <a href="large.png" data-lightbox>
   ============================================================= */

dialog.wp-lightbox {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  background: transparent;
  border: none;
  overflow: hidden;
}

dialog.wp-lightbox[open] {
  animation: wp-modal-in 220ms ease-out;
}

dialog.wp-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.5);
  animation: wp-backdrop-in 220ms ease-out;
}

.wp-lightbox__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 64px 24px 40px;
  box-sizing: border-box;
  gap: 16px;
}

.wp-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background 150ms ease;
}

.wp-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.wp-lightbox__close svg { display: block; }

.wp-lightbox__img {
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  border-radius: 2px;
  box-shadow:
    0 24px 38px  3px rgba(0, 0, 0, 0.14),
    0  9px 46px  8px rgba(0, 0, 0, 0.12),
    0 11px 15px -7px rgba(0, 0, 0, 0.20);
}

.wp-lightbox__caption {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.80);
  max-width: 640px;
}
