/* ============================================
   WP HR Recruitment Pro2 — Frontend Styles
   Modern Job Board with Glassmorphism
   ============================================ */

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

/* === Base === */
.whrp-jobs-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.whrp-jobs-wrapper * {
    box-sizing: border-box;
}

/* === Filter Section === */
.whrp-filter-section {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(79,70,229,0.25);
}

.whrp-search-box {
    position: relative;
    margin-bottom: 16px;
}

.whrp-search-box input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: rgba(255,255,255,0.95);
    color: #1f2937;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.whrp-search-box input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.whrp-search-box input::placeholder {
    color: #9ca3af;
}

.whrp-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.whrp-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.whrp-filters select {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: rgba(255,255,255,0.9);
    color: #374151;
    cursor: pointer;
    min-width: 160px;
    transition: background 0.2s;
}

.whrp-filters select:hover {
    background: #fff;
}

.whrp-filters select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* === Results Bar === */
.whrp-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* === Job Cards Grid === */
.whrp-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* === Job Card === */
.whrp-job-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    animation: whrp-fadeInUp 0.5s ease both;
}

.whrp-job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.whrp-job-card.whrp-featured {
    border: 2px solid #F59E0B;
}

.whrp-job-card.whrp-urgent {
    border: 2px solid #EF4444;
}

@keyframes whrp-fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.whrp-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    z-index: 2;
}

.whrp-card-badge.whrp-badge-featured { background: #FEF3C7; color: #92400E; }
.whrp-card-badge.whrp-badge-urgent   { background: #FEE2E2; color: #991B1B; }

.whrp-card-image {
    height: 180px;
    overflow: hidden;
}

.whrp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.whrp-job-card:hover .whrp-card-image img {
    transform: scale(1.05);
}

.whrp-card-body {
    padding: 22px;
}

.whrp-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e1b4b;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.whrp-card-excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.whrp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.whrp-meta-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}

.whrp-meta-category { background: #EDE9FE; color: #5B21B6; }
.whrp-meta-type     { background: #DBEAFE; color: #1E40AF; }
.whrp-meta-location { background: #D1FAE5; color: #065F46; }

.whrp-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.whrp-card-date {
    font-size: 12px;
    color: #9ca3af;
}

.whrp-card-actions {
    display: flex;
    gap: 8px;
}

/* === Buttons === */
.whrp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.whrp-btn-primary {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: #fff !important;
}

.whrp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}

.whrp-btn-outline {
    background: transparent;
    border: 1.5px solid #d1d5db;
    color: #374151;
}

.whrp-btn-outline:hover {
    background: #f9fafb;
    border-color: #4F46E5;
    color: #4F46E5;
}

.whrp-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 12px;
}

/* === Modals === */
.whrp-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: whrp-fadeIn 0.3s ease;
}

@keyframes whrp-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.whrp-modal {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    animation: whrp-scaleIn 0.3s ease;
    position: relative;
}

.whrp-apply-modal {
    max-width: 600px;
}

@keyframes whrp-scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.whrp-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.2s;
    z-index: 10;
}

.whrp-modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.whrp-modal-body {
    padding: 32px;
}

.whrp-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 24px 0;
}

/* === Job Detail Modal === */
.whrp-job-detail h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 16px;
}

.whrp-detail-hero {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.whrp-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.4));
}

.whrp-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.whrp-detail-description {
    color: #374151;
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 20px;
}

.whrp-detail-description p {
    margin-bottom: 12px;
}

.whrp-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.whrp-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 12px;
    color: #475569;
}

.whrp-detail-actions {
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* === Application Form (inside modal) === */
.whrp-form-group {
    margin-bottom: 18px;
}

.whrp-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.whrp-form-group label small {
    color: #9ca3af;
    font-weight: 400;
}

.whrp-form-group input,
.whrp-form-group textarea,
.whrp-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.whrp-form-group input:focus,
.whrp-form-group textarea:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.whrp-form-group input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.whrp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.whrp-form-actions {
    margin-top: 24px;
    text-align: center;
}

/* === Success Message === */
.whrp-success-message {
    text-align: center;
    padding: 40px 20px;
}

.whrp-success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #059669, #10B981);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #fff;
    animation: whrp-bounceIn 0.5s ease;
}

@keyframes whrp-bounceIn {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.whrp-success-message h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 10px;
}

.whrp-success-message p {
    color: #6b7280;
    font-size: 15px;
    margin: 6px 0;
}

/* === Loading === */
.whrp-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 20px;
}

.whrp-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e5e7eb;
    border-top-color: #4F46E5;
    border-radius: 50%;
    animation: whrp-spin 0.8s linear infinite;
}

@keyframes whrp-spin {
    to { transform: rotate(360deg); }
}

/* === No Results === */
.whrp-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 16px;
}

