/* Main Container */
div.wfojb-main {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: #fff;
}

/* DataTable Customization */
/* Remove fixed width to make it responsive */
div.wfojb-container div.dt-container {
  width: 100% !important;
  margin: 0 auto;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.wfojb-container table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0 15px !important;
  /* Gap between rows */
  margin-top: 10px !important;
}

.wfojb-container table.dataTable thead th {
  background-color: transparent !important;
  color: #64748b !important;
  font-weight: 700 !important;
  border-bottom: none !important;
  padding: 10px 20px !important;
  font-size: 0.85rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card-like Rows */
.wfojb-container table.dataTable tbody tr {
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border-radius: 12px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 20px;
}

.wfojb-container table.dataTable tbody tr:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  background-color: #ffffff !important;
  z-index: 10;
  position: relative;
}

/* Cell Styling */
.wfojb-container table.dataTable tbody td {
  border: none !important;
  padding: 20px !important;
  vertical-align: middle;
  background-color: #fff;
  /* Ensure bg is white */
}

/* Rounded Corners for First and Last Cells */
.wfojb-container table.dataTable tbody td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.wfojb-container table.dataTable tbody td:last-child {
  border-bottom-right-radius: 12px;
}

/* Logo Cell */
.wfojb-logo-cell {
  width: 70px;
  text-align: center;
}

.wfojb-company-logo-small {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  padding: 4px;
  background: #fff;
}

/* Badge Updates */
.wfojb-badge-outline {
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
}

.wfojb-company-cell {
  font-weight: 600;
  color: #334155;
}

/* Featured Row Styling */
.wfojb-container table.dataTable tbody tr.wfojb-featured-row td {
  background-color: #fffbeb !important;
}

.wfojb-container table.dataTable tbody tr.wfojb-featured-row {
  border-left: 4px solid #f59e0b;
}

/* Buttons */
.wfojb-container .wfojb-button,
.wfojb-container button.wfojb-button {
  display: inline-block !important;
  padding: 8px 20px !important;
  background: linear-gradient(135deg, #4F46E5 0%, #4338ca 100%) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-align: center !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3) !important;
  line-height: normal !important;
  min-height: 0 !important;
  margin: 0 !important;
}

.wfojb-container .wfojb-button:hover,
.wfojb-container button.wfojb-button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.4) !important;
  opacity: 0.95 !important;
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%) !important;
}

.wfojb-container .wfojb-button.disabled,
.wfojb-container button.wfojb-button.disabled {
  pointer-events: none !important;
  opacity: 0.5 !important;
  background: #9ca3af !important;
  box-shadow: none !important;
}

/* Close Button */
.wfojb-close {
  display: inline-block;
  padding: 8px 20px;
  background: #ef4444;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
}

.wfojb-close:hover {
  background: #dc2626;
}

/* Detail Views */
img.wfojb_logo {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Template 1 Adjustments */
.wfojb-custom h3 {
  margin-bottom: 15px;
  color: #111827;
}

.wfojb-custom p {
  color: #4b5563;
  margin-bottom: 8px;
}

.wfojb-custom i {
  width: 20px;
  color: #4F46E5;
  margin-right: 5px;
}

/* Template 3: Glassmorphism */
.wfojb-glass-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px;
  border-radius: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.wfojb-glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 30px;
}

.wfojb-glass-image img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
}

.wfojb-glass-content {
  flex: 1;
}

.wfojb-glass-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
  font-family: 'Raleway', sans-serif;
}

.wfojb-glass-content h4 {
  background: rgba(0, 0, 0, 0.2);
  display: inline-block;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.wfojb-glass-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
  color: #fff;
}

.wfojb-glass-item {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.wfojb-glass-item i {
  margin-right: 10px;
  opacity: 0.8;
}

.wfojb-glass-desc {
  background: rgba(0, 0, 0, 0.1);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  line-height: 1.6;
  color: #fff;
}

.wfojb-glass-actions {
  display: flex;
  gap: 15px;
}

.wfojb-glass-btn {
  background: #fff;
  color: #4F46E5;
  padding: 10px 25px;
  border-radius: 30px;
  text-decoration: none !important;
  font-weight: bold;
  transition: transform 0.2s;
  border: none;
  cursor: pointer;
}

.wfojb-glass-btn:hover {
  transform: scale(1.05);
  background: #fff;
  color: #4F46E5;
}

.wfojb-glass-btn.secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.wfojb-glass-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Template 4: */

.wfojb-tpl4-css {
  border-left: 5px solid #000 !important;
}

.wfojb-tpl4-title {
  font-weight: 300;
  font-size: 2.5rem;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.wfojb-tpl4-sub-title {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 2rem;
}

.wfojb-tpl4-content {
  font-family: serif;
  font-size: 1.1rem;
  line-height: 1.8;
}

.wfojb-tpl4-meta {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.wfojb-tpl4-btn {
  display: block;
  width: 100%;
  padding: 15px 0;
  background: #000;
  color: #fff;
  text-align: center;
  text-decoration: none !important;
  font-weight: bold;
  transition: background 0.3s;
}

.wfojb-tpl4-close {
  display: block;
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: none;
  color: #999;
  margin-top: 10px;
  cursor: pointer;
}

/* Template 4: */

/* Template 5: */
.wfojb-tpl5-container {
  background-color: #000 !important;
}

.wfojb-tpl5-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #00f3ff;
  box-shadow: 0 0 15px #00f3ff;
}

.wfojb-tpl5-title {
  color: #00f3ff;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 5px #00f3ff;
}

.wfojb-tpl5-btn {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: linear-gradient(45deg, #00f3ff, #ff00ff);
  color: #fff;
  text-align: center;
  text-decoration: none !important;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(255, 0, 255, 0.4);
}

/* Template 5: */

/* Template 6: */
/* Template 6: Modern Card (Formerly The Magazine) */
.wfojb-tpl6-container {
  background-color: #fff !important;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #f3f4f6;
  overflow: hidden;
  padding: 0 !important;
}

.wfojb-tpl6-header {
  background: #f9fafb;
  padding: 25px 30px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  text-align: left;
  /* Reset */
  margin-bottom: 0;
  /* Reset */
}

.wfojb-tpl6-img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.wfojb-tpl6-header-content {
  flex: 1;
}

.wfojb-tpl6-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 5px 0;
  line-height: 1.2;
  font-family: inherit;
  /* Reset font */
  letter-spacing: normal;
}

.wfojb-tpl6-company {
  font-size: 1rem;
  color: #6b7280;
  font-weight: 500;
}

.wfojb-tpl6-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s;
  position: absolute;
  top: 20px;
  right: 20px;
}

.wfojb-tpl6-close:hover {
  color: #4b5563;
}

.wfojb-tpl6-body {
  padding: 30px;
}

.wfojb-tpl6-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}

