/**
 * InsidePiano — Community Builder: Profile View, Edit Profile,
 * TinyMCE Dark Theme, qtip Tooltips, Hide Empty Column
 */

/* ============================================================
   Community Builder — User Profile
   Layout: header row + two cards (Personal + Suscripción)
   No left column, no tabs, no social elements
   ============================================================ */

/* Strip the outer demo-card wrapper — each section is its own card */
.demo-card:has(.cbProfileCanvasHome) {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}
.demo-card-body:has(.cbProfileCanvasHome) {
    background: transparent !important;
    padding: 0 !important;
}

/* ---- Reset CB's outer layout to a single vertical column ---- */
.cbProfileCanvasHome .cbCanvasHomeLayout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

/* ---- Main row: kill flex-wrap, make it a full-width column ---- */
.cbProfileCanvasHome .cbCanvasHomeLayoutMain {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
}

/* ================================================================
   HEADER ROW — avatar + name + edit button
   We repurpose cbCanvasHomeLayoutLeft as the header
   ================================================================ */
.cbProfileCanvasHome .cbCanvasHomeLayoutLeft {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
    width: 100% !important;
    flex-shrink: unset !important;
    background: #1F1F21;
    border: 1px solid #2e2e33;
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    position: relative;
}

/* Hide stats — Conexiones/Vistas not relevant for a student */
.cbProfileCanvasHome .cbCanvasHomeLayoutStats {
    display: none !important;
}

/* Avatar card wrapper — make it a flex row: avatar left, name right */
.cb_template.cbProfileCanvasHome .cbCanvasHomeLayoutUser,
.cbProfileCanvasHome .cbCanvasHomeLayoutUser.bg-light {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    flex-shrink: 0;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
    width: 100% !important;
}

/* Avatar image */
.cbProfileCanvasHome .cbImgAvatar {
    border: 2px solid rgba(255, 255, 255, 0.7) !important;
    border-radius: 50% !important;
    width: 64px !important;
    height: 64px !important;
    object-fit: cover;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: block;
}

/* Hide online status row */
.cbProfileCanvasHome .cbft_status {
    display: none !important;
}

/* Hide avatar form-group wrapper padding */
.cbProfileCanvasHome .cbCanvasHomeLayoutAvatar .form-group {
    margin: 0 !important;
    padding: 0 !important;
}

/* Name + sub-info block next to avatar */
.cbProfileCanvasHome .cbCanvasHomeLayoutName {
    flex: 1;
}
.cbProfileCanvasHome .cbCanvasHomeLayoutName .cb-page-header {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.cbProfileCanvasHome .cb-page-header-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #c8c8cd !important;
    margin: 0 0 0.2rem !important;
    padding: 0 !important;
}
/* Subtitle line under name — username · city */
.cbProfileCanvasHome .cbProfileTitle + * {
    color: #939397;
    font-size: 0.8rem;
}

/* Edit Profile button — injected via JS, top-right of header */
.cb-profile-edit-btn,
.cb_template .cb-profile-edit-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #9f92fe !important;
    background: rgba(115,103,240,0.15) !important;
    border: 1px solid rgba(115,103,240,0.4);
    border-radius: 0.375rem;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
.cb-profile-edit-btn:hover,
.cb_template .cb-profile-edit-btn:hover {
    color: #9f92fe !important;
    background-color: rgba(115,103,240,0.28) !important;
    border-color: rgba(115,103,240,0.7);
    box-shadow: 0 0 0 1px rgba(115,103,240,0.25);
    text-decoration: none;
}

/* ============================================================
   Community Builder — Edit Profile (cbEditProfile)
   Scope: .cb_template.cbEditProfile
   CB classes confirmed via DOM inspection:
     form.cb_form.cbValidation
       .form-group.row.no-gutters.cb_form_line.cbft_*
         label.col-form-label.col-sm-3
         .cb_field.col-sm-9
           input/select/textarea.form-control
     .cbProfileEditButtons > .offset-sm-3.col-sm-9
       button.cbProfileEditSubmit
       a.cbProfileEditCancel
   ============================================================ */

/* ---- Outer wrapper ---- */
.cb_template.cbEditProfile {
    color: #c8c8cd;
}

/* Strip the outer card — let section cards float on page bg */
.demo-card:has(.cb_template.cbEditProfile) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.demo-card-body:has(.cb_template.cbEditProfile) {
    padding: 0 !important;
}

