/**
 * single-recruit.css
 * Style cho trang chi tiết tin tuyển dụng (single-yola_recruit.php).
 * Dùng BEM prefix "yri-" (Yola Recruit Item) để tránh conflict với theme Bootstrap 3.
 * Reset nhẹ, không dùng Tailwind để tránh xung đột.
 *
 * @package YolaTheme\RecruitSystem
 */

/* =========================================================
   VARIABLES
========================================================= */
:root {
    --yri-primary:        #1E40AF;
    --yri-primary-light:  #DBEAFE;
    --yri-primary-10:     rgba(30, 64, 175, 0.10);
    --yri-primary-hover:  #1d3891;
    --yri-accent:         #2563EB;

    --yri-urgent-bg:      #FEF2F2;
    --yri-urgent-color:   #DC2626;
    --yri-high-bg:        #FFF7ED;
    --yri-high-color:     #EA580C;
    --yri-normal-bg:      #F0FDF4;
    --yri-normal-color:   #16A34A;
    --yri-low-bg:         #F8FAFC;
    --yri-low-color:      #64748B;

    --yri-bg:             #F8FAFC;
    --yri-white:          #FFFFFF;
    --yri-border:         #E2E8F0;
    --yri-text:           #0F172A;
    --yri-text-muted:     #64748B;
    --yri-text-light:     #94A3B8;

    --yri-whatsapp:       #25D366;
    --yri-whatsapp-hover: #1fba58;

    --yri-radius:         16px;
    --yri-radius-sm:      12px;
    --yri-radius-xs:      8px;
    --yri-radius-full:    9999px;

    --yri-shadow:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --yri-shadow-md:      0 4px 16px rgba(0,0,0,.08);

    --yri-font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =========================================================
   RESET & BASE
========================================================= */
.yri-html,
.yri-body {
    margin: 0;
    padding: 0;
    background-color: var(--yri-bg);
    color: var(--yri-text);
    font-family: var(--yri-font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   PAGE WRAPPER
========================================================= */
.yri-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   MAIN & CONTAINER
========================================================= */
.yri-main {
    flex-grow: 1;
    padding: 32px 0 64px;
}

.yri-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* =========================================================
   GRID (2 columns: main + sidebar)
========================================================= */
.yri-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

@media (min-width: 1024px) {
    .yri-grid {
        grid-template-columns: 1fr 360px;
    }
}

.yri-col-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.yri-col-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 24px;
}

/* =========================================================
   HERO SECTION
========================================================= */
.yri-hero {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Badges Row */
.yri-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.yri-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--yri-radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    line-height: 1;
}

.yri-badge__icon {
    font-size: 13px !important;
    line-height: 1;
}

/* Urgency variants — urgent dùng màu primary/10 giống code.html */
.yri-badge--urgent {
    background: var(--yri-primary-10);
    color:      var(--yri-primary);
}
.yri-badge--high {
    background: var(--yri-high-bg);
    color:      var(--yri-high-color);
}
.yri-badge--normal {
    background: var(--yri-normal-bg);
    color:      var(--yri-normal-color);
}
.yri-badge--low {
    background: var(--yri-low-bg);
    color:      var(--yri-low-color);
}
.yri-badge--meta {
    background: #F1F5F9;
    color:      #475569;
}

/* Title */
.yri-hero__title-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.yri-hero__title {
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--yri-text);
    margin: 0;
}

.yri-hero__excerpt {
    font-size: 17px;
    color: var(--yri-text-muted);
    margin: 0;
    line-height: 1.65;
}

/* Featured Image */
.yri-hero__image {
    border-radius: var(--yri-radius);
    overflow: hidden;
    border: 1px solid var(--yri-border);
}

.yri-hero__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
}

/* =========================================================
   BACK BUTTON
========================================================= */
.yri-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--yri-text-muted);
    text-decoration: none;
    padding: 6px 0;
    transition: color .15s;
    width: fit-content;
}

.yri-back-btn:hover {
    color: var(--yri-primary);
    text-decoration: none;
}

