/*
Theme Name: Jobs in the Channel Modern
Author: Ihor Huliaiev
Description: A modern, clean child theme for Jobs in the Channel based on Job Board by Ejobsitesoftware.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Template: job-board-by-ejobsitesoftware
Text Domain: jobs-in-the-channel-modern
Tags: custom-logo, custom-background, translation-ready, accessibility-ready
*/

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --jitc-primary: #0f62fe;
  --jitc-primary-dark: #0043ce;
  --jitc-accent: #00b3a4;
  --jitc-text: #0f172a;
  --jitc-muted: #64748b;
  --jitc-border: #e2e8f0;
  --jitc-surface: #ffffff;
  --jitc-surface-alt: #f8fafc;
  --jitc-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --jitc-radius: 16px;
  --jitc-container-max: 80rem;
}

/* Full-width layout: main and header span 100%, content lives in a centered container. */
#content.jitc-main,
main.jitc-main,
.jitc-main {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Centered container: default max-width across the site (header, main, footer, shortcodes). */
.jitc-container,
.jitc-main .container,
.jitc-main .jitc-container,
.jitc-main .jitc-page,
.jitc-page.container,
.site-header .container,
.footer .container {
  max-width: var(--jitc-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  width: 100%;
}

@media (min-width: 576px) {
  .jitc-container,
  .jitc-main .container,
  .jitc-main .jitc-container,
  .jitc-main .jitc-page,
  .jitc-page.container,
  .site-header .container,
  .footer .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
  color: var(--jitc-text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f1f5f9 100%);
}

a {
  color: var(--jitc-primary);
}

a:hover,
a:focus {
  color: var(--jitc-primary-dark);
}

.site-header .navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--jitc-border);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.site-header .navbar .navbar-brand img,
.site-header .navbar .custom-logo-link img,
.site-header .custom-logo {
  max-height: 64px;
  width: auto;
  height: auto;
}

.site-header .navbar .nav-link {
  font-weight: 500;
  color: var(--jitc-text);
}

.site-header .navbar .nav-link:hover,
.site-header .navbar .nav-link:focus {
  color: var(--jitc-primary);
}

.jitc-nav-actions {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.jitc-user-menu-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.jitc-header-post-job {
  flex-shrink: 0;
}

.jitc-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.jitc-user-menu__messages {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(15, 98, 254, 0.25);
  background: rgba(255, 255, 255, 0.85);
  color: var(--jitc-text);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.jitc-user-menu__messages:hover,
.jitc-user-menu__messages:focus {
  border-color: rgba(15, 98, 254, 0.6);
  color: var(--jitc-primary);
  background: #fff;
}

.jitc-user-menu__messages-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jitc-user-menu__messages-icon svg {
  display: block;
}

.jitc-user-menu__messages-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  line-height: 1.15rem;
  border-radius: 999px;
  text-align: center;
}

.jitc-user-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 98, 254, 0.25);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.jitc-user-menu__toggle:hover,
.jitc-user-menu__toggle:focus {
  border-color: rgba(15, 98, 254, 0.6);
  transform: translateY(-1px);
}

.jitc-user-menu__avatar {
  display: inline-flex;
  align-items: center;
}

.jitc-user-menu__img {
  border-radius: 50%;
  border: 2px solid rgba(15, 98, 254, 0.35);
}

.jitc-user-menu__meta {
  display: grid;
  text-align: left;
  line-height: 1.1;
}

.jitc-user-menu__name {
  font-weight: 600;
  color: var(--jitc-text);
  font-size: 0.92rem;
}

.jitc-user-menu__role {
  font-size: 0.75rem;
  color: var(--jitc-muted);
}

.jitc-user-menu__chevron {
  color: var(--jitc-primary);
  font-size: 0.9rem;
}

.jitc-user-menu__dropdown {
  position: absolute;
  right: 0;
  top: calc(100% - 1px);
  margin-top: 0;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  border: 1px solid rgba(15, 98, 254, 0.2);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  padding: 0.5rem;
  display: none;
  z-index: 1000;
}

.jitc-user-menu:hover .jitc-user-menu__dropdown,
.jitc-user-menu:focus-within .jitc-user-menu__dropdown {
  display: block;
}

.jitc-user-menu__item {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  color: var(--jitc-text);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.jitc-user-menu__item:hover,
.jitc-user-menu__item:focus {
  background: rgba(15, 98, 254, 0.1);
  color: var(--jitc-primary);
}

.jitc-user-menu__item--danger:hover,
.jitc-user-menu__item--danger:focus {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.jitc-user-menu__divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.35);
  margin: 0.35rem 0;
}

.jitc-user-menu--guest {
  gap: 0.6rem;
}

.jitc-page {
  padding: 3rem 0 4rem;
}

.jitc-hero {
  background: var(--jitc-surface);
  border-radius: calc(var(--jitc-radius) + 4px);
  padding: 2rem;
  box-shadow: var(--jitc-shadow);
  margin-bottom: 2rem;
}

.jitc-hero h1,
.jitc-hero h2 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.jitc-hero p {
  color: var(--jitc-muted);
  margin-bottom: 0;
}

.jitc-card {
  background: var(--jitc-surface);
  border: 1px solid var(--jitc-border);
  border-radius: var(--jitc-radius);
  box-shadow: var(--jitc-shadow);
  padding: 1.5rem;
}

.jitc-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .jitc-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.jitc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

.jitc-meta {
  color: var(--jitc-muted);
  font-size: 0.9rem;
}

.jitc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.jitc-button--sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
}