/* ---- Section cards injected by JS ---- */
.cb_template.cbEditProfile .cbFieldsContentsTab {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
}

/* Progress bar row sits outside cards — give it breathing room */
.cb_template.cbEditProfile .cbft_progress {
    padding: 0.75rem 0 0.25rem !important;
}

/* Submit buttons row — pad so they don't sit flush on page bg */
.cb_template.cbEditProfile .cbProfileEditButtons {
    padding: 1rem 0 0.5rem !important;
    border-top: none !important;
    margin-top: 0 !important;
}

.cb-edit-card {
    background: #1F1F21;
    border: 1px solid #2e2e33;
    border-radius: 0.5rem;
    overflow: hidden;
}

.cb-edit-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #2e2e33;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #57575a;
}

.cb-edit-card-header .bi {
    font-size: 1.2rem;
    color: #7367f0;
    opacity: 0.8;
}

.cb-edit-card-body {
    padding: 0.25rem 1.25rem 0.5rem;
}

/* TinyMCE dark content area */
body:has(.cbEditProfile) .tox-tinymce {
    border: 1px solid #2e2e33 !important;
    border-radius: 0.375rem !important;
}
body:has(.cbEditProfile) .tox .tox-edit-area__iframe {
    background: #161618 !important;
}
body:has(.cbEditProfile) .tox:not(.tox-tinymce-inline) .tox-editor-header {
    background: #1F1F21 !important;
    border-bottom: 1px solid #2e2e33 !important;
}
body:has(.cbEditProfile) .tox .tox-toolbar,
body:has(.cbEditProfile) .tox .tox-toolbar__primary {
    background: #1F1F21 !important;
}
body:has(.cbEditProfile) .tox .tox-statusbar {
    background: #1F1F21 !important;
    border-top: 1px solid #2e2e33 !important;
    color: #57575a !important;
}

/* Hide YT Shortcodes panel + button bar on edit profile page only */
body:has(.cbEditProfile) .yt_shortcode_overlay,
body:has(.cbEditProfile) .yt_shortcodes_plugin,
body:has(.cbEditProfile) .wapper_shortcodes_plugin,
body:has(.cbEditProfile) #editor-xtd-buttons {
    display: none !important;
}

/* field rows inside cards — remove the outer border-bottom on last child */
.cb-edit-card-body .cb_form_line:last-child {
    border-bottom: none !important;
}

/* Progress card: cbfr_117 (hidden date) is last-child so :last-child doesn't fire on cbfr_116.
   Foto card: inner dropdown .cb_form_line inside cbfv_29 is the last visible row.
   Target both directly. */
.cb_template.cbEditProfile #cbfr_116 {
    border-bottom: none !important;
}
.cb_template.cbEditProfile #cbfv_29 > .form-group.cb_form_line:not(.hidden) {
    border-bottom: none !important;
}

/* ---- Page title — hidden, module card has its own title ---- */
.cb_template.cbEditProfile .cb-page-header {
    display: none !important;
}

/* Date row — kept in DOM for CB but not displayed standalone */
.cb_template.cbEditProfile .cbft_date {
    display: none !important;
}

/* ---- Progress bar — full-width stacked layout ---- */
.cb_template.cbEditProfile .cbft_progress {
    display: block !important;      /* override row/flex so columns stack */
}
.cb_template.cbEditProfile .cbft_progress .col-form-label {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: #c8c8cd !important;
    margin-bottom: 0.5rem !important;
    padding: 0 !important;
}
.cb_template.cbEditProfile .cbft_progress .cb_field {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}
/* cbfv_* flex wrapper must not squeeze the bar — override our generic rule */
.cb_template.cbEditProfile .cbft_progress .cb_field > div[id^="cbfv_"] {
    display: block !important;
    width: 100% !important;
}
.cb_template.cbEditProfile .cbProgress {
    width: 100% !important;
}
.cb_template.cbEditProfile .cbProgress .progress {
    width: 100% !important;
    height: 6px !important;
    background-color: #2e2e33 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
}
.cb_template.cbEditProfile .cbProgress .progress-bar {
    background-color: #7367f0 !important;
    border-radius: 3px !important;
}

/* ---- Field rows ---- */
.cb_template.cbEditProfile .cb_form_line {
    padding: 0.65rem 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(46,46,51,0.7) !important;
    background: transparent !important;
    align-items: center !important;
}
.cb_template.cbEditProfile .cb_form_line:last-of-type {
    border-bottom: none !important;
}
/* Remove CB's alternating row shading */
.cb_template.cbEditProfile .sectiontableentry1,
.cb_template.cbEditProfile .sectiontableentry2 {
    background: transparent !important;
}