.wfojb-tpl6-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f3f4f6;
  color: #4b5563;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.wfojb-tpl6-tag i {
  color: #6b7280;
  font-size: 0.8rem;
}

.wfojb-tpl6-tag-green {
  background: #ecfdf5;
  color: #059669;
}

.wfojb-tpl6-tag-green i {
  color: #10b981;
}

.wfojb-tpl6-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 30px;
  font-family: inherit;
}

.wfojb-tpl6-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 25px;
  border-top: 1px solid #e5e7eb;
  margin-top: 0;
  /* Reset */
  max-width: none !important;
  /* Reset */
}

.wfojb-tpl6-contact {
  display: flex;
  gap: 20px;
  color: #6b7280;
  font-size: 0.9rem;
}

.wfojb-tpl6-contact span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wfojb-tpl6-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #2563eb;
  color: #fff !important;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
  font-family: inherit;
  /* Reset */
  letter-spacing: normal;
  text-transform: none;
}

.wfojb-tpl6-btn:hover {
  background: #1d4ed8;
}

@media (max-width: 768px) {
  .wfojb-tpl6-footer {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .wfojb-tpl6-btn {
    width: 100%;
    text-align: center;
  }
}


/* Template 7: */

.wfojb-tpl7-sidebar {
  background: #f3f4f6;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wfojb-tpl7-main {
  background: #fff;
  padding: 40px;
}

.wfojb-tpl7-img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.wfojb-tpl7-company {
  font-weight: 800;
  color: #111827;
  margin-bottom: 5px;
}

.wfojb-tpl7-meta-item {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4b5563;
}

.wfojb-tpl7-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}

.wfojb-tpl7-title {
  font-weight: 800;
  font-size: 2rem;
  color: #111827;
  margin: 0;
}

.wfojb-tpl7-btn-close {
  background: #f3f4f6;
  border: none;
  color: #6b7280;
  border-radius: 6px;
  cursor: pointer;
}

.wfojb-tpl7-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 40px;
}

.wfojb-tpl7-btn {
  display: inline-block;
  width: 100%;
  padding: 16px;
  background: #111827;
  color: #fff;
  text-align: center;
  text-decoration: none !important;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s;
}

/* Template 7: */