.jitc-button--wide {
  min-width: 220px;
  padding-inline: 2.4rem;
}

.jitc-button--primary {
  background: var(--jitc-primary);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(15, 98, 254, 0.22);
}

.jitc-button--primary:hover,
.jitc-button--primary:focus {
  background: var(--jitc-primary-dark);
  color: #ffffff;
}

.jitc-button--ghost {
  border-color: var(--jitc-border);
  color: var(--jitc-text);
  background: #ffffff;
}

.jitc-button--ghost:hover,
.jitc-button--ghost:focus {
  border-color: var(--jitc-primary);
  color: var(--jitc-primary);
}

.jitc-form {
  display: grid;
  gap: 1rem;
}

.jitc-form__row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .jitc-form__row--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .jitc-form__row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .jitc-form__row--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Post a Job page: tabs (Quick Post / Full Details) */
.jitc-job-submit__tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--jitc-border);
}

.jitc-tabs__tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--jitc-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.jitc-tabs__tab:hover {
  color: var(--jitc-text);
}

.jitc-tabs__tab.jitc-tabs__tab--active {
  color: var(--jitc-primary);
  border-bottom-color: var(--jitc-primary);
}

.jitc-tabs__panel {
  display: block;
}

.jitc-tabs__panel[hidden] {
  display: none;
}

.jitc-job-submit__panel-desc {
  color: var(--jitc-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.jitc-job-submit__alert {
  margin-bottom: 1.25rem;
}

.jitc-job-submit__card {
  margin-bottom: 1.5rem;
}

.jitc-meta--error {
  color: #b91c1c;
}

.jitc-field label {
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: inline-block;
}

.jitc-field--floating {
  position: relative;
  display: grid;
  align-items: center;
}

.jitc-field--floating .jitc-input {
  padding-top: 1.1rem;
  padding-bottom: 0.45rem;
}

.jitc-field--floating label {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 0.35rem;
  color: var(--jitc-muted);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.9));
  transition: all 0.2s ease;
}

.jitc-field--floating .jitc-input:focus + label,
.jitc-field--floating .jitc-input:not(:placeholder-shown) + label {
  top: 0.35rem;
  transform: translateY(0);
  font-size: 0.72rem;
  color: var(--jitc-primary);
}

.jitc-input,
.jitc-select,
.jitc-textarea {
  width: 100%;
  border: 1px solid var(--jitc-border);
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  background: #ffffff;
  color: var(--jitc-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jitc-input[type="file"] {
  padding: 0.6rem 0.8rem;
  border-style: dashed;
  border-color: rgba(15, 98, 254, 0.35);
  background: linear-gradient(120deg, rgba(15, 98, 254, 0.08), rgba(0, 179, 164, 0.08));
}

.jitc-input[type="file"]::file-selector-button {
  margin-right: 0.9rem;
  padding: 0.45rem 0.9rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(15, 98, 254, 0.9), rgba(0, 179, 164, 0.9));
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(15, 98, 254, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jitc-input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 98, 254, 0.3);
}

.jitc-input:focus,
.jitc-select:focus,
.jitc-textarea:focus {
  border-color: var(--jitc-primary);
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.15);
  outline: none;
}

