/*
 * Chefs Finder 3.6.5 — Page-by-page layout audit layer.
 * Structural rules only. No WordPress admin selectors are used here.
 */

/* Global frontend containment */
.cf-platform-page,
.cf-platform-content,
.cf-page-wrap,
.cf-app-shell,
.cf-candidate-portal,
.cf-admin-app,
.cf-resume-builder-wrap,
.cf15-wrap,
.cf-ri-wrap { min-width:0; box-sizing:border-box; }

.cf-platform-page img,
.cf-page-wrap img,
.cf-app-shell img,
.cf-candidate-portal img { max-width:100%; height:auto; }

.cf-platform-page table,
.cf-page-wrap table,
.cf-app-shell table { max-width:100%; }

/* The global Back control is document-flow UI, never a fixed viewport widget. */
.cf-global-back {
    position:static !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;
    z-index:2 !important;
    display:inline-flex !important;
    align-items:center !important;
    gap:8px !important;
    margin:10px 0 8px 20px !important;
}

/* =========================================================
   HOME
   ========================================================= */
body.home .site-main,
body.front-page .site-main { min-height:0; }
body.front-page .cf-hero { overflow:visible; }
body.front-page .cf-home-search { max-width:1180px; }
body.front-page .cf-home-search form { min-width:0; }
body.front-page .cf-home-search input,
body.front-page .cf-home-search select,
body.front-page .cf-home-search button { box-sizing:border-box; }

/* =========================================================
   PUBLIC / CONTENT PAGES
   ========================================================= */
body.cf-platform-page .cf-platform-content,
body.cf-platform-page .cf-page-wrap { width:100%; max-width:1180px; margin-inline:auto; }
body.cf-platform-page .cf-platform-content > * { min-width:0; }
body.cf-platform-page .cf-page-title { overflow-wrap:anywhere; }

/* =========================================================
   AUTHENTICATION
   ========================================================= */
body.cf-platform-login .cf-auth-wrap,
body.cf-platform-register .cf-auth-wrap,
body.cf-platform-forgot-password .cf-auth-wrap,
body.cf-platform-reset-password .cf-auth-wrap,
body.cf-platform-verify-email .cf-auth-wrap {
    width:min(100% - 32px, 760px);
    margin-inline:auto;
}
body.cf-platform-login .cf-auth-wrap form,
body.cf-platform-register .cf-auth-wrap form,
body.cf-platform-forgot-password .cf-auth-wrap form,
body.cf-platform-reset-password .cf-auth-wrap form,
body.cf-platform-verify-email .cf-auth-wrap form {
    width:100%; max-width:100%; box-sizing:border-box;
}
body.cf-platform-login .cf-auth-wrap input,
body.cf-platform-login .cf-auth-wrap select,
body.cf-platform-login .cf-auth-wrap textarea,
body.cf-platform-register .cf-auth-wrap input,
body.cf-platform-register .cf-auth-wrap select,
body.cf-platform-register .cf-auth-wrap textarea,
body.cf-platform-forgot-password .cf-auth-wrap input,
body.cf-platform-forgot-password .cf-auth-wrap select,
body.cf-platform-reset-password .cf-auth-wrap input,
body.cf-platform-reset-password .cf-auth-wrap select,
body.cf-platform-verify-email .cf-auth-wrap input,
body.cf-platform-verify-email .cf-auth-wrap select { max-width:100%; box-sizing:border-box; }

/* =========================================================
   FIND JOBS / SEARCH
   ========================================================= */
body.cf-platform-job-search .cf-job-search,
body.cf-platform-jobs .cf-job-search { width:100%; min-width:0; }
body.cf-platform-job-search .cf-job-search form,
body.cf-platform-jobs .cf-job-search form { width:100%; max-width:100%; box-sizing:border-box; }
body.cf-platform-job-search .cf-job-grid,
body.cf-platform-jobs .cf-job-grid { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; }
body.cf-platform-job-search .cf-job,
body.cf-platform-jobs .cf-job { min-width:0; overflow:hidden; }