/* Template 8: */
.wfojb-tpl8-container {
  background: linear-gradient(135deg, #18181b 0%, #000 100%) !important;
  color: #fff !important;
  font-family: 'Inter', sans-serif;
  padding: 40px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wfojb-tpl8-blob-1 {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: #7c3aed;
  filter: blur(120px);
  opacity: 0.3;
  border-radius: 50%;
  pointer-events: none;
}

.wfojb-tpl8-blob-2 {
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: #db2777;
  filter: blur(120px);
  opacity: 0.3;
  border-radius: 50%;
  pointer-events: none;
}

.wfojb-tpl8-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.wfojb-tpl8-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.wfojb-tpl8-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 16px;
  /* Use flex column to align content nicely */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wfojb-tpl8-card-title {
  color: #a78bfa !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.wfojb-tpl8-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: #e4e4e7 !important;
  font-size: 0.95rem;
  font-weight: 500;
}

.wfojb-tpl8-list-item:last-child {
  margin-bottom: 0;
}

.wfojb-tpl8-list-item i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.wfojb-tpl8-img-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wfojb-tpl8-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.wfojb-tpl8-title {
  font-weight: 700;
  font-size: 2rem;
  margin: 0;
  background: linear-gradient(to right, #fff, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wfojb-tpl8-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.wfojb-tpl8-content {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 30px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #d4d4d8;
}

.wfojb-tpl8-btn {
  display: block;
  width: 50%;
  padding: 18px;
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  color: #fff;
  text-align: center;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 0 auto;
}

.wfojb-tpl9-title {
  font-weight: 900;
  font-size: 3rem;
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
}

.wfojb-tpl9-company {
  font-weight: 700;
  font-size: 1.2rem;
  background: #fbbf24;
  display: inline-block;
  padding: 5px 10px;
  border: 3px solid #000;
  margin-top: 15px;
  box-shadow: 4px 4px 0px #000;
}

.wfojb-tpl9-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 30px;
  border-bottom: 4px solid #000;
  padding-bottom: 20px;
}

/* Loading Spinner */
.wfojb-container .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4F46E5;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#loading-spinner {
  display: none;
  text-align: center;
  margin: 30px 0;
}

/* Feature: Job Filtering */
/* Filters Row */
.wfojb-filters-row {
  display: flex !important;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  /* Ensure wrapping on small screens */
}

/* Filter Groups (Category, Location, Search) */
.wfojb-filter-group {
  flex: 1;
  /* Allow them to grow/shrink equally */
  min-width: 200px;
  /* Prevent them from getting too small */
}

/* Increase specificity for inputs/selects in filters */
.wfojb-filters-row select.wfojb-filter-select,
.wfojb-filters-row input.wfojb-custom-search {
  width: 100%;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  font-size: 0.95rem;
  color: #334155;
  outline: none;
  transition: all 0.2s ease;
  height: 45px;
  /* Ensure uniform height */
}

.wfojb-filters-row input.wfojb-custom-search:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Ensure Search Group aligns well */
.wfojb-search-group {
  position: relative;
}

.wfojb-filter-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

.wfojb-filter-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Feature: Featured Job Highlighting */
.wfojb-container table.dataTable tbody tr.wfojb-featured-row {
  background-color: #fffbeb !important;
  /* Amber-50 */
  border-left: 4px solid #f59e0b;
}

.wfojb-container table.dataTable tbody tr.wfojb-featured-row:hover {
  background-color: #fef3c7 !important;
  /* Amber-100 */
}

.wfojb-badge-featured {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #f59e0b;
  color: white;
  border-radius: 50%;
  margin-right: 8px;
  font-size: 0.75rem;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.wfojb-job-title-cell {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #1e293b;
}

/* =========================================
   FIX: Inline Details Expansion Styling
   ========================================= */

/* 1. Reset Child Row Container Styles */
/* Target the TR immediately following a .shown row (which is the child row) */
.wfojb-container table.dataTable tbody tr.shown+tr {
  background-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  /* Disable hover float effect */
  border: none !important;
}

.wfojb-container table.dataTable tbody tr.shown+tr:hover {
  background-color: transparent !important;
  /* Disable hover bg */
  box-shadow: none !important;
  transform: none !important;
}

/* 2. Reset Cell Styles for the Child Row */
.wfojb-container table.dataTable tbody tr.shown+tr td {
  padding: 0 !important;
  /* Remove the 20px padding forcing the box inward */
  background-color: transparent !important;
  /* Remove white background */
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* 3. Style the Content Container to Connect with Parent */
/* Override default margins to pull it up and fill the gap */
#wfojb-details-container {
  margin: 20px auto !important;
  /* Center it with spacing */
  padding: 0 !important;
  width: 95%;
  /* Constrain width like the previous version */
  box-sizing: border-box;
  position: relative;
  z-index: 100;
  border-radius: 8px;
  /* Ensure it looks like a card */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
  /* Restore shadow for depth */
}

/* Optional: Slight animation for entry */
#wfojb-details-container {
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   FIX: Content & Text Overflow
   ========================================= */

/* Ensure text doesn't overflow horizontally */
#wfojb-details-container p,
#wfojb-details-container div {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

/* Fix specific template text areas */
.wfojb-glass-desc {
  padding: 20px 25px !important;
  /* Ensure generic padding */
  box-sizing: border-box;
  width: 100%;
}

/* Fix the main container to ensure internal padding doesn't break width */
#wfojb-details-container {
  overflow: hidden;
  /* Cut off any rogue children */
}

/* Template 10: "The Notion" */
.wfojb-tpl10-container {
  background: #ffffff !important;
  border: 1px solid #e1e4e8;
  border-radius: 4px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  color: #37352f;
  padding: 40px !important;
}

.wfojb-tpl10-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.wfojb-tpl10-icon {
  font-size: 40px;
}

.wfojb-tpl10-title {
  font-weight: 700;
  font-size: 2.2rem;
  margin: 0;
  line-height: 1.2;
}

.wfojb-tpl10-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.wfojb-tpl10-callout {
  background: #f7f6f3;
  padding: 15px;
  border-radius: 4px;
}

.wfojb-tpl10-label {
  font-size: 0.8rem;
  color: #787774;
  text-transform: uppercase;
  margin-bottom: 5px;
  font-weight: 600;
}

.wfojb-tpl10-value {
  font-weight: 500;
}

.wfojb-tpl10-divider {
  border: 0;
  border-top: 1px solid #e1e4e8;
  margin: 30px 0;
}

.wfojb-tpl10-content {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.wfojb-tpl10-actions {
  display: flex;
  gap: 15px;
}

.wfojb-tpl10-btn {
  background: #000;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
}

.wfojb-tpl10-close {
  background: transparent;
  border: 1px solid #e1e4e8;
  padding: 10px 20px;
  border-radius: 4px;
  color: #37352f;
  cursor: pointer;
}

/* Template 12: "Hero Visual" */
.wfojb-tpl12-container {
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
  border: none !important;
}

.wfojb-tpl12-hero {
  height: 250px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.wfojb-tpl12-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.wfojb-tpl12-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.wfojb-tpl12-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 5px 0;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wfojb-tpl12-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.wfojb-tpl12-close-abs {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(5px);
}

.wfojb-tpl12-body {
  padding: 40px;
}

.wfojb-tpl12-card {
  background: #f8fafc;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.wfojb-tpl12-info-item {
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: #475569;
}

.wfojb-tpl12-info-item strong {
  display: block;
  color: #1e293b;
  margin-bottom: 3px;
}

.wfojb-tpl12-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  background: #0f172a;
  color: #fff;
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 700;
}

/* ========================================
   Template 11: Gradient Wave
   ======================================== */
.wfojb-tpl13-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  min-height: 400px;
  padding: 0 !important;
  border: none !important;
}

.wfojb-tpl13-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat center bottom;
  background-size: cover;
  pointer-events: none;
}