.jitc-textarea {
  min-height: 140px;
  resize: vertical;
}

.jitc-alert {
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #a7f3d0;
}

.jitc-alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.jitc-alert--success {
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #a7f3d0;
}

.jitc-alert--info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.jitc-alert--info .jitc-link--strong {
  font-weight: 700;
  margin-left: 0.35rem;
}

.jitc-badge--unread {
  background: var(--jitc-primary);
  color: #fff;
  margin-left: 0.35rem;
}

.jitc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jitc-job-card {
  display: grid;
  gap: 1rem;
}

.jitc-job-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.jitc-job-card__excerpt {
  color: var(--jitc-muted);
  margin-bottom: 0;
}

.jitc-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.jitc-dashboard__stats {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .jitc-dashboard__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.jitc-stat-card {
  background: var(--jitc-surface);
  border: 1px solid var(--jitc-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--jitc-shadow);
}

.jitc-stat-card span {
  display: block;
  color: var(--jitc-muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.jitc-stat-card strong {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--jitc-text);
}

.jitc-stat-card--status-approved strong {
  color: #95c15e;
}

.jitc-stat-card--status-pending_validation strong {
  color: var(--jitc-muted);
}

.jitc-dashboard__actions {
  margin-bottom: 2rem;
}

.jitc-dashboard__grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  .jitc-dashboard__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.jitc-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.jitc-link {
  color: var(--jitc-primary);
  text-decoration: none;
  font-weight: 600;
}

.jitc-link:hover,
.jitc-link:focus {
  color: var(--jitc-primary-dark);
}

.jitc-table {
  display: grid;
  gap: 0.75rem;
}

.jitc-table li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--jitc-border);
  background: #ffffff;
}

.jitc-table__title {
  display: grid;
  gap: 0.15rem;
}

.jitc-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
}

.jitc-status--publish {
  background: #dcfce7;
  color: #166534;
}

.jitc-status--pending_validation {
  background: #fef3c7;
  color: #92400e;
}

.jitc-status--needs_changes {
  background: #fee2e2;
  color: #b91c1c;
}

.jitc-status--rejected {
  background: #f1f5f9;
  color: #475569;
}

.jitc-meta-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .jitc-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.jitc-meta-grid span {
  display: block;
  color: var(--jitc-muted);
  font-size: 0.85rem;
}

.jitc-meta-grid strong {
  font-size: 1rem;
  font-weight: 600;
}

.jitc-media-preview {
  margin: 0.5rem 0 0.75rem;
  padding: 0.5rem;
  border: 1px solid var(--jitc-border);
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(15, 98, 254, 0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0, 179, 164, 0.18), transparent 50%),
    #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  width: 100%;
}

.jitc-media-preview img {
  display: block;
  width: 100%;
  height: 120px;
  max-width: 220px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.15);
}

/* Logo preview: preserve aspect ratio so wide logos are not cropped or stretched */
.jitc-media-preview--logo {
  min-height: 80px;
}

.jitc-media-preview--logo img {
  width: auto;
  height: auto;
  max-width: 220px;
  max-height: 120px;
  object-fit: contain;
}

.jitc-media-preview__empty {
  color: var(--jitc-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.jitc-media-preview--wide {
  width: 100%;
  min-height: 160px;
}

.jitc-media-preview--wide img {
  max-width: 100%;
  height: 160px;
}

.jitc-media-preview--filled {
  background:
    linear-gradient(135deg, rgba(15, 98, 254, 0.08), rgba(0, 179, 164, 0.08)),
    repeating-conic-gradient(from 45deg, rgba(148, 163, 184, 0.18) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
}

.jitc-list--bullets {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.jitc-register {
  position: relative;
}

.jitc-register__layout {
  display: grid;
  gap: 2rem;
  justify-items: center;
}

.jitc-register__hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 98, 254, 0.2);
  background:
    radial-gradient(circle at top right, rgba(15, 98, 254, 0.2), transparent 55%),
    radial-gradient(circle at 10% 20%, rgba(0, 179, 164, 0.25), transparent 50%),
    rgba(255, 255, 255, 0.92);
  text-align: center;
  max-width: 780px;
  width: 100%;
}

.jitc-register__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(15, 98, 254, 0.2), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.jitc-register__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 98, 254, 0.12);
  color: var(--jitc-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.jitc-register__panel {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  max-width: 900px;
  width: 100%;
}

.jitc-register__panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--jitc-radius) + 2px);
  padding: 1px;
  background: linear-gradient(120deg, rgba(15, 98, 254, 0.5), rgba(0, 179, 164, 0.45), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.jitc-toggle {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(15, 98, 254, 0.35);
  padding: 0.35rem;
  background: rgba(15, 23, 42, 0.05);
  overflow: hidden;
  gap: 0.35rem;
}

.jitc-toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.jitc-toggle__label {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0.65rem 1rem;
  font-weight: 600;
  color: var(--jitc-muted);
  cursor: pointer;
  transition: color 0.25s ease;
}

.jitc-toggle__indicator {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0.35rem;
  width: calc(50% - 0.35rem);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(15, 98, 254, 0.9), rgba(0, 179, 164, 0.9));
  box-shadow: 0 12px 24px rgba(15, 98, 254, 0.35);
  transition: transform 0.35s ease;
  opacity: 0;
}

