/* 
 * Frontend Styles for Professional Careers Plugin 
 * Based on provided minimalist, professional design references.
 */

:root {
    --pc-primary: #022c4a;
    --pc-secondary: #05375a;
    --pc-bg: #f8fafc;
    --pc-text: #475569;
    --pc-border: #e2e8f0;
    --pc-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================
   Base & Layout
   ========================================= */
.pc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: var(--pc-font);
    color: var(--pc-text);
}

.pc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pc-btn-primary {
    background: var(--pc-primary);
    color: #fff;
}

.pc-btn-primary:hover {
    background: var(--pc-secondary);
    transform: translateY(-2px);
    color: #fff;
}

.pc-btn-outline {
    background: transparent;
    border-color: var(--pc-primary);
    color: var(--pc-primary);
}

.pc-btn-outline:hover {
    background: var(--pc-primary);
    color: #fff;
}

/* =========================================
   Single Career Page
   ========================================= */
.pc-single-career-main {
    padding: 60px 0;
    background: #fff;
}

.pc-career-header {
    margin-bottom: 40px;
}

.pc-career-title {
    font-size: 42px;
    color: var(--pc-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.pc-career-metas {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #64748b;
    font-size: 15px;
}

.pc-meta-sep {
    color: #cbd5e1;
}

.pc-career-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.pc-career-content {
    font-size: 16px;
    line-height: 1.6;
}

.pc-salary-range {
    margin-bottom: 24px;
    font-size: 16px;
}

.pc-career-description h2, 
.pc-career-description h3 {
    color: var(--pc-primary);
    margin-top: 32px;
    margin-bottom: 16px;
}

.pc-career-description ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 24px;
}

.pc-career-description li {
    margin-bottom: 8px;
}

.pc-apply-card {
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    padding: 32px;
    position: sticky;
    top: 40px;
}

.pc-apply-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--pc-primary);
    font-size: 20px;
}

.pc-apply-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .pc-career-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Elementor Widget / Archive 
   ========================================= */
.pc-careers-grid {
    display: grid;
    gap: 24px;
}

.pc-cols-1 { grid-template-columns: 1fr; }
.pc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.pc-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* List Layout (Image 4 style) */
.pc-layout-list .pc-career-card {
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s ease;
}

.pc-layout-list article:nth-child(even) {
    background: #f1f5f9;
}

.pc-layout-list .pc-career-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.pc-layout-list .pc-card-inner .pc-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    width: 100%;
}

.pc-layout-list .pc-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--pc-primary);
    flex: 0 0 25%;
    order: 1;
}

.pc-layout-list .pc-card-title a {
    color: inherit;
    text-decoration: none;
}

.pc-layout-list .pc-card-metas {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    padding-right: 40px;
    order: 2; /* Put metas between title and button on desktop */
}

/* Hide dots on desktop */
.pc-layout-list .pc-meta-dot {
    display: none;
}

