/* Job Aggregator - Frontend Styles */

/* Wrapper */
.job-agg-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Filters */
.job-agg-filters {
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}
.job-agg-filters__search {
    margin-bottom: 12px;
}
.job-agg-filters__search .job-agg-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    box-sizing: border-box;
}
.job-agg-filters__dropdowns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}
.job-agg-select {
    padding: 8px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    min-width: 150px;
    cursor: pointer;
}
.job-agg-filters__salary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.job-agg-input--small {
    width: 140px;
    padding: 8px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.job-agg-filters__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.job-agg-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}
.job-agg-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Buttons */
.job-agg-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    color: #344054;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.4;
}
.job-agg-btn:hover {
    background: #f2f4f7;
    border-color: #98a2b3;
}
.job-agg-btn--reset {
    color: #667085;
}
.job-agg-btn--prev:disabled,
.job-agg-btn--next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Job Cards */
.job-agg-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.job-agg-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.job-agg-card:hover {
    border-color: #b0b7c3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Logo */
.job-agg-card__logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}
.job-agg-card__logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eee;
}
.job-agg-card__logo-placeholder {
    width: 60px;
    height: 60px;
    background: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
}

/* Card Body */
.job-agg-card__body {
    flex: 1;
    min-width: 0;
}
.job-agg-card__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}
.job-agg-card__title a {
    color: #1a1a2e;
    text-decoration: none;
}
.job-agg-card__title a:hover {
    color: #2563eb;
}

/* Meta */
.job-agg-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #667085;
}
.job-agg-meta__company::before {
    content: "🏢 ";
}
.job-agg-meta__location::before {
    content: "📍 ";
}
.job-agg-meta__remote {
    color: #059669;
    font-weight: 500;
}
.job-agg-meta__remote::before {
    content: "🌐 ";
}

/* Tags */
.job-agg-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.job-agg-tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    line-height: 1.5;
}
.job-agg-tag--type {
    background: #eff6ff;
    color: #1d4ed8;
}
.job-agg-tag--salary {
    background: #ecfdf5;
    color: #047857;
}

/* Footer */
.job-agg-card__footer {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #98a2b3;
}
.job-agg-card__expiring {
    color: #dc6803;
    font-weight: 500;
}
.job-agg-card__apply {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: #2563eb;
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
}
.job-agg-card__apply:hover {
    background: #1d4ed8;
    color: #fff !important;
}

/* No Results */
.job-agg-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #667085;
    font-size: 15px;
}

/* Pagination */
.job-agg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
}
.job-agg-pagination__info {
    font-size: 14px;
    color: #667085;
}

/* Loading */
.job-agg-loading {
    text-align: center;
    padding: 30px;
}
.job-agg-loading::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e4e7;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: job-agg-spin 0.6s linear infinite;
}
@keyframes job-agg-spin {
    to { transform: rotate(360deg); }
}

/* Search Standalone */
.job-agg-search-standalone {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}
.job-agg-search-standalone .job-agg-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}
.job-agg-search-standalone .job-agg-btn {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.job-agg-search-standalone .job-agg-btn:hover {
    background: #1d4ed8;
}

/* Single Job Page */
.job-agg-single {
    max-width: 800px;
    margin: 0 auto;
}
.job-agg-single__header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e4e7;
}
.job-agg-single__logo {
    flex-shrink: 0;
}
.job-agg-single__logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #eee;
}
.job-agg-single__info h1 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.3;
}
.job-agg-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 15px;
    color: #667085;
    margin-bottom: 12px;
}
.job-agg-single__details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.job-agg-single__apply {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}
.job-agg-single__apply:hover {
    background: #1d4ed8;
    color: #fff;
}
.job-agg-single__content {
    line-height: 1.7;
    font-size: 15px;
    color: #344054;
}
.job-agg-single__content h2,
.job-agg-single__content h3 {
    margin-top: 24px;
}
.job-agg-single__sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
}
.job-agg-single__sidebar dt {
    font-weight: 600;
    font-size: 13px;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
}
.job-agg-single__sidebar dt:first-child { margin-top: 0; }
.job-agg-single__sidebar dd {
    margin: 4px 0 0;
    font-size: 15px;
    color: #1a1a2e;
}

/* Grid layout */
.job-agg-wrapper[data-layout="grid"] .job-agg-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.job-agg-wrapper[data-layout="grid"] .job-agg-card {
    flex-direction: column;
}
.job-agg-wrapper[data-layout="grid"] .job-agg-card__logo {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .job-agg-filters__dropdowns {
        flex-direction: column;
    }
    .job-agg-select {
        width: 100%;
    }
    .job-agg-filters__salary {
        flex-wrap: wrap;
    }
    .job-agg-input--small {
        flex: 1;
        min-width: 100px;
    }
    .job-agg-card {
        flex-direction: column;
        gap: 12px;
    }
    .job-agg-card__logo {
        display: flex;
        gap: 12px;
        align-items: center;
        width: auto;
    }
    .job-agg-card__footer {
        flex-wrap: wrap;
    }
    .job-agg-card__apply {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    .job-agg-single__header {
        flex-direction: column;
    }
    .job-agg-filters__actions {
        flex-wrap: wrap;
    }
}
