/* EOTF single credential v19
   Mobile-first robust composition:
   - photo on the left, logo + kicker + stacked name on the right
   - meta fields below
   - language switch on the left, primary action on the right
   - LinkedIn button highlighted in LinkedIn blue
   - icons added to action buttons
*/

.eotf-single-credential {
  position: fixed;
  inset: 0;
  z-index: 999;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 28px);
  background: rgba(8, 8, 8, 0.84);
  color: #f7f7f4;
  font-family: var(--font-sans, "Montserrat Armenian", Arial, sans-serif);
}

.eotf-single-credential:before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 88px 88px;
  pointer-events: none;
}

.eotf-single-credential.light {
  background: rgba(246, 244, 239, 0.96);
  color: #111;
}

.eotf-single-credential.light:before {
  opacity: .34;
  background-image:
    linear-gradient(rgba(0,0,0,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.06) 1px, transparent 1px);
}

.eotf-single-card {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100dvh - 2 * clamp(12px, 2vw, 28px));
  overflow: auto;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 30px;
  background: rgba(8, 8, 8, 0.78);
  box-shadow: 0 30px 100px rgba(0,0,0,.34);
  padding: clamp(22px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eotf-single-credential.light .eotf-single-card {
  background: rgba(255,255,255,.96);
  border-color: #d8d6cf;
  box-shadow: 0 24px 80px rgba(0,0,0,.08);
}

.eotf-single-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: inherit;
  display: grid;
  place-items: center;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.eotf-single-credential.light .eotf-single-close {
  background: #fff;
  border-color: #d8d6cf;
}

.eotf-single-top {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: center;
}

.eotf-single-photo {
  min-height: 360px;
  height: 100%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 28px;
  background: rgba(255,255,255,.04);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.eotf-single-credential.light .eotf-single-photo {
  border-color: #d8d6cf;
  background: #fff;
}

.eotf-single-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.eotf-single-photo span {
  font-size: 84px;
  line-height: 1;
  color: #ff5a1f;
  font-weight: 900;
}

.eotf-single-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-right: 46px;
}

.eotf-single-logo {
  width: clamp(210px, 28vw, 340px);
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 12px;
}

.eotf-single-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ff5a1f;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .12em;
  margin-bottom: 10px;
}

.eotf-single-kicker:before {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
}

.eotf-single-name {
  margin: 0;
  font-size: clamp(36px, 5.3vw, 82px);
  line-height: .9;
  letter-spacing: -.06em;
}

.eotf-single-name span {
  display: block;
  margin: 0;
}

