/* public/index.css
 * Modern Bootstrap-based job card styles for index.blade.php
 * Uses variables defined in resources/css/app.css
 */

/* -----------------------------
 * SECTION WRAPPER
 * --------------------------- */

.rmk-jobs-section {
    background: #f5f7fb;
}

.rmk-jobs-section .container {
    max-width: 1000px;
}

/* Section header: title + "view all" button */
.rmk-jobs-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.rmk-jobs-header-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
}

.rmk-jobs-header .btn-outline-primary {
    border-radius: 999px;
    font-size: 0.9rem;
    padding: 0.4rem 1.4rem;
}

/* Stack cards vertically with spacing */
.rmk-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* -----------------------------
 * JOB CARD
 * --------------------------- */

.rmk-job-card {
    position: relative;
    border-radius: 1rem; /* works nicely with Bootstrap .rounded-4 */
    overflow: hidden;
}

/* Left accent bar */
.rmk-job-card::before {
    content: "";
    position: absolute;
    inset-block: 14px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--color-primary-alt), var(--color-primary));
    opacity: 0.9;
}

/* Card body layout */
.rmk-job-card-body {
    padding: 1.5rem 1.75rem;
}

/* Elevation on hover */
.rmk-job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* -----------------------------
 * HEADER ROW
 * --------------------------- */

.rmk-job-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

/* Left side of header (badge, title, company, address) */
.rmk-job-header-main {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

/* "New" badge */
.rmk-job-badge-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background-color: rgba(60, 111, 113, 0.12);
    color: var(--color-primary-alt);
}

/* Job title */
.rmk-job-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Company + rating */
.rmk-job-company-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    font-size: 0.9rem;
    color: #4b4b4b;
}

.rmk-job-company {
    font-weight: 500;
}

.rmk-job-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.85rem;
    padding: 0.05rem 0.6rem;
    border-radius: 999px;
    background-color: #f3f4f6;
}

/* Address row */
.rmk-job-location-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #6b6b6b;
}

/* Right side of header: logo + favourite button */
.rmk-job-header-right {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* Logo placeholder */
.rmk-job-logo {
    width: 96px;
    height: 48px;
    border-radius: 0.75rem;
    border: 1px dashed var(--color-muted);
    background: #f9fafb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

/* Heart button */
.rmk-job-favorite {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background-color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.rmk-job-favorite i {
    font-size: 1.1rem;
    color: #9ca3af;
}

/* -----------------------------
 * META ROWS
 * --------------------------- */

.rmk-job-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.rmk-job-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #374151;
}

.rmk-job-meta-row i {
    margin-top: 0.05rem;
    font-size: 1rem;
    color: #94a3b8;
}

/* Divider before task list */
.rmk-job-divider {
    margin: 0.4rem 0 0.6rem;
}

/* -----------------------------
 * TASK LIST (COLLAPSIBLE)
 * --------------------------- */

.rmk-job-tasks-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.rmk-job-tasks {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

/* -----------------------------
 * FOOTER
 * --------------------------- */

.rmk-job-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.6rem;
}

/* Left part: primary button + toggle link */
.rmk-job-footer-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

/* Primary button tweaks */
.rmk-job-footer .btn-primary {
    border-radius: 999px;
    padding-inline: 1.4rem;
}

/* Toggle "Show / Hide details" styled as text button */
.rmk-job-toggle {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 0.9rem;
    color: var(--color-primary-alt);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.rmk-job-toggle i {
    font-size: 0.9rem;
    transition: transform 0.15s ease;
}

/* Rotate arrow when collapse is open (Bootstrap sets aria-expanded) */
.rmk-job-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Right part: timestamp text */
.rmk-job-footer-right {
    font-size: 0.8rem;
    color: #6b7280;
}

/* -----------------------------
 * RESPONSIVE
 * --------------------------- */

@media (max-width: 768px) {
    .rmk-job-card-body {
        padding: 1.25rem 1.25rem;
    }

    .rmk-job-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rmk-job-header-right {
        align-self: stretch;
        justify-content: space-between;
    }

    .rmk-job-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .rmk-jobs-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------------------------------------
 * PAGINATION (ABOVE AND BELOW JOB LIST)
 * ------------------------------------- */

.rmk-jobs-pagination {
    /* Center the pagination bar */
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.rmk-jobs-pagination-bottom {
    margin-top: 1.75rem;
}

/* Use Bootstrap pagination but tweak spacing and rounded pills */
.rmk-jobs-pagination .pagination {
    margin-bottom: 0;
    gap: 0.25rem;
}

/* Base page link style */
.rmk-jobs-pagination .page-link {
    border-radius: 999px;
    min-width: 2.4rem;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.35rem 0.9rem;
    border-color: rgba(148, 163, 184, 0.7);
    color: #4b5563;
    background-color: #ffffff;
}

/* Remove focus outline "jumpiness" but keep accessibility */
.rmk-jobs-pagination .page-link:focus {
    box-shadow: 0 0 0 0.15rem rgba(41, 75, 100, 0.15);
}

/* Active page */
.rmk-jobs-pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    font-weight: 600;
}

/* Disabled previous / next */
.rmk-jobs-pagination .page-item.disabled .page-link {
    color: #9ca3af;
    background-color: #f9fafb;
}

/* Icons inside links */
.rmk-jobs-pagination .page-link i {
    font-size: 0.9rem;
}

/* Make prev/next slightly wider */
.rmk-jobs-pagination .page-item-prev .page-link,
.rmk-jobs-pagination .page-item-next .page-link {
    padding-inline: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive: smaller padding on mobile */
@media (max-width: 576px) {
    .rmk-jobs-pagination .page-link {
        padding-inline: 0.65rem;
    }
}


/* Clickable logo in job card */
.rmk-job-logo-btn {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rmk-job-logo-img {
    max-width: 56px;
    max-height: 56px;
    border-radius: 16px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 6px 8px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.rmk-job-logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.4rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

/* Company modal styling */
.rmk-company-modal .modal-content {
    border-radius: 24px;
}

.rmk-company-modal-logo {
    max-width: 110px;
    max-height: 110px;
    border-radius: 24px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.rmk-company-modal-logo-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    background: linear-gradient(135deg, #e0f2fe, #f9fafb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.rmk-company-modal-name {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.rmk-company-modal-rating i {
    color: #facc15;
}

.rmk-company-modal-body {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Company modal – about text */
.rmk-company-modal-about {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Company modal – meta grid */
.rmk-company-modal-meta {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.25rem;
    margin-top: 0.25rem;
}

/* Single meta item */
.rmk-company-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    background: #f8fafc;
}

/* Icon bubble */
.rmk-company-meta-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
    color: #0f172a;
    flex-shrink: 0;
}

/* Label & value */
.rmk-company-meta-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}

.rmk-company-meta-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #0f172a;
    word-break: break-word;
}

.rmk-company-meta-value a {
    color: #0f172a;
    text-decoration: none;
}

.rmk-company-meta-value a:hover {
    text-decoration: underline;
}

/* Back button styling for job pages */
.rmk-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.rmk-btn-back i {
    font-size: 0.9rem;
}

/* Active filter chips */
.rmk-active-filters {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background-color: #f8f9fa;
}

.rmk-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.rmk-filter-chip:hover {
    background-color: #e9f2ff;
    text-decoration: none;
}

.rmk-filter-chip-label {
    font-weight: 600;
}

.rmk-filter-chip-close {
    font-size: 0.85rem;
}

.rmk-filter-clear-all {
    font-size: 0.8rem;
}

/* Filters bar small tweaks */
.rmk-jobs-filters-form {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}