/* ---- Labels ---- */
.cb_template.cbEditProfile .col-form-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #8a8a90 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.5 !important;
}

/* ---- All inputs, selects, textareas ---- */
.cb_template.cbEditProfile .form-control {
    background-color: #161618 !important;
    border: 1px solid #3d3d45 !important;
    color: #c8c8cd !important;
    border-radius: 0.375rem !important;
    font-size: 0.875rem !important;
    padding: 0.4rem 0.75rem !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    height: auto !important;
    line-height: 1.5 !important;
}
.cb_template.cbEditProfile .form-control:focus {
    background-color: #161618 !important;
    border-color: #7367f0 !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.15) !important;
    outline: none !important;
}
.cb_template.cbEditProfile .form-control::placeholder {
    color: #57575a !important;
    opacity: 1 !important;
}
/* Disabled / readonly (username field) */
.cb_template.cbEditProfile .form-control[disabled],
.cb_template.cbEditProfile .form-control[readonly] {
    background-color: #1a1a1c !important;
    color: #57575a !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    border-color: #2e2e33 !important;
}
/* Select arrow */
.cb_template.cbEditProfile select.form-control {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23939397' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 14px 10px !important;
    padding-right: 2.25rem !important;
}
.cb_template.cbEditProfile select.form-control option {
    background-color: #1F1F21;
    color: #c8c8cd;
}
/* Textarea (bio / Acerca) */
.cb_template.cbEditProfile textarea.form-control,
.cb_template.cbEditProfile textarea {
    background-color: #161618 !important;
    border: 1px solid #3d3d45 !important;
    color: #c8c8cd !important;
    border-radius: 0.375rem !important;
    font-size: 0.875rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-height: 120px !important;
    resize: vertical !important;
    line-height: 1.6 !important;
    font-family: inherit !important;
    padding: 0.4rem 0.75rem !important;
}
.cb_template.cbEditProfile textarea:focus {
    border-color: #7367f0 !important;
    box-shadow: 0 0 0 3px rgba(115,103,240,0.15) !important;
    outline: none !important;
}

/* ---- cbfv_* wrapper: input + icons inline ---- */
.cb_template.cbEditProfile .cb_field > div[id^="cbfv_"] {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    width: 100% !important;
}
.cb_template.cbEditProfile .cb_field > div[id^="cbfv_"] > .form-control,
.cb_template.cbEditProfile .cb_field > div[id^="cbfv_"] > .input-group {
    flex: 1 !important;
    min-width: 0 !important;
}
/* But textarea and image field shouldn't be inline-flex */
.cb_template.cbEditProfile .cbft_editorta .cb_field > div[id^="cbfv_"],
.cb_template.cbEditProfile .cbft_image .cb_field > div[id^="cbfv_"] {
    display: block !important;
}

/* ---- cbFieldIcons — fixed-width column so ALL inputs share the same right edge ---- */
/* Max visible icons is 2 (star + eye). Each icon ~14px + gap. Reserve 44px = 2×14 + spacing. */
.cb_template.cbEditProfile .cbFieldIcons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.3rem !important;
    flex-shrink: 0 !important;
    width: 44px !important;       /* fixed: same for every row */
    min-width: 44px !important;
    margin-left: 0.4rem !important;
}
.cb_template.cbEditProfile .cbFieldIcons .fa {
    color: #3d3d45 !important;
    font-size: 0.875rem !important;
    cursor: default !important;
    transition: color 0.15s ease !important;
}
.cb_template.cbEditProfile .cbFieldIcons .fa:hover {
    color: #7367f0 !important;
}
/* Hide tooltip info icon — clutters the UI */
.cb_template.cbEditProfile .cbFieldIcons .fa-info-circle {
    display: none !important;
}

/* ---- Password show/hide buttons ---- */
.cb_template.cbEditProfile .cbPasswordUnmask .btn {
    background: transparent !important;
    border: 1px solid #3d3d45 !important;
    color: #57575a !important;
    border-radius: 0 0.375rem 0.375rem 0 !important;
    padding: 0.4rem 0.65rem !important;
    font-size: 0.8rem !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
    transition: color 0.15s ease, border-color 0.15s ease !important;
}
.cb_template.cbEditProfile .cbPasswordUnmask .btn:hover {
    color: #c8c8cd !important;
    border-color: #7367f0 !important;
    background: transparent !important;
}
/* Input group — password field + show button */
.cb_template.cbEditProfile .input-group > .form-control {
    border-right: none !important;
    border-radius: 0.375rem 0 0 0.375rem !important;
}