/* =========================================================
   TOP CHEFS / COMPANIES / REVIEWS
   ========================================================= */
body.cf-platform-top-chefs .cf-candidate-grid,
body.cf-platform-companies .cf-candidate-grid { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; }
body.cf-platform-top-chefs .cf-candidate-card,
body.cf-platform-companies .cf-candidate-card,
body.cf-platform-company-review .cf-company-review-list-card { min-width:0; overflow:hidden; }
body.cf-platform-company-review .cf-company-review-list { display:grid; gap:16px; }
body.cf-platform-company-review .cf-company-review-list-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:center; }
body.cf-platform-company-review .cf-company-review-list-main { min-width:0; }

/* =========================================================
   MEMBERSHIP
   ========================================================= */
body.cf-platform-membership .cf-membership-grid,
body.cf-platform-membership-checkout .cf-membership-grid { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; }
body.cf-platform-membership .cf-membership-card,
body.cf-platform-membership-checkout .cf-membership-card { min-width:0; }

/* =========================================================
   CANDIDATE DASHBOARD
   Core owns the markup; theme owns presentation.
   ========================================================= */
body.cf-platform-dashboard .cf-candidate-portal {
    width:min(1180px,calc(100% - 32px)) !important;
    max-width:1180px !important;
    margin-inline:auto !important;
}
body.cf-platform-dashboard .cf-candidate-portal-main,
body.cf-platform-dashboard .cf-candidate-portal-content { min-width:0; }
body.cf-platform-dashboard .cf-candidate-dashboard { min-width:0; }
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action-list {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
    width:100% !important;
    min-width:0 !important;
}
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action,
body.cf-platform-dashboard .cf-candidate-dashboard .cf-resume-action {
    display:grid !important;
    grid-template-columns:36px minmax(0,1fr) 18px !important;
    align-items:center !important;
    gap:10px !important;
    min-width:0 !important;
    width:100% !important;
    min-height:72px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
}
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action > span,
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action > strong,
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action small {
    min-width:0 !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
}
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action > span { overflow:hidden; }
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action strong { line-height:1.3 !important; }
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action small { line-height:1.35 !important; }
body.cf-platform-dashboard .cf-candidate-dashboard .cf-dashboard-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-stage-list { grid-template-columns:repeat(6,minmax(0,1fr)); }

/* Candidate portal shell */
body.cf-platform-dashboard .cf-candidate-portal-nav { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
body.cf-platform-dashboard .cf-candidate-portal-nav a { min-width:0; }

/* =========================================================
   EMPLOYER DASHBOARD / ATS / REPORTS
   ========================================================= */
body.cf-platform-dashboard .cf-employer-main-grid { grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr); }
body.cf-platform-dashboard .cf-employer-main-grid > * { min-width:0; }
body.cf-platform-dashboard .cf-employer-kpis { grid-template-columns:repeat(5,minmax(0,1fr)); }
body.cf-platform-dashboard .cf-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.cf-platform-dashboard .cf-ats-mini-grid { grid-template-columns:repeat(7,minmax(0,1fr)); }

/* =========================================================
   RESUME BUILDER
   ========================================================= */
body.cf-platform-resume-builder .cf-resume-builder-wrap,
body.cf-platform-resume-builder .cf-resume { min-width:0; }
body.cf-platform-resume-builder .cf-resume-form,
body.cf-platform-resume-builder .cf-resume-builder-wrap form { max-width:100%; box-sizing:border-box; }
body.cf-platform-resume-builder .cf-two { grid-template-columns:repeat(2,minmax(0,1fr)); }

/* =========================================================
   ADMIN PORTAL
   ========================================================= */
