
/* =========================================================
   CRITICAL MOBILE VISIBILITY & CACHE FIX (v2.2)
   ========================================================= */
.bjp-card-wrapper,
.bjp-apply-wrapper,
.bjp-seo-intro {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    position: relative !important;
    z-index: 5 !important;
}

/* Bahrain Jobs Pro - Frontend Styles (100% Mobile First & RTL Ready) */
.bjp-card-wrapper,
.bjp-apply-wrapper,
.bjp-archive-grid {
    box-sizing: border-box;
    font-family: inherit;
    direction: rtl;
    text-align: right;
    margin: 24px 0;
}

.bjp-card-wrapper *,
.bjp-apply-wrapper *,
.bjp-archive-grid * {
    box-sizing: border-box;
}

/* Badges */
.bjp-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}
.bjp-badge-active {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.bjp-badge-urgent {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.bjp-badge-closed {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* =========================================================
   TEMPLATE 1: ROYAL BLUE & WHITE (Default)
   ========================================================= */
.bjp-template-royal-blue.bjp-card-wrapper {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(30, 64, 175, 0.06);
}

.bjp-template-royal-blue .bjp-card-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    padding: 15px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.bjp-header-title {
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bjp-card-body {
    padding: 18px;
}

.bjp-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.bjp-template-royal-blue .bjp-info-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: 4px solid #2563eb;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bjp-item-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.bjp-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bjp-item-label {
    font-size: 12px;
    color: #64748b;
}

.bjp-item-value {
    font-size: 14.5px;
    color: #0f172a;
    font-weight: 700;
}

/* =========================================================
   TEMPLATE 2: MODERN GRID
   ========================================================= */
.bjp-template-modern-grid.bjp-card-wrapper {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 6px;
}

.bjp-template-modern-grid .bjp-card-header {
    background: #ffffff;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bjp-template-modern-grid .bjp-info-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* =========================================================
   TEMPLATE 3: COMPACT CLEAN TABLE
   ========================================================= */
.bjp-template-compact-table.bjp-card-wrapper {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
}

.bjp-template-compact-table .bjp-card-header {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bjp-template-compact-table .bjp-card-body {
    padding: 0;
}

.bjp-template-compact-table .bjp-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bjp-template-compact-table .bjp-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.bjp-template-compact-table .bjp-info-item:nth-child(even) {
    background: #f8fafc;
}

.bjp-template-compact-table .bjp-item-text {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

/* =========================================================
   APPLY BOX & INTERACTIVE BUTTONS
   ========================================================= */
.bjp-apply-wrapper {
    background: linear-gradient(to bottom, #eff6ff, #ffffff);
    border: 2px solid #bfdbfe;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.07);
}

.bjp-apply-header {
    text-align: center;
    margin-bottom: 16px;
}

.bjp-apply-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.bjp-apply-subtitle {
    display: block;
    font-size: 13px;
    color: #475569;
}

.bjp-apply-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bjp-email-box {
    background: #ffffff;
    border: 1px dashed #60a5fa;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bjp-email-display {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.bjp-email-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.bjp-email-address {
    background: #f1f5f9;
    color: #1d4ed8;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    direction: ltr;
    user-select: all;
}

.bjp-email-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bjp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.3;
}

.bjp-btn-copy {
    background: #e0e7ff;
    color: #1e40af;
    border: 1px solid #c7d2fe;
}

.bjp-btn-copy:hover {
    background: #c7d2fe;
}

.bjp-btn-email {
    background: #2563eb;
    color: #ffffff !important;
}

.bjp-btn-email:hover {
    background: #1d4ed8;
}

.bjp-btn-whatsapp {
    background: #16a34a;
    color: #ffffff !important;
}

.bjp-btn-whatsapp:hover {
    background: #15803d;
}

.bjp-btn-link {
    background: #0f172a;
    color: #ffffff !important;
}

.bjp-btn-link:hover {
    background: #1e293b;
}

.bjp-closed-notice {
    background: #fef2f2;
    color: #991b1b;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

/* =========================================================
   ARCHIVE GRID SHORTCODE [jobs_grid]
   ========================================================= */
.bjp-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.bjp-grid-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease;
}

.bjp-grid-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
}

.bjp-grid-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bjp-grid-date {
    font-size: 12px;
    color: #64748b;
}

.bjp-grid-title {
    font-size: 16.5px;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.bjp-grid-title a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 700;
}

.bjp-grid-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    margin-bottom: 14px;
}

.bjp-grid-meta span {
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.bjp-grid-btn {
    display: block;
    text-align: center;
    background: #eff6ff;
    color: #1d4ed8 !important;
    text-decoration: none !important;
    padding: 9px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

/* =========================================================
   MOBILE OPTIMIZATION (99% Mobile Visitors)
   ========================================================= */
@media (max-width: 640px) {
    .bjp-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .bjp-card-body {
        padding: 14px;
    }
    .bjp-email-actions {
        grid-template-columns: 1fr;
    }
    .bjp-apply-wrapper {
        padding: 16px 14px;
    }
    .bjp-btn {
        width: 100%;
        padding: 13px 14px;
        font-size: 14.5px;
    }
}