/* ---- Date field (read-only display) ---- */
.cb_template.cbEditProfile .cbft_date .form-control-plaintext {
    color: #939397 !important;
    font-size: 0.875rem !important;
    padding: 0.4rem 0 !important;
}

/* ---- Social login rows (Facebook / Microsoft / Discord) ---- */
.cb_template.cbEditProfile .cbft_providerid .col-form-label {
    color: #57575a !important;
    font-size: 0.8rem !important;
}
.cb_template.cbEditProfile .cbft_providerid .cb_field {
    color: #57575a !important;
    font-size: 0.8rem !important;
    font-style: italic !important;
}

/* ============================================================
   Avatar / Profile Image section
   ============================================================ */

/* Current avatar thumbnail */
/* Hide hr below avatar card */
.cb_template.cbEditProfile .cbft_image + hr,
.cb_template.cbEditProfile .cbft_image ~ hr {
    display: none !important;
}
.cb_template.cbEditProfile .cb-edit-card:has(.cbft_image) {
    border-bottom: none !important;
}
.cb_template.cbEditProfile .cbImageFieldImage {
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}
.cb_template.cbEditProfile .cbImageFieldImage .cbImgAvatar {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,0.15) !important;
    object-fit: cover !important;
    display: block !important;
    /* Kill Bootstrap img-thumbnail white bg */
    background-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Action dropdown (Imagen sin cambios / Subir / Galería / Quitar) */
.cb_template.cbEditProfile .cbImageFieldChoice {
    max-width: 280px !important;
}

/* Upload field — shown when "Subir nueva imagen" is selected */
.cb_template.cbEditProfile .cbImageFieldUpload {
    margin-top: 0.75rem !important;
    padding: 0.75rem !important;
    background: rgba(115,103,240,0.05) !important;
    border: 1px dashed rgba(115,103,240,0.3) !important;
    border-radius: 0.5rem !important;
}
.cb_template.cbEditProfile .cbImageFieldUpload .mb-2 {
    font-size: 0.78rem !important;
    color: #57575a !important;
    margin-bottom: 0.5rem !important;
}
.cb_template.cbEditProfile .cbImageFieldUpload input[type="file"] {
    font-size: 0.8rem !important;
    color: #c8c8cd !important;
}

/* Gallery grid — shown when "Seleccione de la galería" is selected */
.cb_template.cbEditProfile .cbImageFieldGallery {
    margin-top: 0.75rem !important;
    gap: 0.5rem !important;
}
.cb_template.cbEditProfile .cbImageFieldGallery .col-auto {
    padding: 4px !important;
}
/* Gallery radio inputs are sr-only; style the label/image */
.cb_template.cbEditProfile .cbImageFieldGallery label img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: border-color 0.15s ease, opacity 0.15s ease !important;
    opacity: 0.7 !important;
}
.cb_template.cbEditProfile .cbImageFieldGallery label img:hover {
    border-color: #7367f0 !important;
    opacity: 1 !important;
}
.cb_template.cbEditProfile .cbImageFieldGallery input[type="radio"]:checked + label img,
.cb_template.cbEditProfile .cbImageFieldGallery label:has(input:checked) img {
    border-color: #7367f0 !important;
    opacity: 1 !important;
}
/* Selected checkmark overlay */
.cb_template.cbEditProfile .cbImageFieldGallery .position-relative {
    position: relative !important;
}

/* ============================================================
   TinyMCE — prevent white flash on load
   Force the iframe wrapper and toolbar to dark before JS skin swap
   ============================================================ */
.tox-tinymce {
    background-color: #161618 !important;
    border-color: #2e2e33 !important;
}
.tox .tox-edit-area {
    background-color: #161618 !important;
}
.tox .tox-edit-area__iframe {
    background-color: #161618 !important;
    color-scheme: dark;
}
.tox .tox-toolbar-overlord,
.tox .tox-toolbar,
.tox .tox-toolbar__primary,
.tox:not(.tox-tinymce-inline) .tox-editor-header {
    background-color: #1F1F21 !important;
}
.tox .tox-statusbar {
    background-color: #1F1F21 !important;
    border-top-color: #2e2e33 !important;
}

/* ============================================================
   CB qTip Tooltip — dark theme
   ============================================================ */
