/* =============================================
Kula Job Board – Custom Styles
Theme: Simform (Violet/Pink palette)
============================================= */

:root {
  --co-brand: #6740ba;
  --co-brand-dark: #380d6f;
  --co-brand-light: #ece0fc;
  --co-pink: #ef5366;
  --co-pink-dark: #d43a4e;
  --co-text: #1a1a2e;
  --co-text-muted: #6b7280;
  --co-border: #d8c9f5;
  --co-bg: #f0e8fa;
  --co-white: #ffffff;
  --co-radius: 8px;
  --co-radius-lg: 12px;
  --co-font: "Circular Std", Arial, sans-serif;
}

/* ── Reset ── */
button {
  cursor: pointer;
}
.job-list-wrapper {
  font-size: 16px;
  position: relative;
  z-index: 2;
}

/* =============================================
Filter Row
============================================= */
.co-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--co-white);
  border-radius: var(--co-radius-lg);
  border: 1px solid var(--co-border);
  box-shadow: 0 2px 12px rgba(103, 64, 186, 0.08);
}

/* ── Form Control (select) ── */
.co-form-control {
  font-family: var(--co-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--co-text);
  background: var(--co-bg);
  border: 1.5px solid var(--co-border);
  border-radius: var(--co-radius);
  padding: 9px 36px 9px 14px;
  outline: none;
  height: 44px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  min-width: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236740ba' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.co-form-control:focus {
  border-color: var(--co-brand);
  box-shadow: 0 0 0 3px rgba(103, 64, 186, 0.15);
  background-color: var(--co-white);
}
.co-form-control:hover {
  border-color: var(--co-brand);
}
.co-filter-cta {
  display: flex;
  margin-left: auto;
  gap: 12px;
}
.co-filter-cta .co-filter-cta-btn {
  height: 44px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
}

#resetFilters:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.job-list-wrapper .job-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}
.job-list-wrapper .job-list li.job-row {
  border: 1px solid #e5e0fc;
  background: #ffffff;
  padding: 26px 30px;
  border-radius: 3px;
  transition: all 0.4s ease-in-out;
  margin-bottom: 18px;
  box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  margin: 0;
  justify-content: space-between;
}
.job-list-wrapper .job-list li.job-row:hover {
  background: #d9c3ff;
  border-color: #e5e0fc;
}

.job-list-wrapper .job-list li.job-row .job-title {
  font-size: 20px;
  margin-bottom: 10px;
  display: block;
  font-weight: 600;
  line-height: 25px;
  color: #000;
}
.job-list-wrapper .job-list li.job-row .job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.job-list-wrapper .job-list li.job-row .job-meta .job-tag {
  display: flex;
  padding: 3px 6px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 3px;
  border: 0.5px solid rgba(var(--violet-500), 1);
  color: rgba(var(--black), 1);
  position: relative;
  z-index: 1;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}
.job-list-wrapper .job-list li.job-row .job-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.job-list-wrapper .job-list li.job-row .job-actions .apply-job-btn {
  height: 40px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
}
.job-list-wrapper .job-list li.job-row .job-actions .view-job-btn {
  font-size: 32px;
  color: #d9c3ff;
  transition: all 0.4s ease-in-out;
}
.job-list-wrapper .job-list li.job-row:hover .job-actions .view-job-btn {
  color: #6740ba;
}
.job-list-wrapper .job-load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.co-error-container {
  background: #fff5f5;
  border: 1.5px solid #fca5a5;
  border-radius: var(--co-radius);
  padding: 16px 20px;
  color: #b91c1c;
  font-size: 14px;
  margin-top: 12px;
}

.co-no-results {
  text-align: center;
  padding: 48px 0;
  color: #4b5563;
  font-size: 18px;
  font-weight: 500;
}

.co-msg-text {
  margin: 0;
  padding: 0;
}
.job-list-wrapper .job-count-container {
  color: #000;
  font-size: 21px;
  font-weight: 450;
  line-height: 25px;
  text-align: right;
  background-color: transparent;
  padding: 0;
  margin: 0px 0px 12px;
  border-radius: 0;
}
/* =============================================
   Drawer / Modal
   ============================================= */
.job-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.35);
}
.job-modal-overlay.hidden {
  display: none;
}

/* Slide-in panel */
.job-modal-dialog {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 42rem;
  background: var(--co-white);
  box-shadow: -8px 0 40px rgba(56, 13, 111, 0.18);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  user-select: text;
}

/* Drawer animation */
.drawer-panel {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
#appModal:not(.hidden) .drawer-panel {
  transform: translateX(0);
}

/* Close button */
.job-modal-close {
  position: absolute;
  top: 24px;
  right: 20px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--co-bg);
  color: var(--co-text-muted);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 3px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.job-modal-close:hover {
  background: var(--co-brand-light);
  color: var(--co-brand-dark);
}