.wfojb-tpl13-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  color: #fff;
}

.wfojb-tpl13-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.wfojb-tpl13-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.wfojb-tpl13-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.wfojb-tpl13-company {
  margin: 5px 0 0 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.wfojb-tpl13-close {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  backdrop-filter: blur(5px);
}

.wfojb-tpl13-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.wfojb-tpl13-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wfojb-tpl13-badge i {
  margin-right: 6px;
}

.wfojb-tpl13-desc {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 16px;
  line-height: 1.7;
  margin-bottom: 25px;
  backdrop-filter: blur(5px);
}

.wfojb-tpl13-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  opacity: 0.9;
}

.wfojb-tpl13-contact i {
  margin-right: 8px;
}

.wfojb-tpl13-btn {
  display: inline-block;
  background: #fff;
  color: #667eea !important;
  padding: 16px 40px;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wfojb-tpl13-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.wfojb-tpl13-btn i {
  margin-left: 8px;
}

/* ========================================
   Template 12: Startup Fresh
   ======================================== */
.wfojb-tpl14-container {
  background: #fff !important;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: none !important;
  padding: 0 !important;
}

.wfojb-tpl14-accent {
  height: 6px;
  background: linear-gradient(90deg, #06b6d4 0%, #10b981 50%, #f59e0b 100%);
}

.wfojb-tpl14-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 10;
}

.wfojb-tpl14-inner {
  padding: 30px;
}

.wfojb-tpl14-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.wfojb-tpl14-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wfojb-tpl14-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.wfojb-tpl14-company {
  color: #64748b;
  margin: 4px 0 0 0;
  font-size: 0.95rem;
}

.wfojb-tpl14-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.wfojb-tpl14-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 20px;
  font-size: 0.85rem;
}

.wfojb-tpl14-chip i {
  color: #06b6d4;
}

.wfojb-tpl14-chip-accent {
  background: #ecfdf5;
  color: #059669;
}

.wfojb-tpl14-chip-accent i {
  color: #059669;
}

.wfojb-tpl14-content {
  line-height: 1.7;
  color: #334155;
  margin-bottom: 20px;
}

.wfojb-tpl14-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
}

.wfojb-tpl14-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.9rem;
  text-decoration: none;
}

.wfojb-tpl14-contact-item i {
  color: #06b6d4;
}

.wfojb-tpl14-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
  color: #fff !important;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wfojb-tpl14-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

/* ========================================
   Template 13: Slack Workspace
   ======================================== */
.wfojb-tpl15-container {
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e1e1e1;
  min-height: 400px;
}

.wfojb-tpl15-sidebar {
  width: 280px;
  background: #3F0E40;
  padding: 24px;
  color: #fff;
  flex-shrink: 0;
}

.wfojb-tpl15-logo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 16px;
}

.wfojb-tpl15-company {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 24px 0;
  color: #fff;
}

.wfojb-tpl15-meta {
  margin-bottom: 24px;
}

.wfojb-tpl15-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.wfojb-tpl15-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wfojb-tpl15-contact {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.wfojb-tpl15-contact div {
  margin-bottom: 8px;
}

.wfojb-tpl15-contact i {
  margin-right: 8px;
  width: 16px;
}

.wfojb-tpl15-main {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.wfojb-tpl15-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e1e1e1;
}

.wfojb-tpl15-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1D1C1D;
  margin: 0;
}

.wfojb-tpl15-close {
  background: transparent;
  border: none;
  color: #616061;
  font-size: 1.2rem;
  cursor: pointer;
}

.wfojb-tpl15-content {
  flex: 1;
  line-height: 1.7;
  color: #1D1C1D;
  font-size: 0.95rem;
}

.wfojb-tpl15-address {
  margin-top: 16px;
  padding: 12px 16px;
  background: #F8F8F8;
  border-radius: 8px;
  color: #616061;
  font-size: 0.9rem;
}

.wfojb-tpl15-address i {
  margin-right: 8px;
  color: #E01E5A;
}