/* === Pagination === */
.whrp-pagination-front {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.whrp-pagination-front .whrp-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.whrp-pagination-front .whrp-page-btn.active,
.whrp-pagination-front .whrp-page-btn:hover {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: #fff;
    border-color: transparent;
}

/* === Apply Wrapper (standalone page) === */
.whrp-apply-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.whrp-apply-header {
    text-align: center;
    margin-bottom: 30px;
}

.whrp-apply-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 8px;
}

.whrp-apply-header p {
    color: #6b7280;
    font-size: 15px;
}

/* === Share Button === */
.whrp-share-wrapper {
    position: relative;
    display: inline-block;
}

.whrp-share-trigger {
    padding: 10px !important;
    min-width: 44px;
}

.whrp-share-dropdown {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    min-width: 140px;
    z-index: 100;
    border: 1px solid #e5e7eb;
    animation: whrp-slideUp 0.3s ease;
}

@keyframes whrp-slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.whrp-share-dropdown.active {
    display: flex;
}

.whrp-share-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 15px;
    border: 8px solid transparent;
    border-top-color: #fff;
}

.whrp-share-link {
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whrp-share-link.whrp-copied {
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}
.whrp-share-link.whrp-copied svg {
    color: #10B981;
}

@media (max-width: 480px) {
    .whrp-share-dropdown {
        right: auto;
        left: 0;
        width: 100%;
        position: fixed;
        bottom: 0;
        border-radius: 20px 20px 0 0;
        animation: whrp-slideUpFixed 0.4s ease;
    }
    .whrp-share-dropdown::after {
        display: none;
    }
}

@keyframes whrp-slideUpFixed {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .whrp-jobs-grid {
        grid-template-columns: 1fr;
    }
    .whrp-filters {
        flex-direction: column;
    }
    .whrp-filters select {
        width: 100%;
    }
    .whrp-form-row {
        grid-template-columns: 1fr;
    }
    .whrp-modal {
        margin: 10px;
        border-radius: 18px;
    }
    .whrp-modal-body {
        padding: 24px;
    }
    .whrp-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .whrp-filter-section {
        padding: 20px;
    }
}

/* ============================================
   Job Board Layout Styles (Admin Selectable)
   ============================================ */

/* 1. Classic Compact List (whrp-style-classic-list) */
.whrp-style-classic-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.whrp-style-classic-list .whrp-job-card {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    gap: 20px;
    border-radius: 12px;
}
.whrp-style-classic-list .whrp-card-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    flex-shrink: 0;
}
.whrp-style-classic-list .whrp-card-body {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    gap: 20px;
}
.whrp-style-classic-list .whrp-card-excerpt {
    display: none; /* Hide excerpt in classic list */
}
.whrp-style-classic-list .whrp-card-title {
    margin: 0;
    font-size: 16px;
    width: 250px;
}
.whrp-style-classic-list .whrp-card-meta {
    margin: 0;
    flex: 1;
}
.whrp-style-classic-list .whrp-card-footer {
    padding: 0;
    border: none;
    flex-shrink: 0;
}
.whrp-style-classic-list .whrp-card-date {
    display: none;
}

/* 2. Visual Cards - Large Images (whrp-style-visual-grid) */
.whrp-style-visual-grid {
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
}
.whrp-style-visual-grid .whrp-job-card {
    height: 380px;
    border-radius: 24px;
}
.whrp-style-visual-grid .whrp-card-image {
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 1;
}
.whrp-style-visual-grid .whrp-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 24px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    z-index: 2;
}
.whrp-style-visual-grid .whrp-card-title,
.whrp-style-visual-grid .whrp-card-excerpt,
.whrp-style-visual-grid .whrp-card-date {
    color: #fff;
}
.whrp-style-visual-grid .whrp-meta-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(4px);
}
.whrp-style-visual-grid .whrp-card-footer {
    border-top-color: rgba(255,255,255,0.2);
}

/* 3. Minimalist - Text Only (whrp-style-minimalist-text) */
.whrp-style-minimalist-text .whrp-card-image {
    display: none;
}
.whrp-style-minimalist-text .whrp-job-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-bottom: 1.5px solid #e5e7eb;
    border-radius: 0;
    padding-bottom: 24px;
}
.whrp-style-minimalist-text .whrp-job-card:hover {
    transform: none;
    border-bottom-color: #4F46E5;
}
.whrp-style-minimalist-text .whrp-card-title {
    font-size: 22px;
    color: #1e1b4b;
}

/* 4. Split View - Image Left/Right (whrp-style-split-view) */
.whrp-style-split-view {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.whrp-style-split-view .whrp-job-card {
    display: flex;
    min-height: 250px;
}
.whrp-style-split-view .whrp-job-card:nth-child(even) {
    flex-direction: row-reverse;
}
.whrp-style-split-view .whrp-card-image {
    width: 40%;
    height: auto;
}
.whrp-style-split-view .whrp-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