/* Header */
.job-modal-header {
  padding: 32px 32px 16px;
  border-bottom: 1px solid var(--co-border);
  flex-shrink: 0;
}
.job-modal-header.hidden {
  display: none;
}
.job-modal-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--co-brand-dark);
  margin: 0;
}

/* Loader */
.job-modal-loader {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.job-modal-loader.hidden {
  display: none;
}

/* Body */
.job-modal-body {
  padding: 24px 24px 0 24px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

/* =============================================
   Job Detail (Drawer Content)
   ============================================= */

/* Top apply button row */
.jd-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
  padding-right: 52px;
}

/* Form header (apply form) */
.jd-form-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--co-border);
}
.jd-form-header .jd-details {
  margin-bottom: 0;
}

/* Job details section */
.jd-details {
  margin-bottom: 32px;
}
.jd-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--co-brand-dark);
  margin-bottom: 12px;
}
.jd-department {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--co-brand);
  background: rgba(103, 64, 186, 0.1);
  border: 1px solid rgba(103, 64, 186, 0.25);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

/* 2-col meta grid */
.jd-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--co-border);
}
@media (max-width: 600px) {
  .jd-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* Each card */
.jd-meta-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  background: var(--co-bg);
  border: 1px solid var(--co-border);
  border-radius: var(--co-radius);
  padding: 18px 20px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}
.jd-meta-item:hover {
  border-color: var(--co-brand);
  box-shadow: 0 4px 16px rgba(103, 64, 186, 0.12);
  transform: translateY(-2px);
}

/* Icon badge — left */
.jd-meta-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(103, 64, 186, 0.12);
  color: var(--co-brand);
  border-radius: 8px;
}

/* Text — right, vertically stacked */
.jd-meta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.jd-meta-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--co-text);
  margin: 0;
}
.jd-meta-value {
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
  color: var(--co-brand-dark);
  margin: 0;
  word-break: break-word;
}

/* Description */
.jd-description {
  margin-bottom: 32px;
}
.jd-description-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--co-brand-dark);
  margin-bottom: 16px;
}
.jd-description-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--co-text);
  max-width: none;
}
.jd-description-body ul li {
  list-style: disc;
}
.jd-description-body ul li p {
  margin: 0;
}

/* Bottom apply button row */
.jd-bottom-actions {
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% + 48px);
  background-color: #fff;
  position: sticky;
  bottom: 0; 
  margin-left: -24px;
  padding: 16px;
  justify-content: center;
  border-top: 1px solid var(--co-border);
}
.jd-bottom-actions .primary-btn {
  width: 100%;
  text-align: center;
}

/* -----------------------------------------------
   Form Fields — shared across all field renderers
   ----------------------------------------------- */

.co-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.co-form-label {
  font-family: var(--co-font);
  font-size: 13px;
  font-weight: 700;
  color: var(--co-brand-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.co-form-required {
  color: #e11d48;
  margin-left: 2px;
}

.co-form-hint {
  font-size: 12px;
  color: var(--co-text-muted);
  margin: -4px 0 0;
  line-height: 1.5;
}

.co-form-input {
  font-family: var(--co-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--co-text);
  background-color: var(--co-white);
  border: 1.5px solid var(--co-border);
  border-radius: var(--co-radius);
  padding: 11px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.co-form-input::placeholder {
  color: #c4b5e0;
  font-weight: 400;
}
.co-form-input:focus {
  border-color: var(--co-brand);
  box-shadow: 0 0 0 3px rgba(103, 64, 186, 0.12);
  background-color: var(--co-white);
}
.co-form-input:hover:not(:focus) {
  border-color: var(--co-brand);
  background-color: #faf7ff;
}
input.co-form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Name field: 2-col grid */
.co-form-name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.co-form-field .iti__country-container {
      max-height: 46px;
}
@media (max-width: 500px) {
  .co-form-name-grid { grid-template-columns: 1fr; }
}

/* =============================================
   Application Form
   ============================================= */

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

.co-form-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section — no card, just a clean grouped block */
.co-form-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 32px;
}

.co-form-section-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.co-form-section-header::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--co-border);
  border-radius: 2px;
}

.co-form-section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--co-brand);
  margin: 0;
  white-space: nowrap;
}

.co-form-section-optional {
  font-size: 11px;
  color: var(--co-text-muted);
  margin: 0;
  font-weight: 500;
}

.co-form-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

 

/* Alert messages */
.co-form-alert {
  padding: 12px 16px;
  border-radius: var(--co-radius);
  font-size: 14px;
  line-height: 1.5;
}
.co-form-alert.hidden { display: none; }
.co-form-alert--error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}
.co-form-alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}
 