.yri-back-btn__icon {
    font-size: 18px !important;
}

/* =========================================================
   SLICK SLIDER - Hero Gallery
========================================================= */
.yri-hero__slider {
    border-radius: var(--yri-radius);
    border: 1px solid var(--yri-border);
    overflow: visible;
    position: relative;
    margin-bottom: 28px;
}

.yri-hero__slider .slick-list {
    overflow: hidden;
    border-radius: var(--yri-radius);
}

.yri-hero__slider .slick-track {
    display: flex;
    align-items: flex-start;
}

.yri-hero__slider .slick-slide {
    float: none;
    height: auto;
    display: flex;
}

.yri-hero__slider .slick-slide > div {
    width: 100%;
}

.yri-hero__slider .yri-hero__img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.yri-hero__slider .slick-dots {
    bottom: -24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.yri-hero__slider .slick-dots li button:before {
    font-size: 8px;
    color: var(--yri-text-muted);
    opacity: 0.4;
}

.yri-hero__slider .slick-dots li.slick-active button:before {
    color: var(--yri-primary);
    opacity: 1;
}

.yri-hero__slider .slick-prev { left: 12px; z-index: 5; }
.yri-hero__slider .slick-next { right: 12px; z-index: 5; }

/* =========================================================
   STATS GRID  (Presupuesto + Publicado)
   Match: rounded-xl border p-4 bg-white shadow-sm
========================================================= */
.yri-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.yri-stat-card {
    background: var(--yri-white);
    border: 1px solid var(--yri-border);
    border-radius: var(--yri-radius-sm);
    padding: 20px;
    box-shadow: var(--yri-shadow);
    transition: box-shadow .2s;
}

.yri-stat-card:hover {
    box-shadow: var(--yri-shadow-md);
}

.yri-stat-card__label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--yri-text-muted);
    margin: 0 0 8px;
}

.yri-stat-card__value {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--yri-text);
}

.yri-stat-card__value--primary {
    color: var(--yri-primary);
}

/* =========================================================
   SECTION
========================================================= */
.yri-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.yri-section__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--yri-text);
    margin: 0;
    letter-spacing: -0.01em;
}

/* Content (post_content) */
.yri-content {
    color: #334155;
    font-size: 15px;
    line-height: 1.8;
}

.yri-content p  { margin: 0 0 16px; }
.yri-content ul,
.yri-content ol { padding-left: 22px; margin: 0 0 16px; }
.yri-content li { margin-bottom: 8px; }
.yri-content h2,
.yri-content h3 { color: var(--yri-text); margin: 24px 0 8px; font-weight: 700; }

/* =========================================================
   MAP SECTION
   Match: overflow-hidden rounded-2xl border dark:border-slate-800
========================================================= */
.yri-map-wrapper {
    border-radius: var(--yri-radius);
    border: 1px solid var(--yri-border);
    overflow: hidden;
    box-shadow: var(--yri-shadow);
}

.yri-map {
    height: 280px;
    width: 100%;
    background: #E2E8F0;
    position: relative;
}

.yri-map--placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.yri-map__placeholder-icon {
    font-size: 52px !important;
    color: #CBD5E1;
}

.yri-map__placeholder-text {
    font-size: 14px;
    color: var(--yri-text-muted);
    margin: 0;
}

#yri-map .leaflet-container {
    font-family: var(--yri-font) !important;
}

/* Map Info Bar — match: bg-white p-6 flex items-center justify-between */
.yri-map-info {
    background: var(--yri-white);
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--yri-border);
}

.yri-map-info__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yri-map-info__icon {
    font-size: 22px !important;
    color: var(--yri-text-muted);
    margin-top: 1px;
    flex-shrink: 0;
}

.yri-map-info__name {
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 3px;
    color: var(--yri-text);
}

.yri-map-info__address {
    font-size: 13px;
    color: var(--yri-text-muted);
    margin: 0;
}

.yri-map-info__open-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--yri-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
    align-self: center;
}

.yri-map-info__open-link:hover {
    opacity: .75;
    text-decoration: underline;
}

