/*
 * File: wp-content/themes/remotiko-astra-child/assets/css/job-card.css
 * Styles for the Remotiko job card component.
 * Depends on CSS variables defined in style.css (:root block).
 */

/* ============================================================
   OUTER CARD
   ============================================================ */
.remotiko-job-card {
    position: relative;
    background: #FFFFFF;
    border: 0.5px solid var(--remotiko-card-border);
    border-radius: var(--remotiko-card-radius);
    padding: 16px 18px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden; /* keeps the featured badge clipped to top edge */
}

.remotiko-job-card:hover {
    border-color: var(--remotiko-purple);
}

/* ============================================================
   FEATURED VARIANT
   ============================================================ */
.remotiko-job-card--featured {
    border: 1.5px solid var(--remotiko-gold);
}

.remotiko-job-card--featured:hover {
    border-color: var(--remotiko-gold-dark);
}

/* Badge drops from the top-right corner */
.remotiko-featured-badge {
    position: absolute;
    top: 0;
    right: 18px;
    padding: 3px 10px 5px;
    background-color: var(--remotiko-gold-light);
    color: var(--remotiko-gold-dark);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0 0 6px 6px; /* flat top, rounded bottom — drops from card edge */
    line-height: 1.4;
}

/* ============================================================
   THREE-COLUMN INNER GRID
   [44px logo] [1fr body] [auto right]
   ============================================================ */
.remotiko-job-card__inner {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    column-gap: 14px;
    align-items: start;
}

/* ============================================================
   LEFT COLUMN — logo
   ============================================================ */
.remotiko-job-card__logo {
    padding-top: 2px; /* optical alignment with company name text */
}

/* ============================================================
   MIDDLE COLUMN — body
   ============================================================ */

/* Top row: company name · verified · new badge */
.remotiko-job-card__meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 3px;
    min-height: 18px;
}

.remotiko-job-card__company {
    font-size: 12px;
    color: #6B7280;
    font-weight: 400;
    line-height: 1;
}

.remotiko-job-card__verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Job title */
.remotiko-job-card__title {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    line-height: 1.35;
    margin: 0 0 8px;
    font-family: 'Inter', sans-serif; /* reset Astra heading font */
}

.remotiko-job-card__title a {
    text-decoration: none;
    color: inherit;
}

.remotiko-job-card__title a:hover {
    text-decoration: underline;
    color: inherit;
}

/* Tags row */
.remotiko-job-card__tags {
    margin-bottom: 8px;
}

/* Meta row: pin · clock · building */
.remotiko-job-card__info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.remotiko-job-card__info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #9CA3AF;
    line-height: 1;
    white-space: nowrap;
}

.remotiko-job-card__info-item svg {
    flex-shrink: 0;
}

/* ============================================================
   RIGHT COLUMN — salary + actions
   ============================================================ */
.remotiko-job-card__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding-top: 2px; /* optical alignment */
}

.remotiko-job-card__salary {
    text-align: right;
}

.remotiko-job-card__salary-amount {
    font-size: 12px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    line-height: 1.2;
}

.remotiko-job-card__salary-period {
    font-size: 10px;
    color: #9CA3AF;
    margin-top: 2px;
    line-height: 1;
}

.remotiko-job-card__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   MOBILE  ≤ 600px
   Stack: [logo | body] then [full-width right strip]
   ============================================================ */
@media (max-width: 600px) {
    .remotiko-job-card {
        padding: 14px 14px;
    }

    .remotiko-job-card__inner {
        grid-template-columns: 44px 1fr;
        grid-template-rows: auto auto;
        row-gap: 0;
    }

    /* Push the right column to its own full-width row */
    .remotiko-job-card__right {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        border-top: 0.5px solid var(--remotiko-card-border);
        padding-top: 10px;
        margin-top: 10px;
    }

    /* Hide salary on mobile — too much visual noise */
    .remotiko-job-card__salary {
        display: none;
    }

    /* Apply button takes remaining space */
    .remotiko-job-card__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .remotiko-job-card__actions .rbtn-primary {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}
