/* ============================================================
   Earn & Flex — Native Check-In Page
   v4.6.0
   ============================================================ */

/* -- Wrap & tab bar ---------------------------------------- */
.ef-ci-wrap { max-width: 780px; margin: 0 auto; padding: 0 0 60px; }

.ef-ci-tab-bar {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 auto 28px auto !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
}
.ef-ci-tab-bar::-webkit-scrollbar { display: none; }
/* Bar only fits without scrolling at wider widths (7 tabs * 88px + 6 gaps ~= 652px) --
   center it there. Below this, justify-content:center on an overflowing flex row is
   ambiguous "unsafe" centering: Chrome/Android clamps scrollLeft at 0 short of the
   true start, permanently hiding the first tab, while iOS Safari falls back to safe
   (start-aligned) centering and shows it fine. flex-start avoids that divergence. */
@media (min-width: 700px) {
    .ef-ci-tab-bar { justify-content: center !important; }
}

/* Fixed 88x75 at ALL screen sizes — bar scrolls on mobile, no proportion change ever */
.ef-ci-tab {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 75px !important;
    flex-shrink: 0 !important;
    background: #495258 !important;
    border: none !important;
    border-radius: 12px 12px 0 0 !important;
    cursor: pointer !important;
    color: #abb8c3 !important;
    transition: background .15s, color .15s !important;
    white-space: nowrap;
    position: relative;
    padding: 0 !important;
    box-sizing: border-box !important;
}
.ef-ci-tab:hover { background: #5a6370 !important; color: #fff !important; }
.ef-ci-tab:hover svg { stroke: #fff !important; }
.ef-ci-tab.ef-ci-tab--active { background: #a800ff !important; color: #fff !important; }
.ef-ci-tab.ef-ci-tab--active svg { stroke: #fff !important; }
.ef-ci-tab svg { stroke: #abb8c3; transition: stroke .15s; flex-shrink: 0; width: 26px; height: 26px; }

.ef-ci-tab-label { font-size: 13px !important; font-weight: 600 !important; line-height: 1 !important; letter-spacing: .01em !important; color: inherit !important; }
.ef-ci-tab-lock { position: absolute; top: 4px; right: 4px; stroke: rgba(255,255,255,.4) !important; width: 10px !important; height: 10px !important; }

/* -- Panels ------------------------------------------------ */
.ef-ci-panel { display: none; }
.ef-ci-panel--active { display: block; }

/* -- Section ---------------------------------------------- */
.ef-ci-section { }
.ef-ci-section-header { margin-bottom: 20px; text-align: center; }
.ef-ci-section-title { font-size: 22px; font-weight: 700; color: #111827; margin: 0 0 6px; text-align: center; }
.ef-ci-section-hint { font-size: 17px; color: #6b7280; margin: 0; text-align: center; }
.ef-ci-saved-badge { background: #d1fae5; color: #065f46; font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.ef-ci-admin-badge { display: inline-block; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin-bottom: 16px; }

/* -- Form fields ------------------------------------------ */
.ef-ci-form { display: flex; flex-direction: column; gap: 0; }
.ef-ci-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ef-ci-label { font-size: 17px; font-weight: 600; color: #374151; }
.ef-ci-field-hint { font-size: 12px; color: #9ca3af; margin: 2px 0 0; }

.ef-ci-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 19px;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}
.ef-ci-input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.ef-ci-input--sm { padding: 6px 8px; font-size: 13px; }

.ef-ci-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 19px;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}
.ef-ci-select:focus { outline: none; border-color: #4f46e5; }
.ef-ci-select:disabled { background-color: #f9fafb; color: #9ca3af; cursor: not-allowed; }

.ef-ci-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 19px;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
    overflow: hidden;
    min-height: 72px;
    transition: height .1s;
}
.ef-ci-textarea:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.ef-ci-textarea--sm { min-height: 56px; }

/* -- Layout rows ------------------------------------------ */
.ef-ci-row { display: flex; gap: 16px; }
.ef-ci-row--2 > * { flex: 1; }
.ef-ci-row--3 > * { flex: 1; }
@media(max-width:600px) {
    .ef-ci-row--2, .ef-ci-row--3 { flex-direction: column; gap: 0; }
}

/* -- Divider labels --------------------------------------- */
.ef-ci-divider-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 6px;
    margin: 24px 0 16px;
    text-align: center;
}
.ef-ci-divider-label:first-child { margin-top: 0; }

/* -- Radio groups ----------------------------------------- */
.ef-ci-radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.ef-ci-radio { display: inline-flex; align-items: center; cursor: pointer; }
.ef-ci-radio input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.ef-ci-radio span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.ef-ci-radio input:checked + span { background: #a800ff; border-color: #a800ff; color: #fff; }
.ef-ci-radio span:hover { border-color: #a800ff; color: #a800ff; background: #f5e6ff; }

/* -- Scale buttons ---------------------------------------- */
/* Select-box groups (confidence, intensity, focus, ratings) */
.ef-ci-select-group { display: flex; gap: 8px; flex-wrap: wrap; }
.ef-ci-select-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 52px;
    padding: 0 10px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    color: #374151;
    transition: all .15s;
    text-align: center;
    line-height: 1.2;
}
.ef-ci-select-box input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.ef-ci-select-box:hover { border-color: #a800ff; color: #a800ff; background: #f5e6ff; }
.ef-ci-select-box--active { border-color: #a800ff; background: #a800ff; color: #fff; }
.ef-ci-select-box small { font-size: 10px; font-weight: 500; display: block; }

/* Legacy scale buttons (kept for any remaining uses) */
.ef-ci-scale-group { display: flex; gap: 6px; }
.ef-ci-scale-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px; font-weight: 600; color: #6b7280;
    transition: all .15s;
}
.ef-ci-scale-btn input { display: none; }
.ef-ci-scale-btn:hover { border-color: #a800ff; color: #a800ff; }
.ef-ci-scale-btn--active { border-color: #a800ff; background: #f5e6ff; color: #a800ff; }

/* Label note (e.g. "5 = highest focus") */
.ef-ci-label-note { font-size: 13px; font-weight: 400; color: #9ca3af; margin-left: 6px; }

/* -- Age display ------------------------------------------ */
.ef-ci-age-display { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* -- Readonly --------------------------------------------- */
.ef-ci-readonly-val { font-size: 14px; color: #374151; padding: 6px 0; }
.ef-ci-readonly-val--sm { font-size: 13px; }
.ef-ci-locked-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
    color: #9ca3af; text-transform: uppercase;
    margin-left: 6px; vertical-align: middle;
}
.ef-ci-readonly-block { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px; font-size: 14px; color: #374151; white-space: pre-wrap; }

/* -- Portal checkbox -------------------------------------- */
.ef-ci-field--portal { margin-top: 8px; }
.ef-ci-checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ef-ci-checkbox-label input { accent-color: #4f46e5; margin-top: 2px; flex-shrink: 0; }
.ef-ci-checkbox-label span { font-size: 14px; color: #374151; }

/* -- Save row --------------------------------------------- */
.ef-ci-save-row { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #f3f4f6; }
.ef-ci-save-msg { font-size: 13px; color: #059669; }
.ef-ci-save-msg--error { color: #dc2626; }

/* -- Buttons ---------------------------------------------- */
.ef-ci-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px;
    background: #4f46e5; color: #fff;
    border: none; border-radius: 6px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: background .15s;
}
.ef-ci-btn:hover { background: #4338ca; color: #fff; }
.ef-ci-btn--primary { background: #4f46e5; }
.ef-ci-btn--secondary { background: #fff; color: #4f46e5; border: 1.5px solid #4f46e5; }
.ef-ci-btn--secondary:hover { background: #eef2ff; color: #4338ca; }
.ef-ci-btn--ghost { background: transparent; color: #4f46e5; border: 1.5px solid #4f46e5; }
.ef-ci-btn--ghost:hover { background: #eef2ff; color: #4f46e5; }
.ef-ci-btn--danger { background: #dc2626; }
.ef-ci-btn--danger:hover { background: #b91c1c; }
.ef-ci-btn--sm { padding: 7px 14px; font-size: 13px; }
.ef-ci-btn--xs { padding: 4px 10px; font-size: 12px; font-weight: 500; }
.ef-ci-link { font-size: 12px; color: #4f46e5; text-decoration: none; }
.ef-ci-link:hover { text-decoration: underline; }
.ef-ci-link-btn { background: none; border: none; color: #4f46e5; font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; }

/* -- Locked panel ----------------------------------------- */
.ef-ci-locked { text-align: center; padding: 60px 20px; }
/* -- Nutrition link block --------------------------------- */
.ef-ci-nutrition-link-block { padding: 16px 0 20px; }
.ef-ci-nutrition-link-block p { font-size: 14px; color: #6b7280; margin: 0 0 14px; }
.ef-ci-locked-icon { margin-bottom: 16px; color: #9ca3af; }
.ef-ci-locked-title { font-size: 22px; font-weight: 700; color: #111827; margin: 0 0 8px; text-align: center; }
.ef-ci-locked-msg { font-size: 14px; color: #6b7280; margin: 0 0 24px; }

/* -- Gate (logged out) ------------------------------------ */
.ef-ci-gate { padding: 40px 20px; text-align: center; font-size: 15px; color: #374151; }

/* -- Empty state ------------------------------------------ */
.ef-ci-empty-state { color: #9ca3af; font-size: 14px; font-style: italic; margin: 16px 0; }

/* -- CNS rows --------------------------------------------- */
.ef-ci-cns-row { margin-bottom: 16px; }
.ef-ci-cns-expand { max-height: 0; overflow: hidden; transition: max-height .2s; margin-top: 8px; }
.ef-ci-cns-expand--open { max-height: 120px; }

/* -- Goals ------------------------------------------------ */
.ef-ci-goal-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ef-ci-goal-row .ef-ci-input { flex: 1; }
.ef-ci-goal-check { flex-shrink: 0; }
.ef-ci-goal-num { display: inline-block; width: 20px; text-align: center; font-size: 13px; font-weight: 600; color: #6b7280; }
.ef-ci-goal-row--readonly { }
.ef-ci-goal-status { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1.5px solid #d1d5db; border-radius: 50%; font-size: 12px; font-weight: 600; color: #6b7280; flex-shrink: 0; }
.ef-ci-goal-status--done { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.ef-ci-goal-text { font-size: 14px; color: #374151; display: flex; flex-direction: column; gap: 2px; }
.ef-ci-goal-text--done { text-decoration: line-through; color: #9ca3af; }
.ef-ci-goal-notes { font-size: 12.5px; color: #6b7280; text-decoration: none; font-weight: 400; }
.ef-ci-goal-meta { font-size: 11.5px; color: #9ca3af; text-decoration: none; font-weight: 400; }

/* -- Baselines grid --------------------------------------- */
.ef-ci-baselines-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 12px; }

/* -- Team ------------------------------------------------- */
.ef-ci-team-list, .ef-ci-team-current { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ef-ci-team-member { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; }
.ef-ci-team-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ef-ci-team-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ef-ci-team-name { font-size: 14px; font-weight: 600; color: #111827; }
.ef-ci-team-role { font-size: 12px; color: #6b7280; }
.ef-ci-team-search-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.ef-ci-team-search-row .ef-ci-input { flex: 1; min-width: 180px; }
.ef-ci-team-search-row .ef-ci-select { width: 120px; }
.ef-ci-team-search-results { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; max-height: 200px; overflow-y: auto; margin-top: 4px; display: none; }
.ef-ci-team-search-result { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.ef-ci-team-search-result:hover { background: #f9fafb; }
.ef-ci-team-search-result img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ef-ci-team-result-name { font-size: 14px; color: #111827; }
.ef-ci-team-result-login { font-size: 12px; color: #9ca3af; }
.ef-ci-team-mgr { margin-top: 8px; }

/* -- Tasks ------------------------------------------------ */
.ef-ci-task-add-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
.ef-ci-task-add-row .ef-ci-input { flex: 1; }
.ef-ci-task-list { display: flex; flex-direction: column; gap: 8px; }
.ef-ci-task { display: flex; align-items: flex-start; gap: 12px; padding: 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
.ef-ci-task--done { opacity: .7; }
.ef-ci-task-check { width: 22px; height: 22px; border: 1.5px solid #d1d5db; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ef-ci-task-check--done { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.ef-ci-task-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ef-ci-task-text { font-size: 17px; color: #111827; }
.ef-ci-task--done .ef-ci-task-text { text-decoration: line-through; color: #9ca3af; }
.ef-ci-task-meta { font-size: 14px; color: #9ca3af; }
.ef-ci-task-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* -- Game recap ------------------------------------------- */
.ef-ci-recap-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ef-ci-recap-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer; transition: background .15s; }
.ef-ci-recap-item:hover { background: #f3f4f6; }
.ef-ci-recap-meta { display: flex; align-items: center; gap: 10px; }
.ef-ci-recap-opp { font-size: 14px; font-weight: 600; color: #111827; }
.ef-ci-recap-result { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.ef-ci-recap-result--win { background: #d1fae5; color: #065f46; }
.ef-ci-recap-result--loss { background: #fee2e2; color: #991b1b; }
.ef-ci-recap-result--tie { background: #fef3c7; color: #92400e; }
.ef-ci-recap-score { font-size: 13px; color: #6b7280; }
.ef-ci-recap-date { font-size: 12px; color: #9ca3af; }

/* -- Photos tab ------------------------------------------- */
.ef-ci-photo-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.ef-ci-photo-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; margin-bottom: 12px; }
.ef-ci-photo-preview { border-radius: 8px; overflow: hidden; background: #f3f4f6; margin-bottom: 12px; background-size: cover; background-position: center; }
.ef-ci-photo-preview--avatar { width: 120px; height: 120px; border-radius: 50%; }
.ef-ci-photo-preview--avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ef-ci-photo-preview--cover { width: 100%; height: 140px; }
.ef-ci-photo-preview--tile { width: 100%; height: 180px; }
.ef-ci-photo-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: #9ca3af; font-size: 13px; }
.ef-ci-photo-hint { font-size: 13px; color: #6b7280; margin: 0 0 12px; }
.ef-ci-upload-status { font-size: 13px; margin-top: 8px; color: #059669; }
.ef-ci-upload-status--error { color: #dc2626; }

/* -- Metrics ---------------------------------------------- */
.ef-ci-metrics-table { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ef-ci-metrics-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.ef-ci-metrics-name { flex: 1; font-size: 17px; color: #374151; font-weight: 500; }
.ef-ci-metrics-unit { font-size: 11px; font-weight: 600; color: #9ca3af; text-transform: uppercase; margin-left: 6px; letter-spacing: .04em; }
.ef-ci-metrics-pair { display: flex; gap: 10px; flex-shrink: 0; }
.ef-ci-metrics-cell { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.ef-ci-metrics-cell--wide { min-width: 120px; }
.ef-ci-metrics-cell-label { font-size: 12px; font-weight: 700; color: #4f46e5; text-transform: uppercase; letter-spacing: .06em; }
.ef-ci-metrics-cell-label--bl { color: #9ca3af; }
.ef-ci-metrics-cell .ef-ci-input--sm { width: 90px; text-align: center; font-size: 17px; }
.ef-ci-metrics-cell .ef-ci-readonly-val--sm { width: 90px; text-align: center; padding: 8px 10px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 4px; font-size: 17px; }

/* -- Searchable combobox (country / state / city) ------------------------- */
.ef-combo { position: relative; }

.ef-combo-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.ef-combo-dropdown.ef-combo-open { display: block; }

.ef-combo-option {
    padding: 11px 14px;
    font-size: 17px;
    color: #111827;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}
.ef-combo-option:last-child { border-bottom: none; }
.ef-combo-option:hover { background: #f5e6ff; color: #a800ff; }
.ef-combo-option.ef-combo-selected { background: #a800ff; color: #fff; }
.ef-combo-option.ef-combo-hidden { display: none; }
.ef-combo-no-results {
    padding: 12px 14px;
    font-size: 15px;
    color: #9ca3af;
    font-style: italic;
}