.jitc-toggle__input:focus + .jitc-toggle__label {
  color: var(--jitc-text);
}

.jitc-toggle__input:checked + .jitc-toggle__label {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(15, 98, 254, 0.4);
}

.jitc-actions--center {
  justify-content: center;
}

.jitc-toggle__input:nth-of-type(1):checked ~ .jitc-toggle__indicator {
  transform: translateX(0);
  opacity: 1;
}

.jitc-toggle__input:nth-of-type(2):checked ~ .jitc-toggle__indicator {
  transform: translateX(calc(100% + 0.35rem));
  opacity: 1;
}

.jitc-toggle__indicator::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.2);
  filter: blur(6px);
  opacity: 0.8;
  animation: jitcPulse 2.4s ease-in-out infinite;
}

.jitc-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--jitc-text);
}

.jitc-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.jitc-checkbox span {
  position: relative;
  padding-left: 1.6rem;
}

.jitc-checkbox span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(15, 98, 254, 0.35);
  background: rgba(15, 23, 42, 0.04);
  box-shadow: inset 0 0 0 2px transparent;
  transition: all 0.2s ease;
}

.jitc-checkbox span::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.32rem;
  width: 0.48rem;
  height: 0.28rem;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) scale(0.7);
  opacity: 0;
  transition: all 0.2s ease;
}

.jitc-checkbox input:focus + span::before {
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.2);
}

.jitc-checkbox input:checked + span::before {
  background: linear-gradient(120deg, rgba(15, 98, 254, 0.95), rgba(0, 179, 164, 0.9));
  border-color: transparent;
}

.jitc-checkbox input:checked + span::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

@keyframes jitcPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.jitc-job-hero {
  display: grid;
  gap: 1rem;
}

.jitc-job-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.jitc-divider {
  height: 1px;
  background: var(--jitc-border);
  margin: 1.5rem 0;
}

.jitc-candidate-card {
  background: var(--jitc-surface);
  border: 1px solid var(--jitc-border);
  border-radius: var(--jitc-radius);
  padding: 1.25rem;
  box-shadow: var(--jitc-shadow);
}

.jitc-candidate-card__inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.jitc-candidate-card__avatar {
  flex-shrink: 0;
}

.jitc-candidate-card__avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.jitc-candidate-card__body {
  min-width: 0;
  flex: 1;
}

.jitc-candidate-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.jitc-candidate-card__title a {
  color: var(--jitc-text);
  text-decoration: none;
  font-weight: 700;
}

.jitc-candidate-card__title a:hover,
.jitc-candidate-card__title a:focus {
  color: var(--jitc-primary);
}

.jitc-candidate-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--jitc-primary);
  margin-bottom: 0.5rem;
}

.jitc-candidate-card__excerpt {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.9rem;
  color: var(--jitc-muted);
  line-height: 1.45;
}

.jitc-candidate-card__location,
.jitc-candidate-card__contact {
  margin: 0.25rem 0;
  font-size: 0.85rem;
}

.jitc-candidate-card .jitc-button {
  margin-top: 0.75rem;
}

.jitc-candidate-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.jitc-candidate-single__back {
  margin-bottom: 1.25rem;
}

.jitc-candidate-single__card {
  padding: 1.5rem;
}

.jitc-candidate-single__header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--jitc-border);
}

.jitc-candidate-single__avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.jitc-candidate-single__header-text {
  min-width: 0;
  flex: 1;
}

