/* Source #996: YOBB – Feed Share Modal CSS */
/* ==================================================
   YOBB – FEED SHARE MODAL
================================================== */


/* ==================================================
   PAPERILENNOKKI ILMAN TAUSTALAATIKKOA
================================================== */

.yobb-share-button,
.yobb-share-button:hover,
.yobb-share-button:focus,
.yobb-share-button:active {
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  color: var(--e-global-color-secondary) !important;

  box-shadow: none !important;
}


/* ==================================================
   MODAL
================================================== */

body.yobb-share-modal-open {
  overflow: hidden;
}

.yobb-share-modal[hidden] {
  display: none !important;
}

.yobb-share-modal {
  position: fixed;
  z-index: 100000;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.yobb-share-modal-backdrop {
  position: absolute;
  inset: 0;

  background:
    color-mix(
      in srgb,
      var(--e-global-color-text) 72%,
      transparent
    );

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.yobb-share-modal-panel {
  position: relative;
  z-index: 1;

  width: min(100%, 620px);
  max-height: min(82vh, 720px);
  overflow-y: auto;

  padding: 24px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--e-global-color-text) 12%,
      transparent
    );

  border-radius: 24px;

  background: var(--e-global-color-secondary);
  color: var(--e-global-color-text);

  box-shadow:
    0 24px 70px
    color-mix(
      in srgb,
      var(--e-global-color-text) 28%,
      transparent
    );

  outline: none;
}


/* ==================================================
   OTSIKKO
================================================== */

.yobb-share-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;

  padding-bottom: 18px;

  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--e-global-color-text) 10%,
      transparent
    );
}

.yobb-share-modal-eyebrow {
  margin: 0 0 4px;

  color: var(--e-global-color-primary);

  font-family:
    var(--e-global-typography-accent-font-family),
    sans-serif;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.yobb-share-modal-header h2 {
  margin: 0;

  color: var(--e-global-color-text);

  font-family:
    var(--e-global-typography-primary-font-family),
    sans-serif;

  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}

.yobb-share-modal-job-title {
  margin: 7px 0 0;

  color:
    color-mix(
      in srgb,
      var(--e-global-color-text) 68%,
      transparent
    );

  font-family:
    var(--e-global-typography-text-font-family),
    sans-serif;

  font-size: 14px;
  line-height: 1.4;
}

.yobb-share-modal-close {
  display: inline-flex;
  width: 42px;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background:
    color-mix(
      in srgb,
      var(--e-global-color-text) 6%,
      var(--e-global-color-secondary)
    );

  color: var(--e-global-color-text);

  font-family:
    var(--e-global-typography-accent-font-family),
    sans-serif;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;
}

.yobb-share-modal-close:hover,
.yobb-share-modal-close:focus-visible {
  background:
    color-mix(
      in srgb,
      var(--e-global-color-primary) 15%,
      var(--e-global-color-secondary)
    );
}


/* ==================================================
   JAKOVAIHTOEHDOT
================================================== */

.yobb-share-options {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  gap: 12px;

  padding: 22px 0;
}

.yobb-share-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 9px;

  padding: 0;

  border: 0;
  background: transparent;

  color: var(--e-global-color-text);

  font-family:
    var(--e-global-typography-text-font-family),
    sans-serif;

  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;

  cursor: pointer;
}

.yobb-share-option:hover,
.yobb-share-option:focus-visible {
  color: var(--e-global-color-primary);
}

.yobb-share-option-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--e-global-color-text) 12%,
      transparent
    );

  border-radius: 50%;

  background:
    color-mix(
      in srgb,
      var(--e-global-color-primary) 12%,
      var(--e-global-color-secondary)
    );

  color: var(--e-global-color-text);

  font-family:
    var(--e-global-typography-accent-font-family),
    sans-serif;

  font-size: 16px;
  font-weight: 800;
  line-height: 1;

  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.yobb-share-option:hover
.yobb-share-option-icon,

.yobb-share-option:focus-visible
.yobb-share-option-icon {
  transform: translateY(-2px);

  background: var(--e-global-color-primary);
  color: var(--e-global-color-secondary);
}


/* ==================================================
   LINKIN KOPIOINTI
================================================== */

.yobb-share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;

  padding: 8px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--e-global-color-text) 12%,
      transparent
    );

  border-radius: 15px;

  background:
    color-mix(
      in srgb,
      var(--e-global-color-text) 4%,
      var(--e-global-color-secondary)
    );
}

.yobb-share-link-row input {
  width: 100%;
  min-width: 0;
  height: 44px;

  margin: 0;
  padding: 0 10px;

  border: 0 !important;
  border-radius: 9px;

  background: transparent !important;
  color: var(--e-global-color-text) !important;

  font-family:
    var(--e-global-typography-text-font-family),
    sans-serif;

  font-size: 13px;

  box-shadow: none !important;
  outline: none !important;
}

.yobb-share-copy-button {
  min-height: 42px;
  padding: 10px 17px;

  border: 1px solid var(--e-global-color-primary);
  border-radius: 11px;

  background: var(--e-global-color-primary);
  color: var(--e-global-color-secondary);

  font-family:
    var(--e-global-typography-accent-font-family),
    sans-serif;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;
}

.yobb-share-copy-button:hover,
.yobb-share-copy-button:focus-visible {
  opacity: 0.9;
}

.yobb-share-copy-feedback {
  min-height: 18px;
  margin: 7px 2px 0;

  color: var(--e-global-color-primary);

  font-family:
    var(--e-global-typography-text-font-family),
    sans-serif;

  font-size: 12px;
  line-height: 1.4;
}


/* ==================================================
   MOBIILI
================================================== */

@media (max-width: 767px) {

  .yobb-share-modal {
    align-items: flex-end;
    padding: 0;
  }

  .yobb-share-modal-panel {
    width: 100%;
    max-height: 82vh;

    padding:
      20px
      16px
      calc(18px + env(safe-area-inset-bottom));

    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }

  .yobb-share-options {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .yobb-share-option-icon {
    width: 52px;
    height: 52px;
  }
}


/* ==================================================
   PIENI MOBIILI
================================================== */

@media (max-width: 420px) {

  .yobb-share-link-row {
    grid-template-columns: 1fr;
  }

  .yobb-share-copy-button {
    width: 100%;
  }
}
