/**
 * Player portal — loaded AFTER #ch-dynamic-theme in header.php.
 * Theme injects solid card / accordion backgrounds that hide body_bg; restore translucent surfaces.
 * Rules only apply inside .ch-page-theme-shell.ch-portal-page (no effect elsewhere).
 */
.ch-page-theme-shell.ch-portal-page .card.ch-card,
.ch-page-theme-shell.ch-portal-page .card {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 46%, transparent) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    backdrop-filter: blur(14px) !important;
    --bs-card-bg: transparent !important;
}

.ch-page-theme-shell.ch-portal-page .card-header,
.ch-page-theme-shell.ch-portal-page .ch-cms-card-header {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 52%, transparent) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom-color: rgba(0, 51, 102, 0.12) !important;
}

.ch-page-theme-shell.ch-portal-page .accordion-item {
    background: transparent !important;
    border-color: rgba(0, 51, 102, 0.14) !important;
}

.ch-page-theme-shell.ch-portal-page .accordion-button {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 52%, transparent) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: none !important;
    color: inherit !important;
}

.ch-page-theme-shell.ch-portal-page .accordion-button:not(.collapsed) {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 58%, transparent) !important;
    color: inherit !important;
}

.ch-page-theme-shell.ch-portal-page .accordion-button:focus {
    box-shadow: none !important;
    border-color: rgba(0, 51, 102, 0.2) !important;
}

.ch-page-theme-shell.ch-portal-page .accordion-body {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 38%, transparent) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
}

.ch-page-theme-shell.ch-portal-page .accordion-collapse {
    background: transparent !important;
}

.ch-page-theme-shell.ch-portal-page .form-control,
.ch-page-theme-shell.ch-portal-page .form-select {
    background-color: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 88%, transparent) !important;
}

/* Portal forms use native selects (not .ch-csel) so dropdowns work inside tabbed cards */
.ch-page-theme-shell.ch-portal-page select.form-select[data-ch-native-select="1"] {
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.ch-page-theme-shell.ch-portal-page .table {
    --bs-table-bg: transparent;
}

.ch-page-theme-shell.ch-portal-page .table thead,
.ch-page-theme-shell.ch-portal-page .table thead.table-light {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 35%, transparent) !important;
}

.ch-page-theme-shell.ch-portal-page .alert {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 65%, transparent) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-front-tabs .nav-tabs .nav-link {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 40%, transparent);
    border-color: rgba(0, 51, 102, 0.12);
    color: inherit;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-front-tabs .nav-tabs .nav-link:hover {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 55%, transparent);
}

.ch-page-theme-shell.ch-portal-page .ch-portal-front-tabs .nav-tabs .nav-link.active {
    background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 62%, transparent);
    border-bottom-color: transparent;
    color: inherit;
    font-weight: 600;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-front-tabs .tab-content {
    min-height: 2rem;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-player-avatar {
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--bs-secondary-bg);
}

.ch-page-theme-shell.ch-portal-page .ch-portal-player-avatar--sm {
    width: 40px;
    height: 40px;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-player-avatar--md {
    width: 96px;
    height: 96px;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-player-avatar--empty {
    display: inline-block;
    border: 1px solid var(--bs-border-color);
    opacity: 0.55;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-profile-header-photo {
    flex-shrink: 0;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-player-avatar.ch-portal-photo-preview--pending {
    outline: 2px solid var(--bs-success);
    outline-offset: 2px;
}

#chPortalPhotoCropModal {
    z-index: 200200;
}

.ch-page-theme-shell.ch-portal-page textarea.ch-portal-submission-notes::placeholder,
.ch-page-theme-shell.ch-portal-page textarea.ch-portal-submission-notes::-webkit-input-placeholder,
.ch-page-theme-shell.ch-portal-page textarea.ch-portal-submission-notes::-moz-placeholder {
    color: #9aa3ad !important;
    opacity: 1 !important;
}

.ch-page-theme-shell.ch-portal-page textarea.ch-portal-submission-notes:focus::placeholder,
.ch-page-theme-shell.ch-portal-page textarea.ch-portal-submission-notes.is-focused::placeholder,
.ch-page-theme-shell.ch-portal-page textarea.ch-portal-submission-notes:focus::-webkit-input-placeholder,
.ch-page-theme-shell.ch-portal-page textarea.ch-portal-submission-notes.is-focused::-webkit-input-placeholder {
    color: transparent !important;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-players-table tbody tr.ch-portal-row-needs-action {
    box-shadow: inset 3px 0 0 var(--bs-warning, #ffc107);
}

/* Status badges: Bootstrap defaults to bold — normal weight reads cleaner on portal */
.ch-page-theme-shell.ch-portal-page .badge {
    --bs-badge-font-weight: 400;
    font-weight: 400;
}

/* Theme overrides can force dark badge text; keep review badges readable */
.ch-page-theme-shell.ch-portal-page .badge.ch-portal-badge-profile-review,
.ch-page-theme-shell.ch-portal-page .badge.text-bg-info {
    --bs-badge-color: #fff;
    color: #fff !important;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-player-actions-inner .dropdown-menu form {
    margin: 0;
}

.ch-page-theme-shell.ch-portal-page .ch-portal-player-actions-inner .dropdown-item {
    font-size: 0.875rem;
}

/* Mobile card-style rows: ch.css used --bs-body-bg (often white); blend with theme surface */
@media (max-width: 767.98px) {
    .ch-page-theme-shell.ch-portal-page .ch-portal-players-table tbody tr {
        background: color-mix(in srgb, var(--ch-content-block-surface, #ffffff) 48%, transparent) !important;
    }
}
