/* YOBB 312–314: safety, company media and resilient forms */

.yobb-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--yobb-primary, #3ac64b) 48%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--yobb-primary, #3ac64b) 12%, #fff);
  color: var(--yobb-text, #003d2d);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.yobb-verified-badge > span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--yobb-primary, #3ac64b);
  color: #fff;
}

.yobb-feed-employer-bar .yobb-verified-badge {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 10px;
}

.yobb-feed-employer-bar .yobb-verified-badge > span {
  width: 14px;
  height: 14px;
}

.yobb-security-center,
.yobb-company-media-manager {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  min-width: 0;
  margin-top: 22px;
}

.yobb-security-center > *,
.yobb-company-media-manager > *,
.yobb-company-gallery-form,
.yobb-company-gallery-editor,
.yobb-company-video-editor {
  min-width: 0;
  max-width: 100%;
}

.yobb-company-media-manager input[type="file"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.yobb-security-center__head h2,
.yobb-company-media-manager h2 {
  margin: 0;
}

.yobb-security-form,
.yobb-security-delete-form,
.yobb-report-form {
  display: grid;
  gap: 14px;
}

.yobb-security-form label,
.yobb-security-delete-form label,
.yobb-report-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.yobb-security-form select,
.yobb-security-delete-form input,
.yobb-report-form select,
.yobb-report-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--yobb-primary, #3ac64b) 45%, #cfd8d2);
  border-radius: 14px;
  background: #fff;
  color: var(--yobb-text, #003d2d);
}

.yobb-security-details {
  border: 1px solid color-mix(in srgb, var(--yobb-primary, #3ac64b) 26%, #dfe6e1);
  border-radius: 16px;
  background: #fff;
}

.yobb-security-details > summary,
.yobb-safety-actions > summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
}

.yobb-security-details > *:not(summary),
.yobb-safety-actions__body {
  margin: 0 16px 16px;
}

.yobb-security-blocked-list {
  display: grid;
  gap: 10px;
}

.yobb-security-blocked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.yobb-security-details--danger {
  border-color: #efb5ae;
}

.yobb-security-danger-button {
  border-color: #b42318 !important;
  background: #b42318 !important;
  color: #fff !important;
}

.yobb-safety-actions {
  width: min(100%, 560px);
  margin: 18px auto 0;
  border: 1px solid #dfe6e1;
  border-radius: 16px;
  background: #fff;
}

.yobb-safety-actions__body {
  display: grid;
  gap: 16px;
}

.yobb-company-gallery-editor,
.yobb-company-public__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.yobb-company-gallery-editor__item {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dfe6e1;
  border-radius: 16px;
  background: #fff;
  font-weight: 700;
}

.yobb-company-gallery-editor img,
.yobb-company-public__gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 13px;
  object-fit: cover;
}

.yobb-company-video-editor,
.yobb-company-public__media {
  display: grid;
  gap: 14px;
}

.yobb-company-video-preview,
.yobb-company-public__video {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #003d2d;
  aspect-ratio: 16 / 9;
}

.yobb-company-video-preview iframe,
.yobb-company-public__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yobb-company-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.yobb-video-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe6e1;
}

.yobb-video-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--yobb-primary, #3ac64b);
  transition: width .2s ease;
}

.yobb-draft-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--yobb-primary, #3ac64b) 45%, #dfe6e1);
  border-radius: 15px;
  background: #f4fbf4;
  font-weight: 800;
}

.yobb-draft-notice > div {
  display: flex;
  gap: 8px;
}

.yobb-draft-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #547065;
  font-size: 13px;
}

.yobb-connection-status {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 99999;
  max-width: calc(100vw - 28px);
  padding: 11px 16px;
  border-radius: 999px;
  background: #003d2d;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.yobb-connection-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.yobb-connection-status.is-offline {
  background: #8a3b12;
}

@media (max-width: 640px) {
  .yobb-company-gallery-editor,
  .yobb-company-public__gallery {
    grid-template-columns: 1fr;
  }

  .yobb-security-form .yobb-btn,
  .yobb-security-data-actions .yobb-btn,
  .yobb-company-gallery-form > .yobb-btn,
  .yobb-company-video-actions .yobb-btn {
    width: 100%;
  }

  .yobb-company-video-actions,
  .yobb-draft-notice,
  .yobb-draft-notice > div,
  .yobb-security-blocked-item {
    display: grid;
    grid-template-columns: 1fr;
  }
}