body.cf-platform-admin-portal .cf-platform-content,
body.cf-platform-admin-portal .cf-admin-app { width:100%; max-width:1280px; margin-inline:auto; }
body.cf-platform-admin-portal .cf-admin-app { min-width:0; }
body.cf-platform-admin-portal .cf-admin-main { min-width:0; }
body.cf-platform-admin-portal .cf-admin-table-wrap { width:100%; overflow-x:auto; }
body.cf-platform-admin-portal .cf-admin-table { min-width:760px; }
body.cf-platform-admin-portal .cf-package-form .cf-two { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
body.cf-platform-admin-portal .cf-package-form .cf-four { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
body.cf-platform-admin-portal .cf-package-actions-cell { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
body.cf-platform-admin-portal .cf-package-actions-cell form { margin:0 !important; max-width:none !important; }
body.cf-platform-admin-portal .cf-package-actions-cell .cf-action-btn { white-space:nowrap; }

/* =========================================================
   PAGE BUILDER / GENERIC FORMS
   ========================================================= */
body.cf-platform-page .cf-page-builder-output { width:100%; min-width:0; }
body.cf-platform-page .cf-page-builder-container { min-width:0; }
body.cf-platform-page form { min-width:0; }
body.cf-platform-page input,
body.cf-platform-page select,
body.cf-platform-page textarea,
body.cf-platform-page button { max-width:100%; box-sizing:border-box; }

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width:1050px){
    body.cf-platform-job-search .cf-job-grid,
    body.cf-platform-jobs .cf-job-grid,
    body.cf-platform-top-chefs .cf-candidate-grid,
    body.cf-platform-companies .cf-candidate-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.cf-platform-membership .cf-membership-grid,
    body.cf-platform-membership-checkout .cf-membership-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.cf-platform-dashboard .cf-candidate-portal-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
    body.cf-platform-dashboard .cf-employer-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
    body.cf-platform-dashboard .cf-ats-mini-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
    body.cf-platform-admin-portal .cf-package-form .cf-four { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width:700px){
    body.cf-platform-page .cf-platform-content,
    body.cf-platform-page .cf-page-wrap { width:calc(100% - 24px); }
    body.cf-platform-job-search .cf-job-grid,
    body.cf-platform-jobs .cf-job-grid,
    body.cf-platform-top-chefs .cf-candidate-grid,
    body.cf-platform-companies .cf-candidate-grid,
    body.cf-platform-membership .cf-membership-grid,
    body.cf-platform-membership-checkout .cf-membership-grid { grid-template-columns:1fr; }
    body.cf-platform-company-review .cf-company-review-list-card { grid-template-columns:1fr; }
    body.cf-platform-dashboard .cf-candidate-portal-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-action-list,
    body.cf-platform-dashboard .cf-candidate-dashboard .cf-dashboard-grid { grid-template-columns:1fr !important; }
    body.cf-platform-dashboard .cf-candidate-dashboard .cf-candidate-stage-list { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
    body.cf-platform-dashboard .cf-employer-main-grid { grid-template-columns:1fr; }
    body.cf-platform-dashboard .cf-employer-kpis,
    body.cf-platform-dashboard .cf-ats-mini-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.cf-platform-dashboard .cf-quick-grid { grid-template-columns:1fr; }
    body.cf-platform-resume-builder .cf-two { grid-template-columns:1fr; }
    body.cf-platform-admin-portal .cf-package-form .cf-two,
    body.cf-platform-admin-portal .cf-package-form .cf-four { grid-template-columns:1fr !important; }
    body.cf-platform-admin-portal .cf-admin-actions { grid-template-columns:1fr; }
    body.cf-platform-admin-portal .cf-package-actions-cell { align-items:stretch; }
    body.cf-platform-admin-portal .cf-package-actions-cell > a,
    body.cf-platform-admin-portal .cf-package-actions-cell > form { flex:1 1 auto; }
    .cf-global-back { margin-left:12px !important; }
}

/* 3.6.9 membership fallback: frontend only. */
.cf-membership-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px!important;width:100%!important;min-width:0!important}
.cf-membership-card{min-width:0!important;width:100%!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.cf-membership-card form{width:100%!important;max-width:none!important;min-width:0!important;margin-top:auto!important}
.cf-membership-card .cf-btn{width:100%!important;min-width:0!important;max-width:none!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;line-height:1.25!important}
@media(max-width:1050px){.cf-membership-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:700px){.cf-membership-grid{grid-template-columns:1fr!important}}