.qtip.qtip-bootstrap,
.qtip-bootstrap {
    background-color: #1F1F21 !important;
    border-color: #2e2e33 !important;
    color: #c8c8cd !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
}

.qtip-bootstrap .qtip-titlebar {
    background-color: #2a2a2e !important;
    border-bottom-color: #2e2e33 !important;
    color: #c8c8cd !important;
}

.qtip-bootstrap .qtip-content {
    color: #939397 !important;
}

/* Fallback: catch any qtip style in use */
.qtip {
    background-color: #1F1F21 !important;
    border-color: #2e2e33 !important;
    color: #c8c8cd !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    font-size: 0.875rem !important;
}

.qtip .qtip-titlebar {
    background-color: #2a2a2e !important;
    border-bottom-color: #2e2e33 !important;
    color: #c8c8cd !important;
}

.qtip .qtip-content {
    color: #939397 !important;
    padding: 0.5rem 0.75rem !important;
    line-height: 1.4 !important;
    min-height: 0 !important;
    height: auto !important;
}

/* ============================================================
   CB User Profile — hide empty right column, full-width main
   ============================================================ */
.cbTabsMenuRight:empty {
    display: none !important;
}
.cbTabsMenuMain:has(.cbTabsMenuRight:empty) > .col-sm {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* ── cb-edit-card-header section title text (inline fix) ───────── */
.cb-edit-card-header i {
  font-size: 1.3rem;
}

.cb-edit-card-header span {
  font-size: 1.125rem;
  font-weight: 600;
  color: #c8c8cd;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ================================================================
   MIDDLE COLUMN — becomes our two-card content area
   ================================================================ */
.cbProfileCanvasHome .cbCanvasHomeLayoutMiddle {
    width: 100% !important;
    flex: unset !important;
}

/* Hide the tab nav bar entirely */
.cbProfileCanvasHome .cbNavBar,
.cb_template.cbProfileCanvasHome .cbNavBar {
    display: none !important;
}

/* Show ALL tab panes — no hidden tabs, just stacked cards */
.cbProfileCanvasHome .cbTabPane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Each tab pane becomes a card */
.cbProfileCanvasHome .cbTabPane {
    background: #1F1F21;
    border: 1px solid #2e2e33;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.cbProfileCanvasHome .cbTabPane:last-child {
    margin-bottom: 0;
}

/* Card section title */
.cbProfileCanvasHome .cbTabPane > .cbFieldsContentsTab::before {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #57575a;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #2e2e33;
}
#cbtabpane24 > .cbFieldsContentsTab::before { content: 'Información Personal'; }
#cbtabpane11 > .cbFieldsContentsTab::before { content: 'Contacto'; }
#cbtabpane25 > .cbFieldsContentsTab::before { content: 'Suscripción'; }

/* Field rows: label left, value right */
.cbProfileCanvasHome .cbTabPane .form-group {
    display: grid !important;
    grid-template-columns: 180px 1fr !important;
    align-items: baseline;
    margin: 0 !important;
    padding: 0.6rem 0 !important;
    border-bottom: 1px solid rgba(46,46,51,0.7);
    gap: 1rem;
}
.cbProfileCanvasHome .cbTabPane .form-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cbProfileCanvasHome .cbTabPane label.col-form-label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #8a8a90 !important;
    padding: 0 !important;
    width: auto !important;
    flex: none !important;
    white-space: nowrap;
}

.cbProfileCanvasHome .cbTabPane .cb_field {
    color: #c8c8cd !important;
    font-size: 1rem !important;
    width: auto !important;
    flex: none !important;
}
.cbProfileCanvasHome .cbTabPane .cb_field strong {
    font-weight: 500;
    color: #c8c8cd;
}

.cbProfileCanvasHome .cbTabPane h2,
.cbProfileCanvasHome .cbTabPane h3,
.cbProfileCanvasHome .cbTabPane h4 {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #57575a !important;
    padding-bottom: 0.6rem !important;
    border-bottom: 1px solid #2e2e33 !important;
    margin: 1.25rem 0 0.75rem !important;
}
.cbProfileCanvasHome .cbTabPane h2:first-child,
.cbProfileCanvasHome .cbTabPane h3:first-child,
.cbProfileCanvasHome .cbTabPane h4:first-child {
    margin-top: 0 !important;
}

.cbProfileCanvasHome .cbTabPane a {
    color: #7367f0 !important;
}
.cbProfileCanvasHome .cbTabPane a:hover {
    color: #9f92fe !important;
}

.cbProfileCanvasHome .cbTabPane .btn-primary,
.cbProfileCanvasHome .cbregPlan .btn-primary {
    background-color: rgba(115,103,240,0.15) !important;
    border: 1px solid rgba(115,103,240,0.4) !important;
    color: #9f92fe !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    border-radius: 0.375rem !important;
    box-shadow: none !important;
    padding: 0.35rem 0.85rem !important;
    margin-top: 0 !important;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s !important;
    white-space: nowrap;
}
.cbProfileCanvasHome .cbTabPane .btn-primary:hover,
.cbProfileCanvasHome .cbregPlan .btn-primary:hover {
    background-color: rgba(115,103,240,0.28) !important;
    border-color: rgba(115,103,240,0.7) !important;
    color: #9f92fe !important;
    box-shadow: 0 0 0 1px rgba(115,103,240,0.25) !important;
}

.cbProfileCanvasHome .cbTabPane img:not(.cbImgAvatar) {
    display: none !important;
}

#cbregProfileTitle,
#cbregSubscribed {
    display: none !important;
}