.eotf-single-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eotf-single-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.eotf-single-meta div {
  min-width: 0;
  min-height: 82px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eotf-single-credential.light .eotf-single-meta div,
.eotf-single-credential.light .eotf-transcript-lang > div,
.eotf-single-credential.light .eotf-single-actions a,
.eotf-single-credential.light .eotf-single-actions button {
  border-color: #d8d6cf;
}

.eotf-single-meta small,
.eotf-transcript-lang > small {
  display: block;
  color: #9b9b9b;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
  margin-bottom: 7px;
}

.eotf-single-meta b {
  display: block;
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.eotf-single-toolbar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.eotf-transcript-lang {
  min-width: 0;
}

.eotf-transcript-lang > div {
  display: inline-grid;
  grid-template-columns: repeat(3, 52px);
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}

.eotf-single-credential.light .eotf-transcript-lang > div {
  background: #fff;
}

.eotf-transcript-lang button {
  height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  font-weight: 900;
  font-size: 11px;
  cursor: pointer;
}

.eotf-transcript-lang button.active {
  background: #ff5a1f;
  color: #111;
}

.eotf-single-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.eotf-single-actions-primary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eotf-single-actions-primary-row .primary {
  width: 100%;
}

.eotf-single-actions a,
.eotf-single-actions button {
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  color: inherit;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 850;
  font-size: 12px;
  line-height: 1.15;
  cursor: pointer;
}

.eotf-single-credential.light .eotf-single-actions a,
.eotf-single-credential.light .eotf-single-actions button {
  background: #fff;
}

.eotf-single-actions .primary {
  background: #ff5a1f;
  border-color: #ff5a1f;
  color: #111;
}

.eotf-single-actions .linkedin-btn {
  grid-column: 1 / -1;
  background: #0A66C2;
  border-color: #0A66C2;
  color: #fff;
}

.eotf-single-credential.light .eotf-single-actions .linkedin-btn {
  background: #0A66C2;
  border-color: #0A66C2;
  color: #fff;
}

.eotf-single-actions .linkedin-btn .eotf-btn-icon,
.eotf-single-credential.light .eotf-single-actions .linkedin-btn .eotf-btn-icon {
  color: #fff;
}

.eotf-btn-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.eotf-btn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.eotf-btn-label {
  min-width: 0;
}

.eotf-single-note {
  margin: 2px 0 0;
  color: #9b9b9b;
  font-size: 13px;
  line-height: 1.45;
}

.eotf-single-error {
  position: relative;
  max-width: 620px;
  border: 1px solid #ff5a1f66;
  border-radius: 22px;
  background: #ff5a1f14;
  padding: 56px 30px 30px;
  text-align: center;
}

.eotf-single-error h1 {
  margin: 0 0 10px;
}

@media (max-width: 900px) {
  .eotf-single-card {
    width: min(820px, 100%);
  }

  .eotf-single-top {
    grid-template-columns: minmax(150px, 37%) minmax(0, 1fr);
    gap: 16px;
  }

  .eotf-single-photo {
    min-height: 0;
    height: clamp(200px, 31vh, 290px);
    border-radius: 24px;
  }

  .eotf-single-heading {
    padding-right: 40px;
  }

  .eotf-single-logo {
    width: min(190px, 48vw);
    max-height: 38px;
    margin-bottom: 10px;
  }

  .eotf-single-kicker {
    font-size: 9px;
    gap: 8px;
    margin-bottom: 8px;
  }

  .eotf-single-kicker:before {
    width: 28px;
  }

  .eotf-single-name {
    font-size: clamp(28px, 8vw, 54px);
  }

  .eotf-single-meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .eotf-single-meta div {
    min-height: 64px;
    padding: 9px 12px;
    text-align: center;
  }

  .eotf-single-meta small,
  .eotf-transcript-lang > small {
    margin-bottom: 4px;
    font-size: 7px;
  }

  .eotf-single-meta b {
    font-size: clamp(15px, 4vw, 20px);
  }

  .eotf-single-toolbar {
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: 10px;
  }

  .eotf-transcript-lang > div {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .eotf-transcript-lang button {
    height: 36px;
    font-size: 10px;
  }

  .eotf-single-actions a,
  .eotf-single-actions button {
    min-height: 44px;
    font-size: 10px;
    border-radius: 14px;
    padding: 9px 10px;
  }

  .eotf-single-note {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .eotf-single-credential {
    padding: 10px;
    place-items: stretch;
  }

  .eotf-single-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 16px 14px 18px;
    gap: 12px;
    border-radius: 24px;
    margin: auto;
  }

  .eotf-single-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 26px;
  }

  .eotf-single-top {
    grid-template-columns: minmax(120px, 40%) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }

  .eotf-single-photo {
    height: clamp(164px, 29vh, 230px);
    border-radius: 20px;
  }

  .eotf-single-heading {
    padding-right: 36px;
  }

  .eotf-single-logo {
    width: min(176px, 46vw);
    max-height: 34px;
    margin-bottom: 8px;
  }

  .eotf-single-kicker {
    font-size: clamp(6px, 1.8vw, 8px);
    gap: 6px;
    margin-bottom: 6px;
  }

  .eotf-single-kicker:before {
    width: 22px;
  }

  .eotf-single-name {
    font-size: clamp(22px, 7.9vw, 42px);
    line-height: .88;
  }

  .eotf-single-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
    gap: 10px;
    align-items: end;
  }

  .eotf-single-actions {
    gap: 8px;
  }

  .eotf-single-actions a,
  .eotf-single-actions button {
    min-height: 42px;
    font-size: clamp(9px, 2.65vw, 11px);
    gap: 8px;
  }

  .eotf-btn-icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  .eotf-single-note {
    font-size: clamp(8px, 2.4vw, 10px);
    line-height: 1.35;
  }
}

@media (max-width: 430px) {
  .eotf-single-card {
    padding: 14px 12px 16px;
    gap: 10px;
    border-radius: 22px;
  }

  .eotf-single-top {
    grid-template-columns: minmax(114px, 39%) minmax(0, 1fr);
    gap: 12px;
  }

  .eotf-single-photo {
    height: clamp(150px, 27vh, 210px);
    border-radius: 18px;
  }

  .eotf-single-heading {
    padding-right: 30px;
  }

  .eotf-single-logo {
    width: min(158px, 44vw);
    max-height: 30px;
    margin-bottom: 6px;
  }

  .eotf-single-kicker {
    font-size: 6px;
    margin-bottom: 4px;
  }

  .eotf-single-name {
    font-size: clamp(19px, 7.3vw, 34px);
  }

  .eotf-single-meta div {
    min-height: 58px;
    border-radius: 13px;
    padding: 8px 10px;
  }

  .eotf-single-meta small,
  .eotf-transcript-lang > small {
    font-size: 6px;
  }

  .eotf-single-meta b {
    font-size: clamp(14px, 4vw, 17px);
  }

  .eotf-single-toolbar {
    grid-template-columns: minmax(0, 112px) minmax(0, 1fr);
    gap: 8px;
  }

  .eotf-transcript-lang > div {
    padding: 4px;
    border-radius: 14px;
    gap: 4px;
  }

  .eotf-transcript-lang button {
    height: 32px;
    font-size: 9px;
    border-radius: 10px;
  }

  .eotf-single-actions {
    gap: 7px;
  }

  .eotf-single-actions a,
  .eotf-single-actions button {
    min-height: 40px;
    border-radius: 12px;
    padding: 8px 8px;
    font-size: 9px;
    gap: 7px;
  }

  .eotf-btn-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }
}

