/* 
 * CareerNest - Single Employer Profile Styles
 * Modern profile layout with gradient banner design (matching applicant profile)
 */

/* Container */
.cn-employer-profile {
  min-height: 100vh;
  padding: 0;
}

.cn-employer-container {
  max-width: 100%;
  margin: 0 auto;
}

/* ==========================================
   PROFILE HEADER - Modern Design
   ========================================== */

.cn-profile-header-wrapper {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin: 2rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cn-profile-banner {
  height: 132px;
  background: linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.2) 0%,
      transparent 30%,
      transparent 70%,
      rgba(0, 0, 0, 0.2) 100%
    ),
    var(--cn-primary-btn);
  position: relative;
}

.cn-profile-header-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 3rem 2.5rem 3rem;
  gap: 2rem;
}

/* Left Section - Logo and Info */
.cn-profile-left-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}

.cn-company-logo-wrapper {
  margin-top: -80px;
  position: relative;
  z-index: 10;
  background: #fff;
  border-radius: 999px;
}

.cn-company-logo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: contain;
  border: 6px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cn-company-logo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
  border: 6px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: bold;
  color: #666;
}

/* ── Owner-only logo edit overlay (1.11.0) ──────────────────────────
   Shown only when [data-cn-employer-logo-editable="1"] is set on the
   wrapper (owner viewing own profile). On desktop the overlay is
   hidden until hover; on touch devices it's a small persistent badge
   in the bottom-right (since :hover doesn't exist there). Mirrors the
   applicant avatar pattern. */
.cn-employer-logo-edit-overlay {
  position: absolute;
  inset: 6px; /* match the 6px border on the logo so the overlay sits
                 inside the white ring, not on top of it */
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease;
  font-family: inherit;
  padding: 0;
  z-index: 2;
}

.cn-employer-logo-edit-overlay:focus-visible {
  outline: 2px solid var(--cn-primary-btn, #0073aa);
  outline-offset: 4px;
}

.cn-company-logo-wrapper[data-cn-employer-logo-editable="1"]:hover
  .cn-employer-logo-edit-overlay,
.cn-company-logo-wrapper[data-cn-employer-logo-editable="1"]:focus-within
  .cn-employer-logo-edit-overlay {
  opacity: 1;
}

.cn-employer-logo-edit-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Touch devices — keep the camera icon always visible as a small badge
   in the bottom-right (hover doesn't exist on touch). */
@media (hover: none) {
  .cn-employer-logo-edit-overlay {
    opacity: 1;
    inset: auto -2px -2px auto;
    width: 44px;
    height: 44px;
    background: var(--cn-primary-btn, #0073aa);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    flex-direction: row;
    gap: 0;
  }

  .cn-employer-logo-edit-label {
    display: none;
  }
}

/* Loading state — dim the logo and show animated dots while uploading. */
.cn-company-logo-wrapper.cn-employer-logo-uploading .cn-company-logo,
.cn-company-logo-wrapper.cn-employer-logo-uploading .cn-company-logo-placeholder {
  opacity: 0.4;
  filter: blur(1px);
}

.cn-company-logo-wrapper.cn-employer-logo-uploading .cn-employer-logo-edit-overlay {
  opacity: 0;
  pointer-events: none;
}

.cn-employer-logo-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 50%;
  z-index: 3;
}

.cn-employer-logo-spinner[hidden] {
  display: none !important;
}

.cn-employer-logo-spinner span {
  width: 8px;
  height: 8px;
  background: var(--cn-primary-btn, #0073aa);
  border-radius: 50%;
  animation: cn-employer-logo-bounce 1s infinite ease-in-out;
}

.cn-employer-logo-spinner span:nth-child(2) {
  animation-delay: 0.15s;
}
.cn-employer-logo-spinner span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes cn-employer-logo-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.cn-company-info {
  flex: 1;
  text-align: left;
}

.cn-company-name {
  font-size: 26px;
  font-weight: 700;
  font-style: normal;
  margin: 0 0 0.75rem 0;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  line-height: 132%;
  letter-spacing: 0%;
  text-transform: capitalize;
}

/* Legacy "Edit Profile" link — moved into the banner top-right in 1.13.1.
   Frosted-glass style so it's readable against any brand-coloured banner
   gradient. Pill shape with icon + label so it reads as a deliberate CTA
   rather than a confusing second pencil next to the inline-edit one. */
.cn-owner-edit-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease, box-shadow 0.15s ease;
  z-index: 2;
}

.cn-owner-edit-btn:hover,
.cn-owner-edit-btn:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cn-owner-edit-btn svg {
  flex-shrink: 0;
}

/* On phones, drop the label and shrink to icon-only — saves space and
   keeps the touch target square + thumb-friendly. */
@media (max-width: 600px) {
  .cn-owner-edit-btn {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    justify-content: center;
  }
  .cn-owner-edit-btn-label {
    display: none;
  }
}

.cn-company-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cn-location-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #666;
  font-size: 0.875rem;
}

.cn-location-item svg {
  color: #666;
  width: 16px;
  height: 16px;
}

/* Contact Section */
.cn-profile-contact-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cn-contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cn-contact-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cn-contact-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.cn-contact-icon svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.cn-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.cn-contact-label {
  font-size: 0.75rem;
  color: #888;
  font-weight: 500;
}

.cn-contact-value {
  font-size: 0.875rem;
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.cn-contact-value:hover {
  color: var(--cn-primary-btn);
  text-decoration: underline;
}

/* ==========================================
   PROFILE BODY
   ========================================== */

.cn-profile-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  padding: 0 1rem 2rem 1rem;
}

.cn-profile-main {
  min-width: 0;
}

/* Profile Sections */
.cn-profile-section {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cn-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--cn-primary-btn);
}