.cbProfileCanvasHome #cbregSubscr {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.cbProfileCanvasHome .cbregPlan {
    display: block !important;
    padding: 0.75rem 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(46,46,51,0.7);
}
.cbProfileCanvasHome .cbregPlan:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cbProfileCanvasHome .cbRegNameDesc {
    display: grid !important;
    grid-template-columns: 1.25rem auto 1fr !important;
    align-items: center !important;
    gap: 0 0.75rem !important;
    width: 100% !important;
}

.cbProfileCanvasHome .cbregTick {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    flex-shrink: 0 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}
.cbProfileCanvasHome .cbregTick .bi {
    font-size: 1.1rem !important;
    line-height: 1 !important;
    display: block !important;
}

.cbProfileCanvasHome .cbregTick .fa-check {
    color: #28c76f !important;
    font-size: 1rem !important;
    display: block !important;
}

.cbProfileCanvasHome .cbregTick .fa-close {
    color: #ea5455 !important;
    font-size: 1rem !important;
    display: block !important;
}

.cbProfileCanvasHome .cbregName {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #c8c8cd !important;
    margin: 0 !important;
    flex-shrink: 0;
    min-width: 120px;
}

.cbProfileCanvasHome .cbregValExp {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    font-size: 1rem !important;
    color: #939397 !important;
    margin: 0 !important;
    flex: 1 !important;
}
.cbProfileCanvasHome .cbregValidity,
.cbProfileCanvasHome .cbregExpiring {
    color: #939397 !important;
    font-size: 1rem !important;
}

.cbProfileCanvasHome .cbregParagraph {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
}

@media (max-width: 600px) {
    .cbProfileCanvasHome .cbregParagraph {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 0.4rem !important;
    }
    .cbProfileCanvasHome .cbRegNameDesc {
        grid-template-columns: 1.25rem 1fr !important;
    }
    .cbProfileCanvasHome .cbregParagraph {
        grid-column: 1 / -1 !important;
        padding-left: calc(1.25rem + 0.75rem) !important;
    }
}

.cbProfileCanvasHome .cbregDescription {
    display: none !important;
}

.cbProfileCanvasHome .cbregSubPlanSelector {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0;
    margin: 0 !important;
}
.cbProfileCanvasHome .cbregButton {
    display: flex !important;
    align-items: center !important;
}

.cbProfileCanvasHome #cbfr_61 .form-control-plaintext {
    color: #c8c8cd !important;
    font-size: 1rem !important;
    padding: 0 !important;
    background: transparent !important;
}

.cbProfileCanvasHome #cbfr_63 {
    display: grid !important;
}
.cbProfileCanvasHome #cbfr_63::before {
    content: 'País:';
    display: block;
    width: 100%;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a8a90;
    padding-bottom: 0;
    margin-bottom: 0;
}

#cbfr_27, #cbfr_28, #cbfr_49 {
    display: none !important;
}

