/* Source #889: YOBB 09 – Worker account form CSS */
/* ==================================================
   YOBB – WORKER ACCOUNT
   LAYOUT CSS V4

   Shortcode:
   [yobb_worker_account_form]

   Vain rakenne + responsive.
   Visuaalinen tyyli:
   YOBB – Global Component Styles
================================================== */


/* ==================================================
   KOKONAISUUS
================================================== */

.yobb-account-wrap {
  display: grid;
  width: 100%;
  gap: var(--yobb-space-md);
}


/* ==================================================
   OTSIKKORIVI
================================================== */

.yobb-account-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--yobb-space-md);
}

.yobb-account-section-copy {
  min-width: 0;
}

.yobb-account-section-copy > .yobb-heading {
  margin: 0;
}

.yobb-account-description {
  margin: 6px 0 0;
  line-height: 1.45;
}

.yobb-account-edit-button,
.yobb-account-cancel-button {
  flex: 0 0 auto;
  white-space: nowrap;
}


/* ==================================================
   YHTEENVEDON PROFIILI
================================================== */

.yobb-account-top {
  display: grid;

  grid-template-columns:
    112px minmax(0, 1fr);

  gap: 18px;
  align-items: center;

  margin-top: var(--yobb-space-md);
}

.yobb-account-profile-image {
  display: flex;

  width: 112px;
  height: 112px;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  border: 2px solid var(--yobb-primary);
  border-radius: 50%;
}

.yobb-account-profile-image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.yobb-account-profile-image span {
  font-size: 40px;
  line-height: 1;
}

.yobb-account-main-info {
  min-width: 0;
}

.yobb-account-main-info h3 {
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}

.yobb-account-main-info p {
  margin: 0;
  overflow-wrap: anywhere;
}


/* ==================================================
   YHTEENVETOLISTA
================================================== */

.yobb-account-summary-list {
  display: grid;

  gap: var(--yobb-space-sm);

  margin-top: var(--yobb-space-md);
}

.yobb-account-summary-row {
  display: grid;

  grid-template-columns:
    190px minmax(0, 1fr);

  gap: 14px;

  align-items: start;
}

.yobb-account-summary-label,
.yobb-account-summary-value {
  min-width: 0;
  overflow-wrap: anywhere;
}


/* ==================================================
   MUOKKAUSLOMAKE
================================================== */

.yobb-account-edit-form {
  width: 100%;
}

.yobb-account-field-groups {
  display: grid;
  gap: var(--yobb-space-lg);

  margin-top: var(--yobb-space-lg);
}

.yobb-account-field-group {
  display: grid;

  gap: var(--yobb-space-md);

  padding-top: var(--yobb-space-lg);

  border-top:
    1px solid var(--yobb-border-color);
}

.yobb-account-field-group:first-child {
  padding-top: 0;
  border-top: 0;
}


/* ==================================================
   MEDIA – PROFIILIKUVA + VIDEO
================================================== */

.yobb-account-media-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: var(--yobb-space-lg);

  width: 100%;
}

.yobb-account-media-item {
  display: grid;

  min-width: 0;

  align-content: start;

  gap: var(--yobb-space-md);
}

.yobb-account-media-preview-row {
  display: grid;

  grid-template-columns:
    auto minmax(0, 1fr);

  gap: var(--yobb-space-md);

  align-items: start;

  min-width: 0;
}

.yobb-account-media-controls {
  display: grid;

  min-width: 0;

  gap: var(--yobb-space-sm);

  align-content: start;
}


/* ==================================================
   PROFIILIKUVAN ESIKATSELU
================================================== */

.yobb-account-image-preview {
  display: flex;

  width: 120px;
  height: 120px;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  flex: 0 0 auto;

  border:
    2px solid var(--yobb-primary);

  border-radius: 50%;
}

.yobb-account-image-preview img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.yobb-account-image-preview span {
  font-size: 32px;
}


/* ==================================================
   VIDEON ESIKATSELU
================================================== */

.yobb-intro-video-preview {
  position: relative;

  width: 120px;

  aspect-ratio: 9 / 16;

  overflow: hidden;

  flex: 0 0 auto;

  border:
    1px solid var(--yobb-border-color);

  border-radius:
    var(--yobb-card-radius);

  background:
    var(--yobb-text);
}

.yobb-intro-video-preview[hidden] {
  display: none !important;
}

.yobb-intro-video-preview iframe {
  display: block;

  width: 100%;
  height: 100%;

  border: 0;
}

.yobb-intro-video-meta {
  margin: 0;
}

.yobb-intro-video-progress {
  width: 100%;
}

.yobb-intro-video-progress-track {
  height: 8px;
  overflow: hidden;

  border-radius: 999px;
}

.yobb-intro-video-progress-bar {
  width: 0%;
  height: 100%;

  background: var(--yobb-primary);

  transition: width 0.15s linear;
}

.yobb-intro-video-progress-value {
  margin-top: 6px;
}

.yobb-intro-video-status {
  margin-top: 0;
}

.yobb-account-media-actions {
  display: flex;

  flex-wrap: wrap;

  gap: var(--yobb-space-sm);
}


/* ==================================================
   MUUT KENTÄT
================================================== */

.yobb-account-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: var(--yobb-space-md);
}

.yobb-account-field-full {
  grid-column: 1 / -1;
}

.yobb-account-fields {
  display: grid;
  gap: var(--yobb-space-md);
}

.yobb-account-actions {
  display: flex;

  flex-wrap: wrap;
  justify-content: flex-end;

  gap: var(--yobb-space-sm);

  margin-top: var(--yobb-space-md);
}

.yobb-account-file-input {
  width: 100%;
}


/* ==================================================
   PIILOTUS
================================================== */

.yobb-account-summary-card[hidden],
.yobb-account-edit-form[hidden],
.yobb-account-edit-button[hidden],
.yobb-account-actions [hidden],
.yobb-account-media-actions [hidden] {
  display: none !important;
}


/* ==================================================
   TABLET / KAPEAMPI DESKTOP
================================================== */

@media (max-width: 1024px) {

  .yobb-account-media-preview-row {
    grid-template-columns: 1fr;
  }

  .yobb-account-image-preview {
    width: 110px;
    height: 110px;
  }

  .yobb-intro-video-preview {
    width: 110px;
  }
}


/* ==================================================
   MOBIILI
================================================== */

@media (max-width: 767px) {

  .yobb-account-section-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .yobb-account-edit-button,
  .yobb-account-cancel-button {
    width: 100%;
  }


  .yobb-account-top {
    grid-template-columns:
      88px minmax(0, 1fr);

    gap: 14px;
  }

  .yobb-account-profile-image {
    width: 88px;
    height: 88px;
  }


  .yobb-account-summary-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }


  .yobb-account-media-grid {
    grid-template-columns: 1fr;
  }

  .yobb-account-media-preview-row {
    grid-template-columns:
      auto minmax(0, 1fr);
  }

  .yobb-account-image-preview {
    width: 96px;
    height: 96px;
  }

  .yobb-intro-video-preview {
    width: 96px;
  }


  .yobb-account-media-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .yobb-account-media-actions .yobb-btn {
    width: 100%;
  }


  .yobb-account-grid {
    grid-template-columns: 1fr;
  }

  .yobb-account-field-full {
    grid-column: auto;
  }


  .yobb-account-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .yobb-account-actions .yobb-btn {
    width: 100%;
  }
}