.wfojb-tpl15-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background: #007a5a;
  color: #fff !important;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none !important;
  text-align: center;
  transition: background 0.2s;
}

.wfojb-tpl15-btn:hover {
  background: #005e46;
}

/* ========================================
   Template 14: Executive Dark
   ======================================== */
.wfojb-tpl16-container {
  background: #1a1a2e !important;
  border-radius: 16px;
  overflow: hidden;
  border: none !important;
  padding: 0 !important;
}

.wfojb-tpl16-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px;
  background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wfojb-tpl16-logo {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.wfojb-tpl16-header-text {
  flex: 1;
}

.wfojb-tpl16-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}

.wfojb-tpl16-company {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 0.95rem;
}

.wfojb-tpl16-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 1rem;
}

.wfojb-tpl16-body {
  padding: 30px;
}

.wfojb-tpl16-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.wfojb-tpl16-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wfojb-tpl16-meta-item i {
  color: #8b5cf6;
  font-size: 0.9rem;
}

.wfojb-tpl16-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wfojb-tpl16-value {
  font-size: 0.9rem;
  color: #fff;
  margin-left: 8px;
}

.wfojb-tpl16-meta-gold i {
  color: #fbbf24;
}

.wfojb-tpl16-meta-gold .wfojb-tpl16-value {
  color: #fbbf24;
}

.wfojb-tpl16-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.wfojb-tpl16-content {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: 24px;
}

.wfojb-tpl16-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-bottom: 24px;
}

.wfojb-tpl16-contact a,
.wfojb-tpl16-contact span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  text-decoration: none;
}

.wfojb-tpl16-contact i {
  color: #8b5cf6;
}

.wfojb-tpl16-footer {
  padding: 0 30px 30px;
}

