/* Source #686: WORKY 14 - Emplyoer profile overview card */
/* ==============================
   WORKY – Employer profile
   ============================== */

.worky-employer-profile-wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto 28px;
  padding: 0 16px;
  box-sizing: border-box;
}

.worky-employer-profile-card,
.worky-form-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
}

.worky-employer-profile-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.worky-employer-avatar {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: var(--e-global-color-primary, #B8DF75);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: #111;
  font-size: 34px;
  font-weight: 800;
}

.worky-employer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.worky-employer-main-info {
  flex: 1;
  min-width: 0;
}

.worky-eyebrow {
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.48);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.worky-employer-main-info h2,
.worky-form-header h3 {
  margin: 0;
  color: #111;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.worky-employer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.worky-employer-meta span {
  background: rgba(0,0,0,0.05);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  color: rgba(0,0,0,0.72);
  font-weight: 600;
}

.worky-profile-edit-toggle,
.worky-profile-cancel-toggle,
.worky-btn-primary {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.worky-employer-profile-wrap .worky-profile-edit-toggle,
.worky-employer-profile-wrap .worky-btn-primary {
  border: 1px solid var(--yobb-primary, #43C14D) !important;
  background: var(--yobb-primary, #43C14D) !important;
  color: var(--yobb-secondary, #fff) !important;
}

.worky-profile-cancel-toggle {
  background: rgba(0,0,0,0.06);
  color: #111;
}

.worky-profile-edit-toggle:hover,
.worky-profile-cancel-toggle:hover,
.worky-btn-primary:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.worky-employer-profile-wrap .worky-profile-edit-toggle:hover,
.worky-employer-profile-wrap .worky-profile-edit-toggle:focus-visible,
.worky-employer-profile-wrap .worky-btn-primary:hover,
.worky-employer-profile-wrap .worky-btn-primary:focus-visible {
  border-color: var(--yobb-primary, #43C14D) !important;
  background: var(--yobb-secondary, #fff) !important;
  color: var(--yobb-primary, #43C14D) !important;
  opacity: 1;
}

.worky-employer-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(min(180px, 100%), 1fr)
    );
  gap: 12px;
  margin-top: 24px;
}

.worky-employer-summary-grid div {
  background: rgba(0,0,0,0.035);
  border-radius: 18px;
  padding: 16px;
}

.worky-employer-summary-grid span,
.worky-employer-description span,
.worky-form-grid label span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.48);
  margin-bottom: 6px;
}

.worky-employer-summary-grid strong {
  display: block;
  color: #111;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.worky-employer-summary-grid a {
  color: #111;
  text-decoration: underline;
}

.worky-employer-description {
  margin-top: 18px;
  background: rgba(0,0,0,0.035);
  border-radius: 20px;
  padding: 18px;
}

.worky-employer-description p {
  margin: 0;
  color: rgba(0,0,0,0.76);
  line-height: 1.55;
}

.worky-employer-edit-form {
  display: none;
  margin-top: 18px;
}

.worky-employer-edit-form.is-open {
  display: block;
}

.worky-form-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.worky-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.worky-form-grid label {
  display: block;
}

.worky-form-grid input,
.worky-form-grid select,
.worky-form-grid textarea {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.12);
  background: #f7f7f7;
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 15px;
  color: #111;
  outline: none;
  box-sizing: border-box;
}

.worky-form-grid select {
  min-height: 50px;
  appearance: auto;
}

.worky-form-grid input[type="file"] {
  background: #fff;
  padding: 12px;
}

.worky-form-grid textarea {
  resize: vertical;
}

.worky-form-grid input:focus,
.worky-form-grid select:focus,
.worky-form-grid textarea:focus {
  border-color: var(--e-global-color-primary, #B8DF75);
  background: #fff;
}

.worky-form-full {
  grid-column: 1 / -1;
}

.worky-form-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
}

.worky-profile-success,
.worky-profile-error,
.worky-profile-notice {
  margin-bottom: 14px;
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 700;
}

.worky-profile-success {
  background: rgba(184,223,117,0.25);
  color: #24320f;
}

.worky-profile-error {
  border-left: 4px solid var(--yobb-accent, #8149F4);
  background:
    color-mix(
      in srgb,
      var(--yobb-accent, #8149F4) 10%,
      var(--yobb-secondary, #fff)
    );
  color: var(--yobb-text, #053D1D);
}

.worky-profile-notice {
  background: rgba(0,0,0,0.06);
  color: #111;
}

/* Locked admin-only fields */

.worky-locked-field {
  background: rgba(0,0,0,0.035);
  border: 1px dashed rgba(0,0,0,0.14);
  border-radius: 16px;
  padding: 14px 15px;
}

.worky-locked-field span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.48);
  margin-bottom: 6px;
}

.worky-locked-field strong {
  display: block;
  color: #111;
  font-size: 15px;
  margin-bottom: 4px;
}

.worky-locked-field small {
  display: block;
  color: rgba(0,0,0,0.48);
  font-size: 12px;
  line-height: 1.35;
}

/* YOBB profile image picker */

.worky-field-label {
  display: block;
  margin-bottom: 6px;
  color:
    color-mix(
      in srgb,
      var(--yobb-text, #053D1D) 62%,
      transparent
    );
  font-size: 13px;
  font-weight: 700;
}

.worky-profile-image-picker {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: var(--yobb-space-md, 16px);
  min-width: 0;
  padding: var(--yobb-space-md, 16px);
  border:
    1px solid
    color-mix(
      in srgb,
      var(--yobb-primary, #43C14D) 32%,
      var(--yobb-border-color, #d9e1dc)
    );
  border-left: 4px solid var(--yobb-primary, #43C14D);
  border-radius: var(--yobb-card-radius, 14px);
  background:
    color-mix(
      in srgb,
      var(--yobb-primary, #43C14D) 4%,
      var(--yobb-secondary, #fff)
    );
}

.worky-profile-image-preview {
  display: flex;
  width: 104px;
  height: 104px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--yobb-primary, #43C14D);
  border-radius: var(--yobb-card-radius, 14px);
  background:
    color-mix(
      in srgb,
      var(--yobb-primary, #43C14D) 12%,
      var(--yobb-secondary, #fff)
    );
  color: var(--yobb-text, #053D1D);
  font-size: 34px;
  font-weight: 800;
}

.worky-profile-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.worky-profile-image-copy {
  min-width: 0;
}

.worky-profile-image-copy > strong {
  display: block;
  color: var(--yobb-text, #053D1D);
  font-size: 16px;
  line-height: 1.25;
}

.worky-profile-image-copy > p {
  margin: 5px 0 12px;
  color:
    color-mix(
      in srgb,
      var(--yobb-text, #053D1D) 62%,
      transparent
    );
  font-size: 13px;
  line-height: 1.45;
}

.worky-profile-image-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yobb-space-sm, 10px);
}

.worky-employer-profile-wrap .worky-file-button {
  display: inline-flex !important;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 10px 16px;
  border: 1px solid var(--yobb-primary, #43C14D);
  border-radius: var(--yobb-button-radius, 12px);
  background: var(--yobb-primary, #43C14D) !important;
  color: var(--yobb-secondary, #fff) !important;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.worky-employer-profile-wrap .worky-file-button:hover,
.worky-employer-profile-wrap .worky-file-button:focus-within {
  background: var(--yobb-secondary, #fff) !important;
  color: var(--yobb-primary, #43C14D) !important;
}

.worky-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.worky-file-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--yobb-text, #053D1D);
  font-size: 13px;
  font-weight: 600;
}

/* Mobile */

@media (max-width: 780px) {
  .worky-employer-profile-wrap {
    padding: 0 12px;
  }

  .worky-employer-profile-card,
  .worky-form-card {
    padding: 22px;
    border-radius: 24px;
  }

  .worky-employer-profile-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .worky-profile-edit-toggle {
    width: 100%;
  }

  .worky-employer-summary-grid,
  .worky-form-grid {
    grid-template-columns: 1fr;
  }

  .worky-form-header {
    flex-direction: column;
  }

  .worky-profile-cancel-toggle,
  .worky-btn-primary {
    width: 100%;
  }

  .worky-form-actions {
    justify-content: stretch;
  }

  .worky-profile-image-picker {
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    padding: 14px;
  }

  .worky-profile-image-preview {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 480px) {
  .worky-profile-image-picker {
    grid-template-columns: 1fr;
  }

  .worky-profile-image-preview {
    width: 104px;
    height: 104px;
  }

  .worky-profile-image-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .worky-file-button {
    width: 100%;
  }
}
