/* Agora_Feature */
#af_head_mic {
	cursor: pointer;
}

#af_overlay_backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 9996;
	display: none;
}

#af_overlay_backdrop.af_open {
	display: block;
}

#af_hub_modal {
	position: fixed;
	inset: 0;
	z-index: 9997;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	pointer-events: none;
}

#af_hub_modal.af_open {
	display: flex;
}

/* CodyChat-style light modal (matches Lite / typical white modal chrome) */
.af_hub_inner {
	pointer-events: auto;
	background: #fff;
	color: #222;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 20px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	width: 100%;
	max-width: 440px;
	max-height: min(85vh, 580px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.af_hub_head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px 14px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	position: relative;
}

.af_hub_title {
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
	color: #1a1a1a;
	letter-spacing: -0.02em;
}

/* Icon-only close like core .modal_close — no full-width default_btn */
#af_hub_close.af_hub_close {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: #777;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s;
}

#af_hub_close.af_hub_close:hover {
	background: rgba(0, 0, 0, 0.06);
	color: #222;
}

#af_hub_close.af_hub_close .fa {
	pointer-events: none;
}

.af_hub_body {
	padding: 16px 20px 20px;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}

#af_hub_modal .label {
	display: block;
	margin: 0 0 8px 0;
	font-size: 12px;
	font-weight: 600;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.af_hub_section {
	margin-bottom: 20px;
}

.af_hub_section:last-child {
	margin-bottom: 0;
}

.af_hub_list {
	min-height: 1.5em;
}

.af_hub_row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.af_hub_row:last-child {
	border-bottom: none;
}

.af_hub_host {
	flex: 1 1 45%;
	min-width: 0;
	font-weight: 600;
	font-size: 14px;
	color: #222;
}

.af_hub_meta {
	flex: 1 1 100%;
	font-size: 12px;
	line-height: 1.4;
	color: #666;
}

.af_hub_row .af_hub_join {
	flex-shrink: 0;
	margin-left: auto;
}

.af_hub_empty {
	margin: 6px 0;
	font-size: 13px;
	color: #888;
}

/* Start public + private: one row, shared width (narrower than full stack) */
#af_hub_modal .af_btn_row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 10px;
}

#af_hub_modal .af_btn_row .reg_button {
	flex: 1 1 0;
	min-width: 0;
	width: auto;
	max-width: none;
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	line-height: 1.25;
	border-radius: 10px;
}

#af_hub_modal .af_btn_row #af_btn_private.default_btn {
	background: #f4f4f4;
	color: #333;
	border: 1px solid #ddd;
}

#af_hub_modal .af_btn_row #af_btn_private.default_btn:hover {
	background: #eaeaea;
}

@media (max-width: 360px) {
	#af_hub_modal .af_btn_row {
		flex-wrap: wrap;
	}

	#af_hub_modal .af_btn_row .reg_button {
		flex: 1 1 calc(50% - 5px);
		min-width: 120px;
	}
}

#af_meet_wrap {
	position: fixed;
	width: calc(100vw - 0px);
	max-width: 100vw;
	height: auto;
	max-height: 60vh;
	z-index: 9998;
	border-radius: 0 0 12px 12px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
	display: none;
	border-bottom: 2px solid rgba(108, 17, 222, 0.6);
	border-left: 1px solid rgba(255, 255, 255, 0.1);
	border-right: 1px solid rgba(255, 255, 255, 0.1);
	background: #111;
}

#af_meet_wrap.af_visible {
	display: block;
}

#af_meet_inner {
	width: 100%;
	height: 0; /* hidden by default (audio only) */
	overflow: hidden;
	background: #0a0a1a;
	transition: height 0.2s;
}
/* Show inner only when video is active */
#af_meet_wrap.af_has_video #af_meet_inner {
	height: 200px;
}

#af_meet_bar {
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 10px;
	background: rgba(0, 0, 0, 0.75);
	gap: 6px;
	flex-wrap: nowrap;
}

.af_meet_bar_actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex-shrink: 0;
}

/* Meet bar: icon buttons (theme leave = cyan, default end = dark, max = subtle on bar) */
.af_meet_icon_btn {
	width: 38px;
	height: 38px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	line-height: 1;
	flex-shrink: 0;
	box-sizing: border-box;
	transition: opacity 0.15s, filter 0.15s;
}