.cbProfileCanvasHome .cbTabsContent,
.cbProfileCanvasHome .cbTabsMenuContent {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

/* Responsive: profile cards — mobile + tablet portrait */
@media (max-width: 1100px) {
    .cbProfileCanvasHome .cbCanvasHomeLayoutLeft {
        flex-wrap: wrap !important;
        gap: 0.75rem 1rem !important;
    }
    .cbProfileCanvasHome .cbCanvasHomeLayoutUser {
        flex: 1 !important;
        min-width: 0 !important;
    }
    .cb-profile-edit-btn {
        position: static !important;
        width: 100% !important;
        justify-content: center !important;
        margin-top: 0 !important;
    }
    .cbProfileCanvasHome .cbTabPane .cbtwolinesfield {
        grid-template-columns: 1fr !important;
    }
    .cbProfileCanvasHome .cbTabPane .cbtwolinesfield .col-form-label {
        padding-bottom: 0.15rem !important;
    }
    .cbProfileCanvasHome .cbTabPane .cbtwolinesfield .cb_field {
        padding-top: 0 !important;
    }
    .cbProfileCanvasHome .cbRegNameDesc {
        grid-template-columns: 1.25rem 1fr !important;
    }
    .cbProfileCanvasHome .cbregParagraph {
        grid-column: 1 / -1 !important;
        padding-left: calc(1.25rem + 0.75rem) !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.4rem !important;
    }
}

/* ============================================================
   Submit / Cancel buttons
   ============================================================ */

.cb_template.cbEditProfile .cbProfileEditButtons {
    padding: 1rem 0 0.5rem !important;
    border-top: 1px solid #2e2e33 !important;
    margin-top: 0.5rem !important;
}

.cb_template.cbEditProfile .cbProfileEditSubmit,
.cb_template .btn-primary.cbProfileEditSubmit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.45rem 1.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #9f92fe !important;
    background: rgba(115,103,240,0.15) !important;
    border: 1px solid rgba(115,103,240,0.4) !important;
    border-radius: 0.375rem !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
    --bs-btn-color: #9f92fe !important;
    --bs-btn-bg: transparent !important;
    --bs-btn-border-color: rgba(115,103,240,0.4) !important;
    --bs-btn-hover-color: #9f92fe !important;
    --bs-btn-hover-bg: rgba(115,103,240,0.15) !important;
    --bs-btn-hover-border-color: rgba(115,103,240,0.7) !important;
    --bs-btn-active-bg: rgba(115,103,240,0.2) !important;
    --bs-btn-focus-shadow-rgb: 115,103,240 !important;
}
.cb_template.cbEditProfile .cbProfileEditSubmit:hover,
.cb_template .btn-primary.cbProfileEditSubmit:hover {
    background-color: rgba(115,103,240,0.28) !important;
    border-color: rgba(115,103,240,0.7) !important;
    color: #9f92fe !important;
    box-shadow: 0 0 0 1px rgba(115,103,240,0.25) !important;
}
.cb_template.cbEditProfile .cbProfileEditSubmit:active {
    background-color: rgba(115,103,240,0.25) !important;
}

.cb_template.cbEditProfile .cbProfileEditCancel {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: #57575a !important;
    background: transparent !important;
    border: 1px solid #2e2e33 !important;
    border-radius: 0.375rem !important;
    text-decoration: none !important;
    margin-left: 0.5rem !important;
    transition: color 0.15s ease, border-color 0.15s ease !important;
    --bs-btn-color: #57575a !important;
    --bs-btn-bg: transparent !important;
    --bs-btn-border-color: #2e2e33 !important;
}
.cb_template.cbEditProfile .cbProfileEditCancel:hover {
    color: #c8c8cd !important;
    border-color: #3d3d45 !important;
    text-decoration: none !important;
    background: transparent !important;
}

.cb_template.cbEditProfile .cbtwolinesfield {
    align-items: flex-start !important;
}
.cb_template.cbEditProfile .cbtwolinesfield .col-sm-12 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}
.cb_template.cbEditProfile .cbtwolinesfield .cb_field {
    width: 100% !important;
}
.cb_template.cbEditProfile .cbtwolinesfield .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.cb_template.cbEditProfile .btn-outline-light,
.cb_template.cbEditProfile .cbPasswordUnmask .btn-outline-light {
    color: #57575a !important;
    background-color: #161618 !important;
    border-color: #3d3d45 !important;
    border-left: none !important;
    font-size: 0.78rem !important;
    padding: 0.4rem 0.75rem !important;
    box-shadow: none !important;
}
.cb_template.cbEditProfile .btn-outline-light:hover {
    color: #c8c8cd !important;
    background-color: #1F1F21 !important;
    border-color: #7367f0 !important;
}

.cb_template.cbEditProfile .cbImgAvatar,
.cb_template.cbEditProfile img.cbImgPict.rounded-circle {
    border: 3px solid #ffffff !important;
    box-shadow: none !important;
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    display: block !important;
}