.yri-map-info__open-icon {
    font-size: 14px !important;
}

/* =========================================================
   SIDEBAR CARDS
   Match: rounded-2xl border bg-white p-6 shadow-sm
========================================================= */
.yri-card {
    background: var(--yri-white);
    border: 1px solid var(--yri-border);
    border-radius: var(--yri-radius);
    padding: 24px;
    box-shadow: var(--yri-shadow);
}

.yri-card__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--yri-text-light);
    margin: 0 0 24px;
}

/* Recruiter — match: flex items-center gap-4 mb-8 */
.yri-recruiter {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

/* Avatar — match: h-16 w-16 rounded-full border-2 border-primary/20 */
.yri-recruiter__avatar-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--yri-primary-light);
    flex-shrink: 0;
    background: #F1F5F9;
}

.yri-recruiter__avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yri-recruiter__name {
    font-size: 17px;
    font-weight: 700;
    color: var(--yri-text);
    margin: 0 0 3px;
}

.yri-recruiter__role {
    font-size: 13px;
    color: var(--yri-text-muted);
    margin: 0;
}

/* Action Buttons */
.yri-recruiter__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

/* Base button — match: flex items-center justify-center gap-2 rounded-xl py-3 font-bold */
.yri-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border-radius: var(--yri-radius-sm);
    font-family: var(--yri-font);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity .2s, background .2s;
    box-sizing: border-box;
    line-height: 1;
}

.yri-btn__icon {
    font-size: 18px !important;
    line-height: 1;
}

/* WhatsApp — bg-[#25D366] text-white hover:opacity-90 */
.yri-btn--whatsapp {
    background: var(--yri-whatsapp);
    color: #fff;
}
.yri-btn--whatsapp:hover {
    background: var(--yri-whatsapp);
    opacity: .88;
    color: #fff;
    text-decoration: none;
}

/* Email — border bg-white hover:bg-slate-50 */
.yri-btn--email {
    background: var(--yri-white);
    color: var(--yri-text);
    border: 1px solid var(--yri-border);
}
.yri-btn--email:hover {
    background: #F8FAFC;
    color: var(--yri-text);
    text-decoration: none;
}

/* Share */
.yri-btn--share {
    background: var(--yri-white);
    color: var(--yri-text);
    border: 1px solid var(--yri-border);
}
.yri-btn--share:hover {
    background: #F8FAFC;
}

/* Toast Notification */
.yri-toast {
    display: none;
    align-items: center;
    gap: 6px;
    position: absolute;
    bottom: -48px;
    left: 50%;
    transform: translateX(-50%);
    background: #1E293B;
    color: #fff;
    padding: 9px 18px;
    border-radius: var(--yri-radius-full);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    animation: yri-fade-in .2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.yri-toast.yri-toast--visible {
    display: flex;
}

.yri-toast .material-symbols-outlined {
    font-size: 16px !important;
    color: var(--yri-normal-color);
}

@keyframes yri-fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* =========================================================
   META INFO CARD (Detalles)
   Match: rounded-2xl border bg-slate-50 p-6
========================================================= */
.yri-card--meta {
    background: #F8FAFC;
    border: 1px solid var(--yri-border);
}

.yri-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.yri-meta-list__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.yri-meta-list__icon {
    font-size: 18px !important;
    color: var(--yri-text-muted);
    margin-top: 2px;
    flex-shrink: 0;
}

.yri-meta-list__key {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--yri-text-muted);
    margin-bottom: 3px;
}

.yri-meta-list__value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--yri-text);
}

.yri-meta-list__value--primary {
    color: var(--yri-primary);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 640px) {
    .yri-main {
        padding: 20px 0 40px;
    }

    .yri-container {
        padding: 0 16px;
    }

    .yri-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .yri-col-sidebar {
        position: static;
    }

    .yri-hero__title {
        font-size: 28px;
    }

    .yri-section__title {
        font-size: 20px;
    }

    .yri-map-info {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
}

/* =========================================================
   LEAFLET CUSTOM MARKER
========================================================= */
.yri-map-marker {
    background: transparent !important;
    border: none !important;
}

.yri-map-marker__pin {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 3px 8px rgba(30, 64, 175, .45));
}

