/* MB Jobs — minimalist, integrates with Porto theme buttons & forms */

.mbj-listing { max-width: 960px; margin: 40px auto; }

.mbj-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; align-items: center; }
.mbj-filters input, .mbj-filters select { padding: .5rem .75rem; border: 1px solid #ddd; border-radius: 4px; }
.mbj-filters input { min-width: 200px; }
.mbj-filters select { min-width: 180px; padding-right: 2rem; }
.mbj-filters a.btn-dark { margin-left: auto; }

.mbj-list { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media(min-width: 768px) { .mbj-list { grid-template-columns: 1fr 1fr; } }

.mbj-card { border: 1px solid #e5e5e5; border-radius: 6px; padding: 1.25rem; background: #fff; transition: box-shadow .15s; }
.mbj-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.mbj-card-title { margin: 0 0 .5rem; font-size: 1.15rem; }
.mbj-card-title a { color: #222; text-decoration: none; }
.mbj-card-title a:hover { color: #d44; }
.mbj-card-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .85rem; color: #666; margin-bottom: .75rem; }
.mbj-card-meta span { white-space: nowrap; }
.mbj-card-excerpt { font-size: .95rem; color: #444; margin-bottom: 1rem; line-height: 1.5; }
.mbj-card-footer { display: flex; gap: .5rem; align-items: center; }
.mbj-card-footer small { color: #999; }

.mbj-pagination { margin-top: 2rem; text-align: center; }
.mbj-pagination .page-numbers { display: inline-block; padding: .4rem .7rem; margin: 0 .15rem; border: 1px solid #ddd; border-radius: 3px; color: #444; text-decoration: none; }
.mbj-pagination .page-numbers.current { background: #d44; color: #fff; border-color: #d44; }

.mbj-empty { padding: 2rem; text-align: center; color: #888; background: #f7f7f7; border-radius: 6px; }

/* Forms */
.mbj-form-wrap { max-width: 680px; margin: 40px auto; }
.mbj-step { display: none; padding: 1.5rem; background: #fafafa; border-radius: 6px; margin-bottom: 1rem; }
.mbj-step.mbj-step-active { display: block; }
.mbj-step h3 { margin-top: 0; }
.mbj-step label { display: block; margin: .75rem 0; font-weight: 600; }
.mbj-step label small { font-weight: normal; color: #888; }
.mbj-step input[type=text], .mbj-step input[type=email], .mbj-step textarea, .mbj-step select {
    width: 100%; padding: .55rem .75rem; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; font-family: inherit;
    margin-top: .25rem;
}
.mbj-step input:focus, .mbj-step textarea:focus, .mbj-step select:focus { outline: none; border-color: #d44; }

.mbj-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media(min-width: 640px) { .mbj-row { grid-template-columns: 1fr 1fr; } }

.mbj-form-actions { display: flex; gap: .5rem; margin-top: 1.5rem; }

.mbj-msg { padding: .75rem 1rem; border-radius: 4px; margin-top: 1rem; }
.mbj-msg.mbj-msg-error   { background: #fee; color: #a22; border: 1px solid #fcc; }
.mbj-msg.mbj-msg-success { background: #efe; color: #2a2; border: 1px solid #cfc; }
.mbj-msg.mbj-msg-info    { background: #eef; color: #229; border: 1px solid #ccf; }

/* Pharmacy search dropdown */
.mbj-search { position: relative; }
.mbj-search input { width: 100%; padding: .65rem .85rem; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; }
.mbj-search-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #ddd; border-top: none; max-height: 320px; overflow-y: auto; z-index: 10; }
.mbj-result { padding: .65rem .85rem; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.mbj-result:hover, .mbj-result.mbj-result-active { background: #f5f5f5; }
.mbj-result strong { display: block; color: #222; }
.mbj-result small { color: #777; font-size: .85rem; }
.mbj-result.mbj-no-email { opacity: .55; cursor: not-allowed; }

.mbj-pharmacy-chosen { padding: .75rem; background: #fff; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 1rem; }
.mbj-pharmacy-chosen strong { display: block; }
.mbj-email-masked { font-family: monospace; font-size: 1.1rem; color: #d44; }

/* Single job */
.mbj-single { max-width: 760px; margin: 40px auto; }
.mbj-single-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; padding: 1rem; background: #f7f7f7; border-radius: 6px; margin-bottom: 1.5rem; }
.mbj-single-content { font-size: 1.05rem; line-height: 1.6; margin-bottom: 2rem; }
.mbj-contact-card { background: #f7f9fc; border: 1px solid #e3e8ef; border-radius: 8px; padding: 1.75rem; margin-top: 2rem; }
.mbj-contact-head { text-align: center; margin-bottom: 1.25rem; }
.mbj-contact-head h3 { margin: 0 0 .25rem; font-size: 1.2rem; color: #1f2937; }
.mbj-contact-head p { margin: 0; color: #6b7280; font-size: .9rem; }

.mbj-contact-actions { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media(min-width: 600px) { .mbj-contact-actions { grid-template-columns: 1fr 1fr; } }

.mbj-contact-btn {
  display: flex; align-items: center; gap: .85rem;
  padding: .9rem 1.1rem;
  background: #fff;
  border: 1px solid #d1d8e0;
  border-radius: 6px;
  text-decoration: none !important;
  color: #1f2937;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.mbj-contact-btn:hover { border-color: #2563eb; box-shadow: 0 2px 8px rgba(37,99,235,.12); color: #1f2937; transform: translateY(-1px); }
.mbj-contact-btn:active { transform: translateY(0); }

.mbj-contact-icon { flex-shrink: 0; color: #2563eb; }
.mbj-contact-text { display: flex; flex-direction: column; min-width: 0; }
.mbj-contact-text small { color: #6b7280; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.mbj-contact-text strong { font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mbj-notice { padding: .75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.mbj-notice-warning { background: #fff8e1; border: 1px solid #ffe082; color: #8a6d00; }

/* OTP boxes */
.mbj-step .mbj-otp { display: flex; gap: .4rem; justify-content: center; margin: 1rem 0; }
.mbj-step .mbj-otp .mbj-otp-box {
  flex: 0 0 auto;
  width: 2.2rem; height: 2.4rem;
  text-align: center;
  font-size: 1.1rem; font-weight: 600;
  border: 2px solid #d1d5db; border-radius: 5px;
  background: #fff;
  padding: 0;
  margin: 0;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s;
}
.mbj-step .mbj-otp .mbj-otp-box:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
@media(max-width: 480px) {
  .mbj-step .mbj-otp { gap: .3rem; }
  .mbj-step .mbj-otp .mbj-otp-box { width: 2rem; height: 2.3rem; font-size: 1rem; }
}

/* Session banner */
.mbj-session-banner {
  max-width: 680px; margin: 40px auto 0;
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.1rem;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 6px;
}
.mbj-session-info { flex: 1; }
.mbj-session-info strong { display: block; color: #065f46; font-size: .95rem; }
.mbj-session-info small { color: #047857; font-size: .8rem; }
.mbj-session-logout { padding: .4rem .8rem; border: 1px solid #a7f3d0; background: #fff; color: #065f46; border-radius: 4px; cursor: pointer; font-size: .85rem; }
.mbj-session-logout:hover { background: #d1fae5; }

/* Manage list */
.mbj-job-row { padding: 1rem; background: #fff; border: 1px solid #e5e5e5; border-radius: 4px; margin-bottom: .75rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mbj-job-row .mbj-job-info { flex: 1; min-width: 0; }
.mbj-job-row .mbj-job-info strong { display: block; }
.mbj-job-row .mbj-job-info small { color: #888; }
.mbj-job-actions { display: flex; gap: .35rem; }
.mbj-job-actions button { padding: .35rem .65rem; font-size: .85rem; border: 1px solid #ccc; background: #fff; border-radius: 3px; cursor: pointer; }
.mbj-job-actions button:hover { background: #f5f5f5; }
.mbj-job-actions .mbj-btn-danger { color: #c00; border-color: #fcc; }
.mbj-job-actions .mbj-btn-danger:hover { background: #fee; }

.mbj-status-active  { color: #2a2; }
.mbj-status-closed  { color: #888; }
.mbj-status-expired { color: #c44; }

/* Tabs */
.mbj-tabs { display: flex; gap: .25rem; border-bottom: 1px solid #e5e7eb; margin-bottom: 1rem; }
.mbj-tab {
  padding: .5rem 1rem;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-size: .95rem; color: #6b7280;
}
.mbj-tab:hover { color: #111827; }
.mbj-tab.mbj-tab-active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }

/* Pharmacy single page (narrow card layout) */
.mbj-pharm-page { background: #f8f9fa; padding: 40px 16px; min-height: 60vh; }
.mbj-pharm-inner { max-width: 720px; margin: 0 auto; background: #fff; padding: 2rem 2.25rem; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.mbj-pharm-head { padding-bottom: 1.25rem; border-bottom: 1px solid #f1f3f5; margin-bottom: 1.5rem; }
.mbj-pharm-head h1 { margin: 0 0 .5rem; font-size: 1.65rem; color: #111827; line-height: 1.25; }
.mbj-pharm-head .mbj-pharm-addr { color: #6b7280; margin: 0 0 .5rem; font-size: .95rem; }
.mbj-pharm-head .mbj-pharm-tip { display: inline-block; padding: 2px 10px; background: #d1fae5; color: #065f46; border-radius: 999px; font-size: .8rem; font-weight: 500; }
.mbj-pharm-bio { color: #374151; line-height: 1.65; margin-bottom: 1.5rem; }
.mbj-pharm-bio p { margin: 0 0 1rem; }
.mbj-pharm-card { background: #f7f9fc; border: 1px solid #e3e8ef; border-radius: 8px; padding: 1.25rem 1.4rem; }
.mbj-pharm-card h2 { margin: 0 0 .75rem; font-size: 1rem; color: #1f2937; }
.mbj-pharm-row { margin: .4rem 0; font-size: .95rem; color: #374151; }
.mbj-pharm-row a { color: #2563eb; text-decoration: none; }
.mbj-pharm-row a:hover { text-decoration: underline; }
.mbj-pharm-mapbtn { display: inline-block; padding: .55rem 1.1rem; background: #10b981; color: #fff !important; border-radius: 6px; text-decoration: none; font-size: .9rem; }
.mbj-pharm-mapbtn:hover { background: #047857; }
@media (max-width: 600px) {
  .mbj-pharm-page { padding: 20px 12px; }
  .mbj-pharm-inner { padding: 1.5rem 1.25rem; }
  .mbj-pharm-head h1 { font-size: 1.35rem; }
}

.mbj-job-block { margin-bottom: .75rem; }
.mbj-job-block .mbj-job-row { margin-bottom: 0; }
.mbj-job-edit { padding: 1.25rem; background: #fafafa; border: 1px solid #e5e5e5; border-top: none; border-radius: 0 0 4px 4px; }
.mbj-edit-form label { display: block; margin: .65rem 0; font-weight: 600; font-size: .9rem; }
.mbj-edit-form input, .mbj-edit-form textarea, .mbj-edit-form select {
  width: 100%; padding: .5rem .7rem; border: 1px solid #ccc; border-radius: 4px; font-size: .95rem; font-family: inherit; margin-top: .25rem;
}
.mbj-edit-form input:focus, .mbj-edit-form textarea:focus, .mbj-edit-form select:focus { outline: none; border-color: #2563eb; }