@media (max-height: 760px) {
  .eotf-single-card {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .eotf-single-top {
    gap: 12px;
  }

  .eotf-single-photo {
    height: clamp(138px, 23vh, 190px);
  }

  .eotf-single-name {
    font-size: clamp(18px, 6.4vw, 30px);
  }

  .eotf-single-meta div {
    min-height: 52px;
  }

  .eotf-single-actions a,
  .eotf-single-actions button {
    min-height: 38px;
  }
}

@media print {
  .eotf-single-credential {
    position: static;
    inset: auto;
    background: #fff !important;
    color: #000 !important;
    width: auto;
    height: auto;
    overflow: visible;
    padding: 0;
  }

  .eotf-single-credential:before,
  .eotf-single-close,
  .eotf-transcript-lang,
  .eotf-single-actions,
  .eotf-single-note {
    display: none !important;
  }

  .eotf-single-card {
    width: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff !important;
    padding: 0;
  }

  .eotf-single-top {
    grid-template-columns: 240px 1fr;
  }

  .eotf-single-photo {
    background: #f2f2f2;
  }
}

/* v20 - Desktop credential spacing fix.
   Adds breathing space between the left photo block and the right content block
   only on desktop/large screens, without affecting mobile layout. */
@media (min-width: 901px) {
  .eotf-single-card {
    width: min(1240px, calc(100vw - 72px)) !important;
    padding: clamp(28px, 2.6vw, 46px) !important;
    gap: clamp(22px, 2vw, 34px) !important;
  }

  .eotf-single-top {
    grid-template-columns: minmax(340px, 430px) minmax(0, 1fr) !important;
    gap: clamp(52px, 5.2vw, 92px) !important;
    align-items: center !important;
  }

  .eotf-single-photo {
    min-height: clamp(380px, 43vh, 520px) !important;
    border-radius: 30px !important;
  }

  .eotf-single-heading {
    padding-right: clamp(42px, 3.5vw, 72px) !important;
  }

  .eotf-single-info {
    padding-left: calc(clamp(52px, 5.2vw, 92px) + min(430px, 34vw)) !important;
  }
}

/* v20 - Large desktop refinement: more air, but keep popup centered. */
@media (min-width: 1400px) {
  .eotf-single-card {
    width: min(1320px, calc(100vw - 112px)) !important;
  }

  .eotf-single-top {
    grid-template-columns: minmax(380px, 480px) minmax(0, 1fr) !important;
    gap: clamp(70px, 5.8vw, 112px) !important;
  }

  .eotf-single-info {
    padding-left: calc(clamp(70px, 5.8vw, 112px) + min(480px, 35vw)) !important;
  }
}


/* =========================================================
   EOTF v27 - Compact desktop credential popup
   MacBook 13/14/15 inch browser heights often stay under 820px.
   This layout keeps the whole credential popup on one screen:
   left photo spans the full height, right side contains heading + fields + actions.
   Mobile rules above remain untouched.
   ========================================================= */

@media (min-width:901px) and (max-height:860px) {
  .eotf-single-credential {
    padding: clamp(18px, 2vw, 34px) !important;
  }

  .eotf-single-card {
    width: min(1260px, calc(100vw - 84px)) !important;
    height: min(650px, calc(100dvh - 72px)) !important;
    max-height: calc(100dvh - 72px) !important;
    padding: clamp(22px, 2.1vw, 32px) !important;
    display: grid !important;
    grid-template-columns: minmax(330px, 41%) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: clamp(38px, 4vw, 72px) !important;
    overflow: hidden !important;
  }

  .eotf-single-top {
    display: contents !important;
  }

  .eotf-single-photo {
    grid-column: 1 !important;
    grid-row: 1 / -1 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 26px !important;
  }

  .eotf-single-photo img {
    border-radius: 26px !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .eotf-single-heading {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: end !important;
    padding: 0 48px 0 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
  }

  .eotf-single-logo {
    width: clamp(190px, 17vw, 260px) !important;
    max-height: 36px !important;
    margin: 0 0 9px !important;
  }

  .eotf-single-kicker {
    margin-bottom: 7px !important;
    font-size: 8.5px !important;
    line-height: 1 !important;
    gap: 8px !important;
  }

  .eotf-single-kicker:before {
    width: 30px !important;
  }

  .eotf-single-name {
    font-size: clamp(34px, 3.65vw, 54px) !important;
    line-height: .88 !important;
    letter-spacing: -.06em !important;
  }

  .eotf-single-info {
    grid-column: 2 !important;
    grid-row: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
    align-self: start !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-height: 0 !important;
  }

  .eotf-single-meta {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  .eotf-single-meta div {
    min-height: 54px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
  }

  .eotf-single-meta small,
  .eotf-transcript-lang > small {
    margin-bottom: 3px !important;
    font-size: 6.4px !important;
    line-height: 1.05 !important;
    letter-spacing: .08em !important;
  }

  .eotf-single-meta b {
    font-size: 13.5px !important;
    line-height: 1.1 !important;
  }

  .eotf-single-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 160px) minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: end !important;
  }

  .eotf-transcript-lang > div {
    width: 100% !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 12px !important;
  }

  .eotf-transcript-lang button {
    height: 30px !important;
    border-radius: 9px !important;
    font-size: 8px !important;
  }

  .eotf-single-actions {
    gap: 7px !important;
  }

  .eotf-single-actions a,
  .eotf-single-actions button {
    min-height: 34px !important;
    border-radius: 11px !important;
    padding: 7px 9px !important;
    font-size: 8.5px !important;
    line-height: 1.08 !important;
    gap: 7px !important;
  }

  .eotf-single-actions .primary {
    min-height: 34px !important;
  }

  .eotf-single-actions .linkedin-btn {
    min-height: 36px !important;
  }

  .eotf-btn-icon {
    width: 13px !important;
    height: 13px !important;
    flex-basis: 13px !important;
  }

  .eotf-single-note {
    margin: 1px 0 0 !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }
}

@media (min-width:1400px) and (max-height:860px) {
  .eotf-single-card {
    width: min(1340px, calc(100vw - 112px)) !important;
    grid-template-columns: minmax(380px, 43%) minmax(0, 1fr) !important;
    gap: clamp(58px, 5.2vw, 92px) !important;
  }

  .eotf-single-name {
    font-size: clamp(36px, 3.5vw, 56px) !important;
  }
}

@media (min-width:901px) and (max-height:720px) {
  .eotf-single-card {
    height: min(590px, calc(100dvh - 58px)) !important;
    padding: 20px !important;
    grid-template-columns: minmax(300px, 39%) minmax(0, 1fr) !important;
    gap: 44px !important;
  }

  .eotf-single-logo {
    width: clamp(175px, 15vw, 230px) !important;
    max-height: 32px !important;
  }

  .eotf-single-name {
    font-size: clamp(30px, 3.3vw, 48px) !important;
  }

  .eotf-single-meta div {
    min-height: 48px !important;
  }

  .eotf-single-actions a,
  .eotf-single-actions button {
    min-height: 31px !important;
  }
}

/* =========================================================
   EOTF v31 - Guaranteed viewport fit
   The credential card is measured by public-single-credential.js and scaled
   only when its natural dimensions are larger than the visible viewport.
   This removes both page and card scrolling without clipping any controls.
   ========================================================= */

@media screen {
  html.eotf-credential-open,
  body.eotf-credential-open {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  .eotf-single-credential {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  .eotf-single-card {
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    zoom: var(--eotf-credential-fit, 1);
  }

  .eotf-single-name {
    max-width: 100% !important;
  }

  .eotf-single-name span {
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
}

@supports not (zoom: 1) {
  @media screen {
    .eotf-single-card {
      transform: scale(var(--eotf-credential-fit, 1));
      transform-origin: center center;
    }
  }
}

@media screen and (max-width: 900px) {
  .eotf-single-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .eotf-single-meta div {
    min-height: 58px !important;
    padding: 8px 9px !important;
  }

  .eotf-single-meta small {
    font-size: clamp(5.5px, 1.55vw, 7px) !important;
  }

  .eotf-single-meta b {
    font-size: clamp(10px, 2.9vw, 15px) !important;
  }
}

@media screen and (max-width: 430px) {
  .eotf-single-meta {
    gap: 5px !important;
  }

  .eotf-single-meta div {
    min-height: 54px !important;
    border-radius: 12px !important;
    padding: 7px 6px !important;
  }

  .eotf-single-meta small {
    font-size: 5.5px !important;
    letter-spacing: .055em !important;
  }

  .eotf-single-meta b {
    font-size: clamp(9px, 2.75vw, 12px) !important;
  }
}