.wfojb-tpl16-btn {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  color: #fff !important;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wfojb-tpl16-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

/* ========================================
   Template 15: Split View
   ======================================== */
.wfojb-tpl17-container {
  display: flex !important;
  background: #fff !important;
  border-radius: 16px;
  overflow: hidden;
  min-height: 400px;
  border: none !important;
  padding: 0 !important;
}

.wfojb-tpl17-left {
  width: 40%;
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 400px;
}

.wfojb-tpl17-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.wfojb-tpl17-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wfojb-tpl17-company {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 16px 0;
  font-size: 0.95rem;
}

.wfojb-tpl17-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wfojb-tpl17-badge {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  backdrop-filter: blur(5px);
}

.wfojb-tpl17-badge-accent {
  background: rgba(34, 197, 94, 0.9);
}

.wfojb-tpl17-right {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.wfojb-tpl17-close {
  position: absolute;
  top: 10px;
  right: 20px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  font-size: 0.9rem;
}

.wfojb-tpl17-info {
  margin-bottom: 20px;
}

.wfojb-tpl17-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  color: #475569;
}

.wfojb-tpl17-info-row:last-child {
  border-bottom: none;
}

.wfojb-tpl17-info-row i {
  color: #3b82f6;
  width: 16px;
}

.wfojb-tpl17-info-row a {
  color: #3b82f6;
  text-decoration: none;
}

.wfojb-tpl17-content {
  flex: 1;
  color: #334155;
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.wfojb-tpl17-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff !important;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none !important;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wfojb-tpl17-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

/* Responsive adjustments for new templates */
@media (max-width: 768px) {
  .wfojb-tpl13-header {
    flex-direction: column;
    text-align: center;
  }

  .wfojb-tpl13-close {
    position: absolute;
    top: 20px;
    right: 20px;
  }

  .wfojb-tpl15-container {
    flex-direction: column;
  }

  .wfojb-tpl15-sidebar {
    width: 100%;
  }

  .wfojb-tpl16-title {
    font-size: 2rem;
  }

  .wfojb-tpl16-grid {
    flex-direction: column;
    align-items: center;
  }

  .wfojb-tpl17-header-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ========================================= */
/* GRID VIEW LAYOUT (Fixed 4 Columns)       */
/* ========================================= */

.wfojb-layout-grid table.dataTable,
.wfojb-layout-grid table.dataTable thead,
.wfojb-layout-grid table.dataTable tbody,
.wfojb-layout-grid table.dataTable tr,
.wfojb-layout-grid table.dataTable td {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ========================================= */
/* GRID VIEW STYLES (STRICTLY SCOPED)        */
/* ========================================= */

.wfojb-layout-grid table.dataTable thead {
  display: none !important;
}

.wfojb-layout-grid table.dataTable tbody {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  padding-top: 20px !important;
}

.wfojb-layout-grid table.dataTable tbody tr {
  /* Card Base */
  flex: 0 0 calc(25% - 15px) !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: center !important;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 0 !important;
  box-shadow: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 380px;
  /* Taller for description */
  position: relative;
  padding: 5px !important;
  /* Internal padding */
}

.wfojb-layout-grid table.dataTable tbody tr:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Make cells full width blocks in grid */
.wfojb-layout-grid table.dataTable tbody td {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

/* --- GRID VIEW CONTENT STYLING --- */

/* 1. Flex Row becomes Column */
.wfojb-layout-grid .wfojb-flex-row {
  flex-direction: column !important;
  gap: 15px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
}

/* 2. Logo Section */
.wfojb-layout-grid .wfojb-logo-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 5px;
}

.wfojb-layout-grid .wfojb-company-logo-small {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* 3. Content Section centered */
.wfojb-layout-grid .wfojb-content-section {
  text-align: center !important;
  align-items: center !important;
  width: 100%;
}

/* 4. Title & Company */
.wfojb-layout-grid .wfojb-title-company-wrapper {
  justify-content: center !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.wfojb-layout-grid .wfojb-job-title {
  font-size: 1.15rem !important;
  margin: 0 !important;
}

.wfojb-layout-grid .wfojb-company-inline {
  font-size: 0.95rem !important;
}

/* 5. Meta (City only) */
.wfojb-layout-grid .wfojb-job-meta {
  justify-content: center !important;
  margin-bottom: 10px !important;
}

.wfojb-layout-grid .wfojb-job-meta-secondary {
  display: none !important;
}

/* 6. Description (Hide in Grid) */
.wfojb-layout-grid .wfojb-job-excerpt {
  display: none !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  text-overflow: ellipsis;
  max-height: 4.5em;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 15px;
  width: 100%;
  word-break: break-word;
  white-space: normal !important;
}

/* 7. Actions (Push to bottom) */
.wfojb-layout-grid .wfojb-actions-cell {
  margin-top: auto !important;
  /* Push to bottom of card */
  text-align: center !important;
  width: 100% !important;
}

.wfojb-layout-grid .wfojb-actions-wrapper {
  justify-content: center !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.wfojb-layout-grid .details-btn {
  width: 80% !important;
  /* Wider button */
  border-radius: 8px !important;
  justify-content: center !important;
}

.wfojb-layout-grid .details-btn::after {
  content: " Details";
  margin-left: 5px;
  font-weight: 600;
}

/* Responsive Grid Breakpoints */
@media (max-width: 1200px) {
  .wfojb-layout-grid table.dataTable tbody tr {
    flex: 0 0 calc(33.333% - 14px) !important;
    width: calc(33.333% - 14px) !important;
    max-width: calc(33.333% - 14px) !important;
  }
}

@media (max-width: 900px) {
  .wfojb-layout-grid table.dataTable tbody tr {
    flex: 0 0 calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
  }
}

@media (max-width: 600px) {
  .wfojb-layout-grid table.dataTable tbody tr {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* ========================================= */
/* LIST VIEW (NEW TABLE DESIGN)              */
/* ========================================= */

/* Remove Default DataTable Borders & Spacing */
.wfojb-container table.dataTable.no-footer,
.wfojb-container table.dataTable thead th,
.wfojb-container table.dataTable tbody td,
.wfojb-container table.dataTable {
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
}

/* FIX: Remove DataTables Default Stripe Shadow (The "Inset" Shadow) */
.wfojb-container table.dataTable.stripe>tbody>tr.odd>*,
.wfojb-container table.dataTable.display>tbody>tr.odd>* {
  box-shadow: none !important;
}

/* Remove wrapper borders if any */
.wfojb-container .dataTables_wrapper.no-footer .dataTables_scrollBody {
  border-bottom: none !important;
}

.wfojb-container table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0 15px !important;
  /* Space between rows */
  table-layout: fixed !important;
  /* FIX: Prevent table from expanding efficiently */
  width: 100% !important;
}

/* Style Rows as Cards */
.wfojb-container table.dataTable tbody tr {
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  /* Soft shadow */
  border-radius: 12px;
  /* Rounded corners */
  transform: scale(1);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 20px;
  /* Backup margin */
  border: none !important;
  /* Ensure row has no border */
}

.wfojb-container table.dataTable tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 1;
  /* Bring above others */
}

/* Cell Specifics */
/* Cell Specifics */
/* Combined Info Cell */
.wfojb-info-cell {
  text-align: left;
  padding: 10px 15px !important;
  vertical-align: middle;
  width: 100%;
  /* FIX: Push actions to the right */
}

/* Main Flex Container for Logo + Content */
.wfojb-flex-row {
  display: flex;
  align-items: center;
  gap: 15px;
  /* Control gap between logo and text here */
}

/* Logo Section */
.wfojb-logo-section {
  flex-shrink: 0;
  /* Prevent shrinking */
  position: relative;
  /* For ribbon */
}

/* Content Section */
.wfojb-content-section {
  flex-grow: 1;
  /* Take remaining space */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wfojb-actions-cell {
  width: auto;
  /* FIX: Remove fixed width */
  white-space: nowrap;
  /* Keep buttons inline */
  text-align: right !important;
  vertical-align: middle;
  border-bottom-right-radius: 12px;
  padding-right: 20px !important;
}

.wfojb-logo-wrapper {
  background: #fff;
  border: 1px solid #f1f5f9;
  padding: 5px;
  border-radius: 8px;
  display: inline-block;
}

.wfojb-company-logo-small {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* FIX: New wrapper for inline Title + Company */
.wfojb-title-company-wrapper {
  display: flex;
  align-items: center;
  /* Align text vertically */
  flex-wrap: wrap;
  /* Allow wrap on small screens */
  gap: 8px;
  /* Space between title and company */
  margin-bottom: 4px;
  /* Reduced space below title row */
}

.wfojb-job-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  /* Remove bottom margin to align with company */
  color: #1e293b;
  line-height: 1.2;
}

.wfojb-company-inline {
  font-size: 0.95rem;
  color: #3b82f6;
  font-weight: 500;
}

/* Add @ symbol before company name */
.wfojb-company-inline::before {
  content: "@";
  margin-right: 3px;
  color: #94a3b8;
}

.wfojb-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #64748b;
  /* Changed default meta color */
  /* Blueish for links/companies */
}

.wfojb-meta-item i {
  color: #94a3b8;
  margin-right: 5px;
}

.wfojb-location {
  color: #64748b;
}

.wfojb-job-meta-secondary {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.wfojb-actions-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.wfojb-job-type-badge {
  background-color: #2563eb;
  /* Blue badge */
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Orange for Part Time */
[data-job-type="PART_TIME"] .wfojb-job-type-badge {
  background-color: #ea580c;
}

/* Green for Freelance/Contract */
[data-job-type="CONTRACTOR"] .wfojb-job-type-badge,
[data-job-type="FREELANCE"] .wfojb-job-type-badge {
  background-color: #65a30d;
}

.wfojb-container .details-btn {
  background: #0ea5e9;
  /* Sky blue circle */
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.details-btn:hover {
  background: #0284c7;
}

/* URGENT RIBBON (Featured) */
/* URGENT RIBBON (Featured) - Modern Corner Badge */
.wfojb-urgent-ribbon {
  position: absolute;
  top: -4px;
  left: -4px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 4px 0 4px 0;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 20;
  text-transform: uppercase;
  transform: none;
  width: auto;
  text-align: center;
  letter-spacing: 0.5px;
}

/* 3D Fold Effect */
.wfojb-urgent-ribbon::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  border-top: 4px solid #7f1d1d;
  border-left: 4px solid transparent;
}

/* Styles specifically for the Ribbon positioning in Table View */
table.dataTable tbody tr {
  position: relative;
  /* Contain absolute ribbon */
  overflow: hidden;
  /* Clip ribbon */
}

/* Ensure the first cell (Logo) handles the ribbon correctly */
table.dataTable tbody td.wfojb-logo-cell {
  position: relative;
  padding-top: 25px !important;
  /* Make room */
  overflow: hidden;
  /* border-top-left-radius handled above */
  /* border-bottom-left-radius handled above */
}



/* Override DataTable Defaults for Cleaner Look */
table.dataTable.no-footer {
  border-bottom: none !important;
}

table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0 15px !important;
  width: 100% !important;
  /* table-layout: fixed; REMOVED: Allow fluid width to fill space */
}

/* Add vertical padding to cells for "gap" */
table.dataTable tbody td {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

/* Ensure the first cell (Logo+Info) handles the ribbon correctly */
table.dataTable tbody td.wfojb-info-cell {
  position: relative;
  /* For ribbon anchor */
}


/* FIX OVERRIDE: Reset Child Row Styles to prevent "Big Box" issue */
table.dataTable tbody tr.child {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  margin: 0 !important;
}

table.dataTable tbody tr.child td {
  padding: 0 !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

table.dataTable tbody tr.child:hover {
  background-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Ensure content is left-aligned and contained */
/* Ensure content is left-aligned and contained */
.wfojb-details-container {
  width: 100%;
  max-width: 100%;
  /* FIX: Changed from 100vw to 100% to stop overflow */
  box-sizing: border-box;
  margin-top: 10px;
  text-align: left !important;
  /* Fix centering issue */
  /* Fix overflow issue */
}

/* FIX: Absolute force wrapping on ALL children of the details container */
.wfojb-details-container * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* FIX: Absolute force wrapping on ALL children of the details container */
.wfojb-details-container * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* FIX: Right-align Pagination and Infos */
.wfojb-container .dataTables_wrapper .dataTables_info,
.wfojb-container .dataTables_wrapper .dataTables_paginate,
.wfojb-container .dt-info,
.wfojb-container .dt-paging {
  float: right !important;
  text-align: right !important;
  padding-top: 10px;
  justify-content: flex-end;
  /* For flex containers like .dt-paging */
}

.wfojb-container .dataTables_wrapper .dataTables_info {
  clear: both;
  /* Ensure info sits above or below if needed, or floats nicely */
  width: 100%;
  /* Take full width to force next line if needed, or just let it float */
  margin-bottom: 5px;
  color: #64748b !important;
  font-size: 0.9rem;
}

.wfojb-container .dataTables_wrapper .dataTables_paginate {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

/* Clearfix for wrapper */
.wfojb-container .dataTables_wrapper::after {
  content: "";
  display: block;
  clear: both;
}

/* Ensure the cell itself doesn't force centering */
table.dataTable tbody tr.child td {
  text-align: left !important;
  padding: 0 !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  /* FIX: Force long words to break */
  overflow-wrap: break-word !important;
  max-width: 0;
  /* FIX: Trick to force browser to respect table-layout in child row */
}

/* =========================================
   GRID LAYOUT IMPROVEMENTS & COLUMNS SSETTING
   ========================================= */

/* Grid Container */
.wfojb-layout-grid .dataTables_wrapper table.dataTable tbody,
.wfojb-layout-grid table.dataTable tbody {
  display: grid !important;
  grid-template-columns: repeat(var(--wfojb-columns, 3), 1fr) !important;
  gap: 20px !important;
  width: 100% !important;
}

/* Make rows display as flex cards */
.wfojb-layout-grid table.dataTable tbody tr {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  /* Ensure it takes full width of grid cell */
  margin-bottom: 0;
  /* Remove default margin */
  /* align-items: center;  <-- REMOVED: This was preventing full width */
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  /* Ensure content stays inside */
  background: #fff;
  /* Ensure card has background */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  /* Optional: add subtle shadow for better card look */
}

/* Cells become full width containers */
.wfojb-layout-grid table.dataTable tbody td {
  width: 100% !important;
  display: block;
  padding: 10px 20px !important;
  border: none;
  border-radius: 0 !important;
}

/* Adjust Logo Cell */
.wfojb-layout-grid table.dataTable tbody td.wfojb-logo-cell {
  padding-top: 25px !important;
  padding-bottom: 5px !important;
}

.wfojb-layout-grid .wfojb-company-logo-small {
  width: 70px;
  height: 70px;
  margin: 0 auto;
}

/* Job Info Cell */
.wfojb-layout-grid table.dataTable tbody td:nth-child(2) {
  flex: 1;
  width: 100%;
  /* Force full width */
  /* Take up remaining vertical space */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  /* Center text content but keep container full width */
}

/* TEXT TRUNCATION & LIMITS */
.wfojb-layout-grid .wfojb-job-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.6em;
  /* Reserve height for 2 lines */
}

.wfojb-layout-grid .wfojb-company-cell {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

.wfojb-layout-grid .wfojb-job-address {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

/* Hide other metadata in grid to keep it clean, or limit them */
.wfojb-layout-grid .wfojb-badge-outline {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Actions Cell */
.wfojb-layout-grid table.dataTable tbody td:last-child {
  padding-bottom: 25px !important;
  margin-top: auto;
  /* Push to bottom */
}

/* RESPONSIVE: Stack on Mobile */
@media (max-width: 768px) {

  /* --- 1. GRID VIEW RESPONISVE --- */
  .wfojb-layout-grid .dataTables_wrapper table.dataTable tbody,
  .wfojb-layout-grid table.dataTable tbody {
    grid-template-columns: 1fr !important;
    /* Force 1 column on mobile */
  }

  /* --- 2. TABLE VIEW RESPONSIVE (Stacking) --- */
  /* Force Table to behave like a List/Grid */
  .wfojb-container table.dataTable,
  .wfojb-container table.dataTable tbody,
  .wfojb-container table.dataTable tr,
  .wfojb-container table.dataTable td {
    display: block !important;
    width: 100% !important;
  }

  /* Hide Table Headings */
  .wfojb-container table.dataTable thead {
    display: none !important;
  }

  /* Row Card Styling */
  .wfojb-container table.dataTable tbody tr {
    margin-bottom: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding-bottom: 20px !important;
  }

  /* Info Cell (Logo + Details) */
  .wfojb-container .wfojb-info-cell {
    padding: 20px 15px 5px 15px !important;
  }

  /* Flex Row for Logo + Content -> Stack them */
  .wfojb-container .wfojb-flex-row {
    flex-direction: column !important;
    gap: 15px !important;
  }

  /* Logo Wrapper */
  .wfojb-container .wfojb-logo-wrapper {
    margin-bottom: 0;
  }

  /* Content Section */
  .wfojb-container .wfojb-content-section {
    text-align: center !important;
    width: 100% !important;
  }

  /* Title & Company */
  .wfojb-container .wfojb-title-company-wrapper {
    justify-content: center !important;
    flex-direction: column !important;
    gap: 5px !important;
    margin-bottom: 10px !important;
  }

  .wfojb-container .wfojb-job-title {
    font-size: 1.3rem !important;
  }

  /* Meta Data (Location, Date, Category) -> Center & Wrap */
  .wfojb-container .wfojb-job-meta,
  .wfojb-container .wfojb-job-meta-secondary {
    justify-content: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
  }

  /* Description Excerpt */
  .wfojb-container .wfojb-job-excerpt {
    text-align: center !important;
    margin: 0 auto !important;
  }

  /* Actions Cell */
  .wfojb-container .wfojb-actions-cell {
    text-align: center !important;
    padding: 10px 20px 0 20px !important;
    border-top: 1px solid #f1f5f9;
    width: 100% !important;
    display: block !important;
  }

  /* Actions Wrapper */
  .wfojb-container .wfojb-actions-wrapper {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    width: 100% !important;
  }

  /* Full Width Apply Button for easier tapping */
  .wfojb-container .wfojb-actions-wrapper .wfojb-button {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px !important;
  }

  /* Keep Heart Button Compact */
  .wfojb-container .wfojb-actions-wrapper .details-btn {
    width: 45px !important;
    height: 45px !important;
    flex: 0 0 45px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  /* RIBBON POSITIONING FIX ON MOBILE */
  .wfojb-urgent-ribbon {
    left: -35px !important;
    top: 5px !important;
    transform: rotate(-45deg) scale(0.9) !important;
  }

  /* SEARCH & FILTERS RESPONSIVE */
  .wfojb-filters-row {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .wfojb-filter-group {
    width: 100% !important;
  }
}