.jitc-candidate-single__title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.jitc-candidate-single__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #95c15e;
  margin-bottom: 0.35rem;
}

.jitc-candidate-single__location {
  margin: 0.25rem 0;
}

.jitc-candidate-single__sep {
  margin: 0 0.25rem;
  color: var(--jitc-muted);
}

.jitc-candidate-single__section {
  margin-top: 1.25rem;
}

.jitc-candidate-single__section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.jitc-candidate-single__summary {
  line-height: 1.6;
}

.jitc-candidate-single__contact {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--jitc-border);
}

@media (max-width: 576px) {
  .jitc-candidate-card__inner,
  .jitc-candidate-single__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.jitc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer {
  background: #0f172a;
  color: #e2e8f0;
}

.footer a {
  color: #e2e8f0;
}

.footer a:hover,
.footer a:focus {
  color: #ffffff;
}

.footer-title {
  color: #ffffff;
  letter-spacing: 0.06em;
}

.footer-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.2);
}

.job-listing {
  background: var(--jitc-surface);
  border-radius: var(--jitc-radius);
  border: 1px solid var(--jitc-border);
  box-shadow: var(--jitc-shadow);
}

.jitc-company-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(120deg, rgba(15, 23, 42, 0.04), rgba(148, 163, 184, 0.08));
}

.jitc-company-grid {
  margin-top: 2rem;
}

.jitc-company-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.02), rgba(99, 102, 241, 0.06));
}

.jitc-company-card__media {
  position: relative;
  min-height: 140px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(79, 70, 229, 0.4));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.jitc-company-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jitc-company-card__logo {
  position: absolute;
  left: 1rem;
  bottom: -24px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  background: #ffffff;
  object-fit: contain;
  padding: 0.35rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.jitc-company-card__body {
  padding: 2.25rem 1.25rem 1.25rem;
}

.jitc-company-card__title {
  margin-bottom: 0.35rem;
  font-size: 1.2rem;
}

.jitc-company-card__excerpt {
  color: var(--jitc-muted);
}

.jitc-company-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  color: var(--jitc-muted);
  font-size: 0.95rem;
}

.jitc-company-header {
  position: relative;
  border-radius: calc(var(--jitc-radius) + 6px);
  min-height: 220px;
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.8), rgba(79, 70, 229, 0.7));
  background-size: cover;
  background-position: center;
  overflow: hidden;
  margin-bottom: 2rem;
}

.jitc-company-header__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jitc-company-header__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.2));
}

.jitc-company-header__content {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 2.5rem;
  color: #f8fafc;
}

.jitc-company-header__logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: #ffffff;
  padding: 0.5rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
  object-fit: contain;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.35);
}

.jitc-job-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.jitc-job-hero__main {
  flex: 1;
}

.jitc-job-hero__salary {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--jitc-text);
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.jitc-job-hero__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.jitc-job-hero__company {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--jitc-radius);
  border: 1px solid var(--jitc-border);
  background: var(--jitc-surface);
  box-shadow: var(--jitc-shadow);
  min-width: 240px;
}

.jitc-job-hero__company-logo img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: #ffffff;
  padding: 0.25rem;
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.jitc-job-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.jitc-job-content {
  display: grid;
  gap: 1.5rem;
}

.jitc-job-summary {
  border: 1px solid rgba(15, 98, 254, 0.15);
  background: linear-gradient(140deg, rgba(15, 98, 254, 0.08), rgba(0, 179, 164, 0.08));
}

.jitc-job-description .jitc-single__content {
  margin-top: 1rem;
}

.jitc-job-sidebar {
  display: grid;
  gap: 1.5rem;
}

.jitc-job-overview ul {
  display: grid;
  gap: 0.45rem;
}

.jitc-job-overview__salary {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--jitc-text);
}

.jitc-job-apply .jitc-alert {
  margin-bottom: 1rem;
}

.jitc-job-apply .jitc-textarea {
  min-height: 120px;
}

.jitc-job-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.jitc-meta--spaced {
  margin-bottom: 0.5rem;
}

.jitc-card--padded {
  padding: 1.5rem;
}

.jitc-mt-1 {
  margin-top: 1rem;
}

.jitc-mt-2 {
  margin-top: 2rem;
}

.jitc-my-1-5 {
  margin: 1.5rem 0;
}