.cn-section-content {
  color: #444;
  line-height: 1.7;
}

.cn-section-content p {
  margin: 0;
}

/* Read More/Less Links */
.cn-read-more-link,
.cn-read-less-link {
  color: var(--cn-primary-btn);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  display: inline;
  margin-left: 0.25rem;
}

.cn-read-more-link:hover,
.cn-read-less-link:hover {
  text-decoration: underline;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.cn-profile-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

/* Profile Completeness */
.cn-profile-completeness {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.cn-completeness-meter {
  margin-bottom: 1.25rem;
}

.cn-meter-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.cn-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.cn-meter-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cn-percentage {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
}

.cn-status {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cn-profile-tips {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.cn-tips-header {
  font-size: 0.875rem;
  color: #666;
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.cn-missing-fields {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cn-missing-fields li {
  font-size: 0.875rem;
  color: #444;
  padding: 0.25rem 0;
}

.cn-profile-complete {
  margin: 1rem 0 0 0;
  padding: 0.75rem 1rem;
  background: #f0fdf4;
  color: #16a34a;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.cn-sidebar-card {
  background: #fafafa;
  border: 1px solid #dadada;
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: none;
}

.cn-sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

.cn-sidebar-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.cn-sidebar-item:last-child {
  margin-bottom: 0;
}

.cn-sidebar-icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eeeeee;
  border-radius: 999px;
}

.cn-sidebar-icon svg {
  width: 28px;
  height: 28px;
}

.cn-sidebar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cn-sidebar-label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cn-sidebar-value {
  font-size: 18px;
  color: #1a1a1a;
  font-weight: 600;
  line-height: 1.4;
}

.cn-sidebar-link {
  font-size: 0.95rem;
  color: var(--cn-primary-btn);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cn-sidebar-link:hover {
  color: var(--cn-primary-btn);
  text-decoration: underline;
  opacity: 0.8;
}

/* Current Openings Section */
.cn-employer-jobs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cn-related-job-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cn-related-job-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.cn-related-job-card-top {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.cn-related-job-card__img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.cn-related-job-card__img-placeholder {
  width: 50px;
  height: 50px;
  background: #e0e0e0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.cn-related-job-card__title {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.cn-related-job-card__title a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

.cn-related-job-card__title a:hover {
  color: var(--cn-primary-btn);
  text-decoration: underline;
}

.cn-related-job-card__company,
.cn-related-job-card__location {
  color: #666;
  font-size: 0.85rem;
}

.cn-related-job-card__salary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
}

.cn-related-job-card__salary svg {
  flex-shrink: 0;
}

.cn-related-job-card hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 1rem 0;
}

.cn-related-job-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cn-related-job-card__modified {
  color: #999;
  font-size: 0.8rem;
}

.cn-view-more-jobs {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--cn-primary-btn);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.cn-view-more-jobs:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: white;
}

.no-current-jobs {
  color: #666;
  font-style: italic;
  margin: 1rem 0;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1024px) {
  .cn-profile-header-content {
    padding: 0 2rem 2rem 2rem;
  }

  .cn-profile-body {
    grid-template-columns: 1fr;
  }

  .cn-profile-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .cn-profile-banner {
    height: 140px;
  }

  .cn-profile-header-content {
    flex-direction: column;
    padding: 0 1.5rem 2rem 1.5rem;
    gap: 1.5rem;
  }

  .cn-profile-left-section {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }

  .cn-company-logo-wrapper {
    margin-top: -70px;
  }

  .cn-company-logo,
  .cn-company-logo-placeholder {
    width: 140px;
    height: 140px;
  }

  .cn-company-logo-placeholder span {
    font-size: 3.5rem;
  }

  .cn-company-name {
    font-size: 2rem;
    justify-content: flex-start;
  }

  .cn-company-meta {
    justify-content: flex-start;
  }

  .cn-profile-contact-section {
    grid-template-columns: repeat(3, auto);
    justify-content: flex-start;
    width: 100%;
    padding-top: 0;
    gap: 0.75rem;
  }

  .cn-contact-card {
    width: auto;
    min-width: unset;
  }

  .cn-contact-info {
    display: none;
  }

  .cn-contact-icon {
    width: 40px;
    height: 40px;
  }

  .cn-contact-icon svg {
    width: 20px;
    height: 20px;
  }

  .cn-profile-section {
    padding: 1.5rem;
  }

  .cn-section-title {
    font-size: 1.5rem;
  }

  .cn-employer-container {
    margin: 0;
  }

  .cn-profile-header-wrapper {
    margin: 1rem 0.5rem;
    border-radius: 12px;
  }

  .cn-profile-body {
    padding: 0 0.5rem 1rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .cn-company-name {
    font-size: 1.75rem;
  }

  .cn-contact-icon {
    width: 44px;
    height: 44px;
  }

  .cn-sidebar-card {
    padding: 1.25rem;
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
  .cn-employer-profile {
    background: white;
  }

  .cn-profile-header-wrapper,
  .cn-profile-section,
  .cn-sidebar-card {
    box-shadow: none;
    page-break-inside: avoid;
  }

  .cn-owner-edit-btn {
    display: none;
  }

  .cn-view-more-jobs {
    display: none;
  }
}

/* ============================================================
   Bundle E (1.12.0) — inline-section editing on the public
   single-employer profile. Mirrors the applicant pattern in
   assets/css/single-applicant.css. Owner-only affordances
   (pencil button, edit forms, saved-flash) are rendered server-
   side gated on $is_owner; CSS handles the show/hide via the
   `.cn-editing` state class on each `[data-cn-section]` wrapper.
   ============================================================ */

/* ── Edit forms (hidden by default, shown on .cn-editing) ──── */
.cn-section-edit-form {
  display: none;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid #e2e8f0;
}

[data-cn-section].cn-editing .cn-section-edit-form {
  display: block;
}

[data-cn-section].cn-editing .cn-section-view {
  display: none;
}

/* ── Edit pencil button ──────────────────────────────────────── */
.cn-section-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  color: #4a5568;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: inherit;
}

.cn-section-edit-btn:hover,
.cn-section-edit-btn:focus-visible {
  background: rgba(var(--cn-primary-btn-rgb, 0, 115, 170), 0.08);
  border-color: rgba(var(--cn-primary-btn-rgb, 0, 115, 170), 0.3);
  color: var(--cn-primary-btn, #0073aa);
  outline: none;
}

[data-cn-section].cn-editing .cn-section-edit-btn {
  display: none;
}

/* Inline variant — used in compact contexts like the header
   tagline/location and the sidebar items. Smaller, no border. */
.cn-section-edit-btn--inline {
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Section header (h2 + edit button row) ──────────────────── */
.cn-profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  position: relative;
}

.cn-profile-section-header .cn-section-title {
  margin: 0;
}

/* ── Edit form fields ───────────────────────────────────────── */
.cn-section-edit-form .cn-form-field {
  margin-bottom: 0.875rem;
}

.cn-section-edit-form .cn-form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #1a202c;
}

.cn-section-edit-form .cn-input,
.cn-section-edit-form .cn-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cn-section-edit-form .cn-input:focus,
.cn-section-edit-form .cn-textarea:focus {
  outline: none;
  border-color: var(--cn-primary-btn, #0073aa);
  box-shadow: 0 0 0 3px rgba(var(--cn-primary-btn-rgb, 0, 115, 170), 0.15);
}

.cn-section-edit-form .cn-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.cn-section-edit-form .cn-field-help {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: #718096;
}

/* ── Edit-action button row (Cancel / Save) ──────────────────── */
.cn-section-edit-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* Polish the Cancel + Save buttons inside inline edit forms (1.12.0).
   Mirrors the applicant-side polish: pill shape, lighter weight, calmer
   hover. Override the global .cn-btn-outline / .cn-btn-primary defaults
   (which can feel overly aggressive in this context — thick borders,
   large padding). */
.cn-section-edit-actions .cn-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border-width: 1px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.1s ease;
}

.cn-section-edit-actions .cn-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--cn-primary-btn-rgb, 0, 115, 170), 0.18);
}

/* Cancel — ghost / soft. Subtle by design. */
.cn-section-edit-actions .cn-btn-outline,
.cn-section-edit-actions .cn-section-cancel-btn {
  background: transparent !important;
  border-color: #cbd5e0 !important;
  color: #4a5568 !important;
}

.cn-section-edit-actions .cn-btn-outline:hover,
.cn-section-edit-actions .cn-section-cancel-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #1a202c !important;
  transform: none !important;
}

/* Save — solid brand button, slightly tighter than the global default. */
.cn-section-edit-actions .cn-btn-primary,
.cn-section-edit-actions .cn-section-save-btn {
  border-color: var(--cn-primary-btn, #0073aa) !important;
  background: var(--cn-primary-btn, #0073aa) !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.cn-section-edit-actions .cn-btn-primary:hover,
.cn-section-edit-actions .cn-section-save-btn:hover {
  background: var(--cn-primary-btn-hover, #005d8c) !important;
  border-color: var(--cn-primary-btn-hover, #005d8c) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.cn-section-edit-actions .cn-btn-primary:disabled,
.cn-section-edit-actions .cn-section-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Compact variant for inline contexts (header tagline / location). */
.cn-section-edit-form--compact {
  padding-top: 0.625rem;
  border-top: 0;
  background: #f7fafc;
  padding: 0.875rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* Inline variant for sidebar items (industry / size / etc). */
.cn-section-edit-form--inline {
  padding: 0.75rem;
  border-top: 0;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-top: 0.5rem;
}

/* ── Empty-state placeholders (owner only) ──────────────────── */
.cn-section-empty-prompt {
  margin: 0;
  padding: 0.875rem 1rem;
  background: #f7fafc;
  border: 1px dashed #cbd5e0;
  border-radius: 8px;
  color: #4a5568;
  font-size: 0.9rem;
  font-style: italic;
}

.cn-section-empty-prompt--inline {
  padding: 0.4rem 0;
  background: transparent;
  border: 0;
  color: #718096;
  font-size: 0.85rem;
}

.cn-sidebar-empty-prompt {
  color: #a0aec0 !important;
  font-style: italic;
  font-weight: 400 !important;
}

/* ── Section error message ──────────────────────────────────── */
.cn-section-error {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  font-size: 0.85rem;
}

/* ── "Saved" flash pill ──────────────────────────────────────── */
.cn-section-saved-flash {
  display: inline-block;
  margin-left: 0.625rem;
  padding: 2px 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.02em;
  vertical-align: middle;
  animation: cn-employer-saved-flash 2.2s ease forwards;
}

@keyframes cn-employer-saved-flash {
  0% { opacity: 0; transform: scale(0.85); }
  10% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.95); }
}

/* ── Tagline + location header rendering (1.12.0) ──────────── */
.cn-employer-tagline-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}

.cn-employer-tagline {
  margin: 0;
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.5;
  font-style: italic;
}

.cn-employer-tagline-wrap .cn-section-edit-btn--inline {
  position: absolute;
  top: -2px;
  right: 0;
}

.cn-employer-location-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cn-employer-location-wrap .cn-section-edit-btn--inline {
  margin-left: 0.25rem;
}

/* When editing, expand the form full-width inside the meta row. */
.cn-employer-tagline-wrap.cn-editing .cn-section-edit-form,
.cn-employer-location-wrap.cn-editing .cn-section-edit-form,
.cn-employer-name-wrap.cn-editing .cn-section-edit-form {
  display: block;
  margin-top: 0.5rem;
  width: 100%;
}

/* ── Bundle F (1.13.0): name + contact-card inline editing ──────── */

/* Company name h1 — inline edit pencil sits next to the existing
   "Edit Profile" page link. The h1 has its own existing styling; we
   just position the inline edit button. */
.cn-employer-name-wrap {
  position: relative;
}

.cn-employer-name-edit-btn {
  /* Sit visually beside the company name as a small button. */
  vertical-align: middle;
  margin-left: 0.5rem;
  font-size: 0.65rem;
  padding: 0.3rem 0.6rem;
}

/* In edit mode, swap the h1 for the input form. The form-compact
   variant gets a constrained max-width so the input doesn't blow
   out on wide viewports. */
.cn-employer-name-form {
  max-width: 540px;
}

.cn-input--large {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  padding: 0.625rem 0.875rem !important;
}

/* Contact cards (email / phone / website) become edit targets. The
   existing `.cn-contact-card` is a horizontal flex row (icon + info).
   In edit mode we swap the .cn-contact-info text for the form, and
   hide the icon link's clickability so tapping the icon doesn't
   open mailto:/tel:/href. */
.cn-contact-card {
  position: relative;
}

.cn-contact-card--editable {
  /* Reserve space so the absolute-positioned edit button doesn't
     overlap the value text. */
  padding-right: 2.75rem;
}

.cn-contact-card .cn-contact-edit-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  z-index: 2;
}

/* Empty-state value — a muted placeholder line ("Add email") that
   visually distinguishes from a real value but stays in the same
   slot so the layout doesn't shift. */
.cn-contact-value--empty {
  color: rgba(255, 255, 255, 0.7) !important;
  font-style: italic;
}

/* Edit mode for contact cards: hide the icon-link and value, expand
   the form to fill the card's width. The icon link is replaced by a
   subtle "edit mode" indicator via color shift. */
.cn-contact-card.cn-editing .cn-contact-icon {
  pointer-events: none;
  opacity: 0.5;
}

.cn-contact-card.cn-editing .cn-section-view {
  display: none;
}

.cn-contact-card.cn-editing .cn-contact-edit-btn {
  display: none;
}

.cn-contact-card.cn-editing .cn-section-edit-form--inline {
  display: block;
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
}

/* The contact-card form needs a darker background to read against the
   card's existing dark/branded background. */
.cn-contact-card .cn-section-edit-form--inline {
  background: rgba(255, 255, 255, 0.95);
  color: #1a202c;
  border: 0;
}

.cn-contact-card .cn-section-edit-form--inline label {
  color: #1a202c;
}

/* On mobile, the contact cards already stack vertically — preserve
   that and just let the form take full width. */
@media (max-width: 600px) {
  .cn-contact-card--editable {
    padding-right: 1rem;
  }
  .cn-contact-card .cn-contact-edit-btn {
    top: 0.375rem;
    right: 0.375rem;
  }
}

/* ── Sidebar item editing layout ─────────────────────────────── */
.cn-sidebar-item {
  position: relative;
}

.cn-sidebar-item .cn-section-edit-btn--inline {
  position: absolute;
  top: 0.5rem;
  right: 0.25rem;
}

.cn-sidebar-item.cn-editing .cn-section-edit-form--inline {
  display: block;
}

/* When editing, hide the value display */
.cn-sidebar-item.cn-editing .cn-sidebar-info {
  display: none;
}

.cn-sidebar-item.cn-editing .cn-sidebar-icon {
  display: none;
}

/* ── Mobile responsiveness for inline-edit (1.12.0) ──────────── */
@media (max-width: 600px) {
  .cn-section-edit-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .cn-section-edit-actions .cn-btn {
    width: 100%;
    min-height: 44px;
  }
  .cn-section-edit-btn {
    min-height: 36px;
    min-width: 36px;
    padding: 0.5rem 0.75rem;
  }

  /* WYSIWYG toolbar on phones — same chrome polish we did for
     applicant in 1.5.1 / Bundle B. */
  .cn-section-edit-form .wp-editor-wrap {
    border-radius: 6px;
  }
  .cn-section-edit-form .mce-toolbar-grp,
  .cn-section-edit-form .quicktags-toolbar {
    padding: 2px 4px !important;
    min-width: 0;
  }
  .cn-section-edit-form .mce-toolbar .mce-btn-group {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .cn-section-edit-form .mce-toolbar .mce-btn {
    margin: 1px !important;
    padding: 0 !important;
    min-width: 26px;
    min-height: 26px;
  }
  .cn-section-edit-form .mce-toolbar .mce-btn button {
    padding: 4px 6px !important;
    min-width: 26px;
    min-height: 26px;
  }
  .cn-section-edit-form .mce-toolbar .mce-ico {
    font-size: 14px !important;
    line-height: 14px !important;
    width: 14px !important;
    height: 14px !important;
  }
  .cn-section-edit-form .wp-editor-wrap iframe {
    min-height: 140px !important;
    max-height: 240px;
  }
  .cn-section-edit-form .mce-container,
  .cn-section-edit-form .mce-container-body,
  .cn-section-edit-form .mce-toolbar,
  .cn-section-edit-form .mce-flow-layout,
  .cn-section-edit-form .mce-flow-layout-item {
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }
}