.yri-map-marker__pin .material-symbols-outlined {
    font-size: 40px !important;
    color: var(--yri-primary);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 40;
}

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
    border-radius: var(--yri-radius-xs) !important;
    box-shadow: var(--yri-shadow-md) !important;
    border: 1px solid var(--yri-border) !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-family: var(--yri-font) !important;
}

.leaflet-popup-tip {
    box-shadow: none !important;
}

/* =========================================================
   MATERIAL SYMBOLS COMMON FIX
========================================================= */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
    line-height: 1;
}

/* =========================================================
   MANAGE STATUS CARD
========================================================= */
.yri-card--manage {
    border-top: 3px solid var(--yri-border);
}

.yri-manage {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yri-manage__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--yri-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Select wrapper với icon */
.yri-manage__select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.yri-manage__select-icon {
    position: absolute;
    left: 12px;
    font-size: 18px;
    color: var(--yri-text-muted);
    pointer-events: none;
}

.yri-manage__select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    padding: 10px 40px 10px 40px;
    border: 1.5px solid var(--yri-border);
    border-radius: var(--yri-radius-xs);
    font-family: var(--yri-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--yri-text);
    background: var(--yri-white);
    cursor: pointer;
    transition: border-color .2s;
}

.yri-manage__select:focus {
    outline: none;
    border-color: var(--yri-accent);
    box-shadow: 0 0 0 3px var(--yri-primary-10);
}

.yri-manage__chevron {
    position: absolute;
    right: 12px;
    font-size: 18px;
    color: var(--yri-text-muted);
    pointer-events: none;
}

/* Nút Update */
.yri-btn--update {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--yri-primary);
    color: #fff;
    border: none;
    border-radius: var(--yri-radius-xs);
    font-family: var(--yri-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, opacity .2s;
    position: relative;
}

.yri-btn--update:hover:not(:disabled) {
    background: var(--yri-primary-hover);
}

.yri-btn--update:disabled {
    opacity: .65;
    cursor: not-allowed;
}

/* Spinner loading (CSS only) */
.yri-btn__spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: yri-spin .7s linear infinite;
}

.yri-btn--loading .yri-btn__spinner { display: inline-block; }
.yri-btn--loading .yri-btn__text    { opacity: .7; }

@keyframes yri-spin {
    to { transform: rotate(360deg); }
}

/* Feedback message */
.yri-manage__feedback {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--yri-radius-xs);
    display: none;
}

.yri-manage__feedback:not(:empty) {
    display: block;
}

.yri-manage__feedback--success {
    background: var(--yri-normal-bg);
    color: var(--yri-normal-color);
}

.yri-manage__feedback--error {
    background: var(--yri-urgent-bg);
    color: var(--yri-urgent-color);
}

.yri-manage__feedback--warning {
    background: var(--yri-high-bg);
    color: var(--yri-high-color);
}

/* Contact unlock (PRO quota) */
.yri-unlock-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--yri-text-muted, #64748b);
    text-align: center;
    line-height: 1.4;
}
.yri-unlock-limit {
    width: 100%;
    padding: 12px 12px 10px;
    border-radius: var(--yri-radius-sm);
    background: #fef2f2;
    border: 1px solid #fecaca;
    text-align: center;
}
.yri-unlock-limit__title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #b91c1c;
    line-height: 1.35;
}
.yri-unlock-limit__hint {
    margin: 0;
    font-size: 13px;
    color: var(--yri-text-muted, #64748b);
    line-height: 1.4;
}
.yri-btn--unlock-wa.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

.yri-btn--whatsapp,
.yri-btn--unlock-wa {
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.yri-btn--whatsapp:active,
.yri-btn--unlock-wa:active:not(:disabled) {
    transform: scale(0.98);
}

.yri-btn--unlock-wa.is-clicked {
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.35);
}