.jitc-inline-form {
  display: inline-block;
  margin-left: 0.5rem;
}

.jitc-profile-photo {
  margin-bottom: 24px;
  text-align: center;
}

.jitc-profile-photo__image {
  max-width: 160px;
  width: 100%;
  height: auto;
  border-radius: 999px;
}

/* Unified profile page (candidate & employer) */
.jitc-profile-page {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Compact profile layout: single-row header, tighter spacing */
.jitc-profile-page--compact.jitc-page {
  padding: 1.5rem 0 2.5rem;
}

.jitc-profile-page--compact .jitc-alert {
  margin-bottom: 1rem;
}

.jitc-profile-header {
  margin-bottom: 2rem;
}

.jitc-profile-header--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--jitc-surface);
  border-radius: var(--jitc-radius);
  border: 1px solid var(--jitc-border);
  box-shadow: var(--jitc-shadow);
}

.jitc-profile-header--compact .jitc-profile-header__main {
  min-width: 0;
  flex: 1;
}

.jitc-profile-header--compact .jitc-profile-hero__badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(15, 98, 254, 0.12);
  color: var(--jitc-primary);
  margin-bottom: 0.35rem;
}

.jitc-profile-header--compact .jitc-profile-hero__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.jitc-profile-header--compact .jitc-profile-hero__subtitle {
  color: var(--jitc-muted);
  margin: 0;
  font-size: 0.875rem;
}

.jitc-profile-hero {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
}

.jitc-profile-hero__badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(15, 98, 254, 0.12);
  color: var(--jitc-primary);
  margin-bottom: 0.75rem;
}

.jitc-profile-hero__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.jitc-profile-hero__subtitle {
  color: var(--jitc-muted);
  margin: 0;
  font-size: 1rem;
}

.jitc-profile-photo-wrap {
  display: flex;
  justify-content: center;
  margin-top: -2rem;
  margin-bottom: 0;
}

.jitc-profile-photo-wrap--compact {
  margin-top: 0;
  margin-bottom: 0;
  flex-shrink: 0;
}

.jitc-profile-photo-card {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--jitc-surface);
  box-shadow: var(--jitc-shadow);
  background: var(--jitc-surface-alt);
}

.jitc-profile-photo-wrap--compact .jitc-profile-photo-card {
  width: 64px;
  height: 64px;
  border-width: 2px;
}

.jitc-profile-photo-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jitc-profile-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.jitc-profile-page--compact .jitc-profile-form.jitc-card {
  padding: 1rem 1.25rem;
}

.jitc-form-section {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--jitc-border);
}

.jitc-profile-page--compact .jitc-form-section {
  padding: 0.75rem 0;
}

.jitc-form-section:last-of-type {
  border-bottom: none;
}

.jitc-form-section__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--jitc-text);
  margin: 0 0 1rem;
  padding: 0;
}

.jitc-profile-page--compact .jitc-form-section__title {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.jitc-form-section__fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jitc-profile-page--compact .jitc-form-section__fields {
  gap: 0.5rem;
}

.jitc-profile-page--compact .jitc-form-section__fields.jitc-form {
  gap: 0.5rem;
}

.jitc-form-section__fields.jitc-form {
  gap: 1rem;
}

.jitc-field-note {
  display: block;
  font-size: 0.8rem;
  color: var(--jitc-muted);
  margin-top: 0.35rem;
}

.jitc-form-actions {
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--jitc-border);
}

.jitc-profile-page--compact .jitc-form-actions {
  padding-top: 1rem;
  margin-top: 0.25rem;
}

.jitc-profile-page--compact .jitc-form__row {
  gap: 0.5rem;
}

@media (max-width: 576px) {
  .jitc-profile-header--compact {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

.jitc-responsive-image {
  max-width: 100%;
  height: auto;
}

.jitc-pagination {
  margin-top: 2rem;
}

.jitc-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.jitc-pagination a,
.jitc-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 98, 254, 0.2);
  text-decoration: none;
  color: var(--jitc-text);
  background: #ffffff;
  font-weight: 600;
}

.jitc-pagination .current {
  background: linear-gradient(120deg, rgba(15, 98, 254, 0.9), rgba(0, 179, 164, 0.9));
  color: #ffffff;
  border-color: transparent;
}