.cb_template.cbEditProfile .cbImageFieldImage {
    display: inline-flex !important;
    align-items: center !important;
    gap: 1.25rem !important;
    padding: 0.75rem !important;
    border: 1px dashed rgba(115,103,240,0.35) !important;
    border-radius: 0.5rem !important;
    background: rgba(95,74,254,0.04) !important;
    margin-bottom: 1rem !important;
    width: auto !important;
}

.cb_template.cbEditProfile .cbImageFieldChoice {
    background-color: #161618 !important;
    border: 1px solid #2e2e33 !important;
    color: #c8c8cd !important;
    border-radius: 0.375rem !important;
    padding: 0.5rem 0.75rem !important;
    width: 100% !important;
}
.cb_template.cbEditProfile .cbImageFieldChoice:focus {
    border-color: rgba(115,103,240,0.6) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(115,103,240,0.15) !important;
}

.qtip.popover {
    background-color: #1F1F21 !important;
    border: 1px solid #2e2e33 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
    color: #c8c8cd !important;
}
.qtip.popover .qtip-content {
    color: #c8c8cd !important;
    background-color: transparent !important;
    padding: 0.4rem 0.75rem !important;
    line-height: 1.4 !important;
    min-height: 0 !important;
    height: auto !important;
}
.qtip.popover {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 0 !important;
}
.qtip.popover .qtip-tip canvas {
    opacity: 0 !important;
}
.cbTooltip .fa-eye,
.cbTooltip .fa-eye-slash {
    color: #5F4AFE !important;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.cbTooltip:hover .fa-eye,
.cbTooltip:hover .fa-eye-slash {
    opacity: 1;
}

.js-editor-tinymce,
.js-editor-tinymce .tox-tinymce {
    width: 100% !important;
}

.cb_template.cbEditProfile .js-tiny-toggler-button,
.cb_template.cbEditProfile .btn.js-tiny-toggler-button {
    background-color: rgba(115,103,240,0.15) !important;
    border: 1px solid rgba(115,103,240,0.4) !important;
    color: #9f92fe !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.cb_template.cbEditProfile .js-tiny-toggler-button:hover,
.cb_template.cbEditProfile .btn.js-tiny-toggler-button:hover {
    border-color: rgba(115,103,240,0.7) !important;
    color: #b8affe !important;
    box-shadow: 0 0 0 1px rgba(115,103,240,0.25) !important;
    background-color: rgba(115,103,240,0.28) !important;
}

.cb_template.cbEditProfile .cbProfileEditSubmit,
.cb_template.cbEditProfile .cbProfileEditCancel {
    min-width: 140px !important;
    padding: 0.5rem 1.5rem !important;
    font-size: 0.875rem !important;
    border-radius: 0.375rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

body .demo-card-body .cb_template a.cbProfileEditCancel {
    background-color: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(200,200,205,0.55) !important;
    color: #c8c8cd !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
body .demo-card-body .cb_template a.cbProfileEditCancel:hover {
    border-color: rgba(200,200,205,0.85) !important;
    color: #fff !important;
    box-shadow: 0 0 0 1px rgba(200,200,205,0.2) !important;
    background-color: transparent !important;
    background-image: none !important;
}

.cb_template.cbEditProfile .row.cbProfileEditButtons {
    justify-content: center !important;
}
.cb_template.cbEditProfile .row.cbProfileEditButtons .offset-sm-3 {
    margin-left: 0 !important;
}
.cb_template.cbEditProfile .row.cbProfileEditButtons .col-sm-9 {
    flex: 0 0 auto !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

.cb_template.cbEditProfile .cb-edit-card:has(.cbft_providerid) {
    display: none !important;
}

@media (max-width: 575px) {
    .cb_template.cbEditProfile .cbProfileEditSubmit,
    .cb_template.cbEditProfile .cbProfileEditCancel {
        width: 100% !important;
        min-width: unset !important;
        margin-left: 0 !important;
        margin-top: 0.5rem !important;
    }
    .cb_template.cbEditProfile .row.cbProfileEditButtons .col-sm-9 {
        width: 100% !important;
        flex-direction: column !important;
    }
    .cb_template.cbEditProfile .offset-sm-3 {
        margin-left: 0 !important;
    }
}

/* Hide Joomla WebAuthn passkey row - not relevant for users */
#cbfr_jform_webauthn_webauthn {
    display: none !important;
}