/* Base generic tag style */
.pc-meta-tag {
    background: #e2e8f0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

/* Remove grey background from all tags in list layout */
.pc-layout-list .pc-meta-tag {
    background: transparent;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Meta items wrapper to handle dots and tags together */
.pc-meta-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Re-order items on desktop to match Badge -> Location -> Type */
.pc-layout-list .pc-meta-wrap-location { order: 2; }
.pc-layout-list .pc-meta-wrap-type { order: 3; }
.pc-layout-list .pc-meta-wrap-model { order: 1; }

.pc-layout-list .pc-meta-tag svg {
    display: none; /* Hide icons in list view as per reference */
}

/* Re-apply badge styling specifically to the type tag */
.pc-layout-list .pc-meta-tag.pc-type-hybrid,
.pc-layout-list .pc-meta-tag.pc-type-onsite,
.pc-layout-list .pc-meta-tag.pc-type-remote,
.pc-layout-list .pc-meta-tag.pc-type-full-time,
.pc-layout-list .pc-meta-tag.pc-type-part-time {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    background: #e2e8f0;
    color: #334155;
}

/* Specific type colors */
.pc-type-hybrid { background: #d1ece5 !important; color: #0f766e !important; }
.pc-type-onsite { background: #e0f2fe !important; color: #0369a1 !important; }
.pc-type-remote { background: #fef3c7 !important; color: #b45309 !important; }

/* Hide excerpt and details in list layout */
.pc-layout-list .pc-card-excerpt,
.pc-layout-list .pc-card-details,
.pc-layout-list .pc-card-icon-wrap {
    display: none;
}

.pc-layout-list .pc-card-footer {
    flex: 0 0 auto;
    order: 3;
}

.pc-layout-list .pc-apply-btn {
    display: none; /* Only show View & Apply link */
}

.pc-layout-list .pc-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid var(--pc-primary);
    color: var(--pc-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.pc-layout-list .pc-view-link:hover {
    background: var(--pc-primary);
    color: #fff;
}

/* Grid Layout (Image 1 style) */
.pc-layout-grid .pc-career-card {
    border: 1px solid var(--pc-border);
    border-radius: 16px;
    padding: 24px 20px;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.pc-layout-grid .pc-career-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transform: translateY(-4px);
}

.pc-layout-grid .pc-card-inner,
.pc-layout-grid .pc-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.pc-layout-grid .pc-card-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 0 16px 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-layout-grid .pc-card-icon-wrap svg {
    width: 100%;
    height: 100%;
}

.pc-layout-grid .pc-card-metas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.pc-layout-grid .pc-card-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.pc-layout-grid .pc-card-title a {
    color: var(--pc-primary);
    text-decoration: none;
}

.pc-layout-grid .pc-card-excerpt {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.pc-layout-grid .pc-card-details {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
    font-size: 15px;
    color: #334155;
    font-weight: 500;
}

.pc-layout-grid .pc-card-footer {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
}

.pc-layout-grid .pc-view-link {
    display: inline-flex;
    color: var(--pc-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.pc-layout-grid .pc-view-link:hover {
    color: var(--pc-primary);
}

.pc-layout-grid .pc-apply-btn {
    padding: 10px 20px;
    border-radius: 6px;
    background: #474759;
    color: #fff;
    font-weight: 500;
    border: none;
}

.pc-layout-grid .pc-apply-btn:hover {
    background: #313140;
}

/* =========================================
   Popup Form (Image 2 style)
   ========================================= */
.pc-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.pc-popup-container {
    background: #fff;
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    font-family: var(--pc-font);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.pc-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.pc-popup-close:hover { color: #0f172a; }

.pc-popup-header {
    margin-bottom: 30px;
}

.pc-popup-title {
    font-size: 40px;
    font-weight: 300;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.pc-popup-subtitle {
    color: #64748b;
    font-size: 16px;
    margin: 0;
}

.pc-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.pc-form-group.pc-form-full {
    grid-column: 1 / -1;
}

.pc-form-group label {
    display: block;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 8px;
}

.pc-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 0; /* Minimalist straight inputs as in image */
    font-size: 15px;
    color: #334155;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    box-sizing: border-box;
}

.pc-form-control:focus {
    border-color: var(--pc-primary);
}

.pc-form-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-submit-btn {
    background: #0f172a;
    color: #fff;
    padding: 14px 32px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.pc-submit-btn:hover {
    background: #1e293b;
}

.pc-form-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}
.pc-msg-success { background: #dcfce3; color: #166534; }
.pc-msg-error { background: #fee2e2; color: #991b1b; }

@media (max-width: 768px) {
    .pc-career-layout {
        grid-template-columns: 1fr;
    }

    /* Exact UI match for mobile/tab List Layout */
    .pc-layout-list .pc-card-inner .pc-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
    }

    .pc-layout-list .pc-card-title {
        flex: none;
        order: 1;
        font-size: 18px;
    }

    .pc-layout-list .pc-card-metas {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding-right: 0;
        order: 2;
        justify-content: flex-start;
        align-items: center;
    }

    .pc-layout-list .pc-meta-dot {
        display: inline-block;
        font-size: 18px;
        line-height: 1;
        color: #000;
    }

    /* Reset order on mobile to HTML order: Location -> Type -> Badge */
    .pc-layout-list .pc-meta-wrap-location { order: 1; }
    .pc-layout-list .pc-meta-wrap-type { order: 2; }
    .pc-layout-list .pc-meta-wrap-model { order: 3; }
    
    .pc-layout-list .pc-view-link {
        display: none; /* Hide view & apply button on mobile list view if matching Image 1 exactly */
    }
}

@media (max-width: 640px) {
    .pc-form-fields { grid-template-columns: 1fr; }
}
