/**
 * bgcJobPosts frontend styles.
 */

/* Wrapper */
.bgcjp-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Breadcrumb */
.bgcjp-breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9em;
}

.bgcjp-breadcrumb a {
    text-decoration: none;
}

.bgcjp-breadcrumb a:hover {
    text-decoration: underline;
}

/* Office picker grid */
.bgcjp-office-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.bgcjp-office-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.bgcjp-office-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-color: #0073aa;
}

.bgcjp-office-name {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
}

.bgcjp-office-count {
    font-size: 0.9em;
    color: #666;
}

/* Job listings table */
.bgcjp-job-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.bgcjp-job-table th,
.bgcjp-job-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.bgcjp-job-table th {
    background: #f9f9f9;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.bgcjp-job-table tbody tr:hover {
    background: #f5f8fc;
}

.bgcjp-job-table td a {
    text-decoration: none;
    font-weight: 500;
}

.bgcjp-job-table td a:hover {
    text-decoration: underline;
}

/* Job detail page */
.bgcjp-job-detail article {
    max-width: 800px;
}

.bgcjp-meta {
    margin: 20px 0 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.bgcjp-meta dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 20px;
    margin: 0;
}

.bgcjp-meta dt {
    font-weight: 600;
    color: #333;
}

.bgcjp-meta dd {
    margin: 0;
    color: #555;
}

.bgcjp-description {
    margin: 30px 0;
    line-height: 1.6;
}

.bgcjp-description h2 {
    font-size: 1.3em;
    margin-bottom: 15px;
}

/* Apply button */
.bgcjp-apply {
    margin-top: 30px;
    margin-bottom: 30px;
}

.bgcjp-apply-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    transition: background 0.2s;
}

.bgcjp-apply-btn:hover {
    background: #005a87;
    color: #fff;
}

/* Responsive: stack table to cards on mobile */
@media (max-width: 768px) {
    .bgcjp-job-table thead {
        display: none;
    }

    .bgcjp-job-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 12px;
    }

    .bgcjp-job-table td {
        display: block;
        padding: 4px 0;
        border: none;
    }

    .bgcjp-job-table td:first-child {
        font-weight: 600;
        font-size: 1.05em;
        margin-bottom: 4px;
    }

    .bgcjp-job-table td:not(:first-child)::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #333;
    }

    /* Meta grid stacks on mobile */
    .bgcjp-meta dl {
        grid-template-columns: 1fr;
    }

    .bgcjp-meta dt {
        margin-top: 8px;
    }

    .bgcjp-office-grid {
        grid-template-columns: 1fr;
    }
}