.af_meet_icon_btn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.6);
	outline-offset: 2px;
}

.af_meet_icon_btn:hover {
	opacity: 0.92;
	filter: brightness(1.05);
}

.af_meet_btn_max {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.af_meet_btn_min {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

#af_meet_wrap.af_meet_minimized {
	display: none !important;
}

/* Footer restore chip: left of #rlist_open when inserted in #my_menu */
#af_meet_floater.af_meet_floater {
	display: none !important;
	cursor: pointer;
	box-sizing: border-box;
}

#af_meet_floater.af_meet_floater.af_show:not(.af_meet_floater_fixed) {
	display: table-cell !important;
}

#af_meet_floater.af_meet_floater.af_show.af_meet_floater_fixed {
	display: flex !important;
	align-items: center;
	justify-content: center;
	position: fixed;
	right: 48px;
	bottom: env(safe-area-inset-bottom, 0);
	width: 40px;
	height: 50px;
	z-index: 9995;
	background: #222;
	color: #fff;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.35);
}

#af_meet_floater .af_meet_floater_icon {
	color: #6cf;
	font-size: 18px;
}

#af_meet_floater:hover .af_meet_floater_icon {
	filter: brightness(1.1);
}

.af_meet_btn_leave {
	background: #03add8;
	color: #fff;
}

.af_meet_btn_end {
	background: #444;
	color: #fff;
}

#af_meet_wrap:fullscreen,
#af_meet_wrap:-webkit-full-screen {
	width: 100vw !important;
	height: 100vh !important;
	max-width: 100% !important;
	max-height: 100% !important;
	border-radius: 0;
	left: 0 !important;
	top: 0 !important;
	right: auto !important;
	bottom: auto !important;
}

#af_meet_wrap:fullscreen #af_meet_inner,
#af_meet_wrap:-webkit-full-screen #af_meet_inner {
	height: calc(100vh - 40px);
	max-height: calc(100% - 40px);
}

#af_meet_bar.af_meet_drag_handle {
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	-webkit-touch-callout: none;
}

#af_meet_bar.af_meet_drag_handle:active {
	cursor: grabbing;
}

#af_modal_priv {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0, 0, 0, 0.45);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#af_modal_priv.af_open {
	display: flex;
}

.af_modal_box {
	background: #fff;
	color: #222;
	border-radius: 20px;
	padding: 20px;
	width: 360px;
	max-width: 100%;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

#af_modal_priv .label {
	color: #555;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.af_inv_search_wrap {
	position: relative;
	margin-top: 8px;
}

.af_inv_search_row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.af_inv_search_row .full_input {
	flex: 1;
	min-width: 0;
}

.af_inv_add_btn {
	flex-shrink: 0;
	width: 42px;
	min-height: 42px;
	padding: 0;
	margin: 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	background: #f5f5f5;
	color: #333;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.af_inv_add_btn:hover {
	background: #ebebeb;
}

.af_invitee_suggest {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	margin-top: 4px;
	max-height: 220px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	z-index: 10001;
}

.af_inv_suggest_item {
	display: block;
	width: 100%;
	text-align: left;
	padding: 10px 12px;
	margin: 0;
	border: none;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	background: #fff;
	color: #222;
	font-size: 14px;
	cursor: pointer;
	line-height: 1.3;
}

.af_inv_suggest_item:last-child {
	border-bottom: none;
}

.af_inv_suggest_item:hover {
	background: rgba(100, 160, 255, 0.1);
}

.af_invitee_list {
	margin-top: 12px;
	max-height: 180px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.af_invitee_chip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.af_invitee_name {
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.af_invitee_rm {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	background: #fff;
	color: #c62828;
	cursor: pointer;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.af_invitee_rm:hover {
	background: rgba(198, 40, 40, 0.08);
}

/* Public meeting announcement in main chat (user post) */
#show_chat .af_public_meet_card {
	font-weight: 700;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(100, 160, 255, 0.12);
	border: 1px solid rgba(100, 160, 255, 0.35);
	line-height: 1.35;
}

#show_chat .af_public_meet_card strong {
	font-weight: 700;
}

#show_chat .af_public_meet_cta,
#show_chat .af_public_meet_card .af_public_join.af_public_meet_cta {
	color: #e53935;
	font-weight: 700;
	cursor: pointer;
}