@media (max-width: 960px) {
  .jitc-job-hero {
    flex-direction: column;
  }

  .jitc-job-hero__company {
    width: 100%;
  }

  .jitc-job-hero__side {
    align-items: flex-start;
    width: 100%;
  }

  .jitc-job-layout {
    grid-template-columns: 1fr;
  }
}

.jitc-company-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.jitc-company-about h2,
.jitc-company-jobs h2 {
  margin-bottom: 1rem;
}

@media (max-width: 960px) {
  .jitc-company-layout {
    grid-template-columns: 1fr;
  }

  .jitc-company-header__content {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Messages thread page: compact header */
.jitc-messages-thread__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--jitc-border, #dee2e6);
}

.jitc-messages-thread__back {
  position: absolute;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--bs-primary, #0d6efd);
  text-decoration: none;
  font-size: 0.9rem;
}

.jitc-messages-thread__back:hover,
.jitc-messages-thread__back:focus {
  color: var(--bs-primary, #0d6efd);
  text-decoration: underline;
}

.jitc-messages-thread__back svg {
  flex-shrink: 0;
}

.jitc-messages-thread__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--jitc-text, #212529);
}

/* Messages inbox page */
.jitc-messages-inbox__header {
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--jitc-border, #dee2e6);
}

.jitc-messages-inbox__title {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--jitc-text, #212529);
}

.jitc-messages-inbox__unread {
  margin: 0;
  font-size: 0.875rem;
}

.jitc-messages-inbox__list {
  padding: 0;
  overflow: hidden;
}

.jitc-messages-inbox__conversations {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jitc-messages-inbox__item {
  border-bottom: 1px solid var(--jitc-border, #dee2e6);
}

.jitc-messages-inbox__item:last-child {
  border-bottom: 0;
}

.jitc-messages-inbox__link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.jitc-messages-inbox__link:hover,
.jitc-messages-inbox__link:focus {
  background: var(--bs-light, #f8f9fa);
  color: inherit;
}

.jitc-messages-inbox__main {
  min-width: 0;
  flex: 1;
}

.jitc-messages-inbox__name {
  display: block;
  font-weight: 600;
  color: var(--bs-primary, #0d6efd);
  margin-bottom: 0.15rem;
}

.jitc-messages-inbox__link:hover .jitc-messages-inbox__name,
.jitc-messages-inbox__link:focus .jitc-messages-inbox__name {
  color: var(--bs-primary, #0d6efd);
  text-decoration: underline;
}

.jitc-messages-inbox__preview {
  display: block;
  font-size: 0.875rem;
  color: var(--jitc-muted, #6c757d);
}

.jitc-messages-inbox__date {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--jitc-muted, #6c757d);
}

.jitc-messages-inbox__empty {
  padding: 1.5rem 1.25rem;
}

/* Messages app: WhatsApp-style two-pane (list + thread on one page) */
.jitc-messages-app {
  display: flex;
  min-height: 70vh;
  border: 1px solid var(--jitc-border, #dee2e6);
  border-radius: var(--jitc-radius, 0.375rem);
  overflow: hidden;
  background: var(--jitc-surface, #fff);
}

.jitc-messages-app__sidebar {
  width: 320px;
  min-width: 280px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--jitc-border, #dee2e6);
  background: var(--bs-light, #f8f9fa);
}

.jitc-messages-app__sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--jitc-border, #dee2e6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--jitc-surface, #fff);
}

.jitc-messages-app__sidebar-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.jitc-messages-app__unread {
  flex-shrink: 0;
}

.jitc-messages-app__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.jitc-messages-app__item {
  border-bottom: 1px solid var(--jitc-border, #dee2e6);
}

.jitc-messages-app__row {
  display: flex;
  align-items: stretch;
}

.jitc-messages-app__row .jitc-messages-app__link {
  flex: 1;
  min-width: 0;
}

.jitc-messages-app__menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.jitc-messages-app__menu-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--jitc-muted, #6c757d);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jitc-messages-app__menu-btn:hover,
.jitc-messages-app__menu-btn:focus {
  background: var(--bs-light, #f8f9fa);
  color: var(--jitc-text, #212529);
}

.jitc-messages-app__menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  min-width: 10rem;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
  background: var(--jitc-surface, #fff);
  border: 1px solid var(--jitc-border, #dee2e6);
  border-radius: var(--jitc-radius, 0.375rem);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.jitc-messages-app__menu--fixed {
  z-index: 1000;
  margin-top: 0;
}

.jitc-messages-app__menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  color: var(--jitc-text, #212529);
}

.jitc-messages-app__menu-item:hover,
.jitc-messages-app__menu-item:focus {
  background: var(--bs-light, #f8f9fa);
}

.jitc-messages-app__link {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  color: inherit;
  text-decoration: none;
  text-align: left;
  background: var(--jitc-surface, #fff);
  transition: background 0.15s ease;
  border: none;
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.jitc-messages-app__link::-moz-focus-inner {
  padding: 0;
  border: 0;
}

.jitc-messages-app__link:hover,
.jitc-messages-app__link:focus {
  background: var(--bs-light, #f8f9fa);
}

.jitc-messages-app__link--active {
  background: var(--bs-light, #e7f1ff);
}

.jitc-messages-app__name {
  width: 100%;
  font-weight: 600;
  color: var(--bs-primary, #0d6efd);
}

.jitc-messages-app__pin-icon {
  margin-right: 0.25rem;
}

.jitc-messages-app__link:hover .jitc-messages-app__name,
.jitc-messages-app__link:focus .jitc-messages-app__name {
  text-decoration: underline;
}

.jitc-messages-app__preview {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
}

.jitc-messages-app__date {
  flex-shrink: 0;
  font-size: 0.75rem;
}

.jitc-messages-app__send-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jitc-messages-app__send-icon svg {
  display: block;
}

.jitc-messages-app__empty {
  padding: 1.5rem 1.25rem;
}

.jitc-messages-app__thread-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--jitc-surface, #fff);
}

.jitc-messages-app__welcome {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.jitc-messages-app__welcome .jitc-meta {
  margin: 0;
}

.jitc-messages-app__thread-header {
  flex-shrink: 0;
  margin-bottom: 0;
  justify-content: center;
}

.jitc-messages-app__thread-header .jitc-messages-thread__title {
  margin: 0;
}

.jitc-messages-app__composer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@media (max-width: 767px) {
  .jitc-messages-app {
    flex-direction: column;
    min-height: 60vh;
  }

  .jitc-messages-app__sidebar {
    width: 100%;
    min-width: 0;
    max-height: 40vh;
    border-right: 0;
    border-bottom: 1px solid var(--jitc-border, #dee2e6);
  }

  .jitc-messages-app__thread-pane {
    min-height: 50vh;
  }
}

/* Messages composer: thread + reply bar in one card */
.jitc-messages__composer {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

/* Messages thread list: max height with scroll */
.jitc-messages__composer .jitc-messages__thread {
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

/* Reply bar: single row, no titles */
.jitc-messages__reply-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  background: var(--bs-light, #f8f9fa);
}

.jitc-messages__reply-input {
  flex: 1;
  min-height: 2.5rem;
  max-height: 8rem;
  resize: none;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 1.25rem;
  padding: 0.5rem 1rem;
  font: inherit;
}

.jitc-messages__reply-send {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jitc-messages__reply-send svg {
  display: block;
}

/* Three-dots loading state on send button */
.jitc-loading-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.jitc-loading-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: jitc-dots-bounce 0.6s ease-in-out infinite both;
}

.jitc-loading-dots span:nth-child(1) { animation-delay: 0s; }
.jitc-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.jitc-loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes jitc-dots-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.6; }
  40% { transform: scale(1); opacity: 1; }
}

/* Screen reader only (keep button accessible) */
.jitc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Message bubbles: max width and bubble look */
.jitc-messages__thread .jitc-messages__bubble {
  max-width: 75%;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
}

/* Incoming (other): left */
.jitc-messages__thread .jitc-messages__bubble--other {
  align-self: flex-start;
  background: var(--jitc-messages-bubble-other, #e9ecef);
  border-bottom-left-radius: 0.25rem;
}

/* Outgoing (own): right */
.jitc-messages__thread .jitc-messages__bubble--own {
  align-self: flex-end;
  background: var(--jitc-messages-bubble-own, #0d6efd);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.jitc-messages__thread .jitc-messages__bubble .jitc-meta {
  font-size: 0.75rem;
}

.jitc-messages__thread .jitc-messages__bubble--own .jitc-meta {
  color: rgba(255, 255, 255, 0.85);
}

/* Messages thread: space between sender name and date/time */
.jitc-messages__bubble .jitc-messages__sender + .jitc-meta {
  margin-left: 0.5em;
}