/* =============================================
   Textarea & Select
============================================= */
.co-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.co-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236740ba' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.co-form-select[multiple] {
  background-image: none;
  padding-right: 12px;
  min-height: 120px;
}

/* =============================================
   Date range field
============================================= */
.co-form-date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .co-form-date-range {
    grid-template-columns: 1fr;
  }
}

.co-form-date-range-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.co-form-sublabel {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--co-text-muted);
}

/* =============================================
   Radio & Checkbox
============================================= */
.co-form-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.co-form-radio-label,
.co-form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--co-text);
}

.co-form-radio,
.co-form-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--co-brand);
  cursor: pointer;
  flex-shrink: 0;
}

/* =============================================
   File Upload Dropzone
============================================= */
.co-form-dropzone {
  position: relative;
  border: 2px dashed var(--co-border);
  border-radius: var(--co-radius);
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  background: #fdfcff;
}

.co-form-dropzone:hover {
  border-color: var(--co-brand);
  background: var(--co-brand-light);
}

.co-form-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.co-form-dropzone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.co-form-dropzone-action {
  font-size: 14px;
  font-weight: 700;
  color: var(--co-brand);
}

.co-form-dropzone-hint {
  font-size: 12px;
  color: var(--co-text-muted);
}

.co-form-file-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  position: relative;
  z-index: 99;
  text-align: left;
  background: rgba(240, 81, 100, 0.20);
  border: 1px solid #f05366;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 13px;
}

.co-form-file-status.hidden {
  display: none;
}

.co-form-file-name {
  font-weight: 600;
  color: var(--co-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.co-form-file-name--error {
  color: #dc2626;
}

.co-btn-file-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.15s, background 0.15s;
}

.co-btn-file-remove:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* =============================================
   Autocomplete
============================================= */
.co-form-autocomplete {
  position: relative;
}

.co-form-autocomplete-dropdown {
  position: absolute;
  z-index: 20;
  width: 100%;
  margin-top: 4px;
  background: var(--co-white);
  border: 1.5px solid var(--co-border);
  border-radius: var(--co-radius);
  box-shadow: 0 8px 24px rgba(103, 64, 186, 0.12);
  max-height: 220px;
  overflow-y: auto;
}

.co-form-autocomplete-dropdown.hidden {
  display: none;
}

.co-form-autocomplete-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--co-text);
  cursor: pointer;
  transition: background 0.15s;
}

.co-form-autocomplete-item:hover {
  background: var(--co-brand-light);
  color: var(--co-brand-dark);
}

/* Multi-select tags */
.co-form-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.co-form-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--co-brand-light);
  color: var(--co-brand-dark);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.co-form-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--co-brand);
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}

.co-form-tag-remove:hover {
  color: var(--co-brand-dark);
}

/* =============================================
   Nested Fields
============================================= */
.co-nested-container {
  border-left: 3px solid var(--co-brand-light);
  padding-left: 20px;
}

.co-nested-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--co-border);
}

.co-nested-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--co-text);
  margin: 0 0 4px;
}

/* Scale down the primary-btn inside nested header */
.co-nested-header .primary-btn {
  font-size: 13px;
  padding: 8px 16px;
  white-space: nowrap;
}

.co-nested-entries {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.co-nested-entry {
  background: #fdfcff;
  border: 1.5px solid var(--co-border);
  border-radius: var(--co-radius);
  padding: 20px;
}

.co-nested-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.co-nested-entry-number {
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--co-brand);
  margin: 0;
}

.co-btn-remove-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 20px;
  background: transparent;
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  color: #ef4444;
  cursor: pointer; 
    transition: 0.4s all ease-in-out;
  flex-shrink: 0;
}

.co-btn-remove-entry:hover {
  background: #fff;
      border-color: rgba(var(--secondary-color), 1);
    box-shadow: 0 0 16px 0 rgba(var(--secondary-color), 0.4) inset, 0 0 3px 2px rgba(var(--secondary-color), 0.2);
}

.co-btn-remove-entry svg {
  display: block;
}

.co-nested-entry-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =============================================
   Form error list
============================================= */
.co-form-error-list {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* =============================================
   Validation error state
============================================= */
.co-error-control,
.co-error-control.co-form-input,
.co-error-control.co-form-dropzone {
  border-color: #ef4444 !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
  outline: none;
}

.co-form-field.co-error-control {
  /* Radio group error — highlight the wrapper */
  border: 1.5px solid #ef4444;
  border-radius: var(--co-radius);
  padding: 8px 12px;
  background: #fff8f8;
}
.loader-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 40px 0;
}
.loader-wrapper .loader-icon {
  color: rgba(var(--secondary-color), 1);
  animation: co-spin 0.9s linear infinite;
  font-size: 60px;
}
@keyframes co-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}