/* Userlist mic: same table row as .user_item_icon.icrank — must be table-cell, not flex */
#container_user .user_item .af_mic_wrap {
	display: table-cell;
	vertical-align: middle;
	width: 24px;
	min-width: 24px;
	max-width: 24px;
	text-align: center;
	font-size: 15px;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

#container_user .user_item .af_mic_wrap .af_feature_mic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	line-height: 1;
	vertical-align: middle;
	color: #6cf;
	font-size: 15px;
}

.af_feature_mic .fa-microphone {
	pointer-events: none;
}

/* Agora video */
#af_meet_inner { display:flex; flex-direction:column; height:calc(100% - 44px); overflow:hidden; }
#af_local_video { width:120px; height:90px; position:absolute; bottom:8px; right:8px; z-index:2; border-radius:8px; overflow:hidden; background:#000; }
#af_streams { flex:1; display:flex; flex-wrap:wrap; gap:4px; padding:4px; overflow-y:auto; background:#1a1a2e; }
.af_video_tile { flex:1 1 calc(50% - 4px); min-width:120px; min-height:90px; background:#111; border-radius:8px; overflow:hidden; }
.af_feature_mic { color:var(--theme_color,#6c11de); }
#af_btn_mic, #af_btn_cam { background:rgba(255,255,255,.1); color:#fff; }
#af_btn_mic.af_muted { background:#e74c3c; }

/* ── Participants Panel ──────────────────────────────────────── */
#af_participants_panel {
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 6px 12px;
    max-height: 140px;
    overflow-y: auto;
    width: 100%;
}
.af_part_row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.af_part_row:last-child { border-bottom: none; }
.af_part_av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.af_part_name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.af_part_you {
    font-size: 10px;
    color: #6c11de;
    font-weight: 400;
}
.af_part_empty {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    text-align: center;
    padding: 8px 0;
    margin: 0;
}

/* ── Active button state ─────────────────────────────────────── */
.af_btn_active {
    color: #6c11de !important;
}

/* ── Announce button highlight ───────────────────────────────── */
#af_btn_announce { color: #f39c12; }
#af_btn_announce:hover { background: rgba(243,156,18,.2); }

/* ── Participants: no avatar, name + mute ──────────────────── */
.af_part_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 4px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.af_part_row:last-child { border-bottom: none; }

/* Remove old avatar style */
.af_part_av { display: none !important; }

.af_part_name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.af_part_you {
    font-size: 10px;
    color: #6c11de;
    font-weight: 400;
}
.af_part_mute_btn {
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}
.af_part_mute_btn:hover { background: rgba(255,255,255,.2); }
.af_part_mic_on  { color: #6c11de; font-size: 12px; }
.af_part_mic_off { color: #e74c3c; font-size: 12px; }

/* ── Flip camera button ──────────────────────────────────────── */
#af_btn_flip {
    color: #4fc3f7;
    transition: transform .3s;
}
#af_btn_flip:hover { background: rgba(79,195,247,.15); }

/* ── Maximize / CSS fullscreen fallback ─────────────────────── */
#af_btn_max { color: #4fc3f7; }
#af_btn_max:hover { background: rgba(79,195,247,.15); }

/* CSS fullscreen fallback (for browsers that block requestFullscreen) */
#af_meet_wrap.af_css_fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    z-index: 99999 !important;
}
#af_meet_wrap.af_css_fullscreen #af_meet_inner {
    height: calc(100vh - 48px) !important;
}

/* Native fullscreen styles */
#af_meet_wrap:fullscreen,
#af_meet_wrap:-webkit-full-screen,
#af_meet_wrap:-moz-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
}
#af_meet_wrap:fullscreen #af_meet_inner,
#af_meet_wrap:-webkit-full-screen #af_meet_inner,
#af_meet_wrap:-moz-full-screen #af_meet_inner {
    height: calc(100vh - 48px) !important;
}

/* ── Staff row ───────────────────────────────────────────────── */
#af_bar_staff_row {
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}
