 /*!
 * Mobile Floating Menu for phpBB 3.3.x
 * @author Magnuske
 * @copyright (c) 2026 Magnuske. All rights reserved.
 * For support, contact: https://github.com/magnuske
 */

@media (max-width: 700px) {
	.mfm-floating-menu {
		position: fixed;
		left: 50%;
		bottom: calc(8px + env(safe-area-inset-bottom));
		z-index: 98;
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		font-size: 14px;
		transform: translateX(-50%);
	}

	.mfm-toggle {
		display: grid;
		place-items: center;
		width: 50px;
		height: 50px;
		padding: 0;
		border: 2px solid rgba(255, 245, 207, .50);
		border-radius: 20%;
		background: #000;
		box-shadow: 0 0 0 2px rgba(255, 245, 207, .14), 0 0 14px rgba(255, 245, 207, .68), 0 0 30px rgba(255, 245, 207, .34);
		color: #fff5cf;
		cursor: pointer;
		animation: mfm-glow 2.2s ease-in-out infinite;
		transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
	}

	.mfm-toggle:hover,
	.mfm-toggle:focus-visible {
		background: #000;
		outline: 0;
		transform: scale(1.06);
	}

	.mfm-toggle .icon {
		margin: 0;
		color: currentColor;
		font-size: 23px;
		line-height: 1;
		transition: color .2s ease, transform .3s ease;
	}

	.mfm-floating-menu.is-open .mfm-toggle {
		background: #000;
		box-shadow: 0 0 0 3px rgba(243, 187, 20, .23), 0 0 22px rgba(243, 187, 20, .9), 0 0 38px rgba(243, 187, 20, .42);
	}

	.mfm-floating-menu.is-open .mfm-toggle .icon {
		color: #f3bb14;
		transform: rotate(45deg);
	}

	.mfm-menu-panel {
		position: absolute;
		left: 50%;
		bottom: 68px;
		min-width: 220px;
		max-height: min(420px, calc(100vh - 100px));
		padding: 8px;
		border: 1px solid rgba(243, 187, 20, .70);
		border-radius: 14px;
		background: rgba(0, 0, 0, .90);
		box-shadow: 0 12px 30px rgba(0, 0, 0, .45), 0 0 20px rgba(243, 187, 20, .16);
		opacity: 0;
		pointer-events: none;
		overflow-y: auto;
		transform: translateX(-50%) translateY(14px) scale(.96);
		transform-origin: center bottom;
		transition: opacity .22s ease, transform .22s ease;
	}

	.mfm-floating-menu.is-open .mfm-menu-panel {
		opacity: 1;
		pointer-events: auto;
		transform: translateX(-50%) translateY(0) scale(1);
		transition: opacity .30s ease .25s, transform .30s cubic-bezier(.2, .8, .2, 1) .25s;
	}

	.mfm-menu-list {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.mfm-menu-list li + li {
		border-top: 1px solid rgba(243, 187, 20, .25);
	}

	.mfm-menu-link {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 12px 14px;
		border-radius: 9px;
		color: #fff5cf;
		font-weight: 600;
		text-decoration: none;
		transition: background-color .18s ease, color .18s ease;
	}

	.mfm-menu-link .icon {
		color: #f3bb14;
	}

	.mfm-menu-link:hover,
	.mfm-menu-link:focus-visible {
		background: rgba(243, 187, 20, .16);
		color: #f3bb14;
		outline: 0;
	}

	@keyframes mfm-glow {
		0%, 100% { box-shadow: 0 0 0 2px rgba(255, 245, 207, .14), 0 0 12px rgba(255, 245, 207, .56), 0 0 25px rgba(255, 245, 207, .25); }
		50% { box-shadow: 0 0 0 4px rgba(255, 245, 207, .22), 0 0 20px rgba(255, 245, 207, .88), 0 0 38px rgba(255, 245, 207, .43); }
	}

	/* Hide Duplicated Reply Buttons and Topic Tools  */
	
	.action-bar > a.button[href*="mode=reply"],
	.action-bar > .dropdown-container.topic-tools {
		display: none !important;
	}

	/* Hide Duplicated Post Buttons and Sort Tools*/
	
    .action-bar .sort-tools,
    .action-bar.bar-top > a[href*="mode=post"],
    .action-bar.bar-bottom > a[href*="mode=post"] {
	    display: none !important;
    }
    
    /* Pagination Design*/
    
    .action-bar.bar-top > .pagination,
    .action-bar.bar-bottom > .pagination {
	    border: 1px dotted #f3bb1466;

	    border-radius: 5px;
	    background: linear-gradient(
		    to bottom,
		    rgba(243, 187, 20, 0.3) 0px,
		    #000 25px
	    );
	    padding-bottom: 5px !important;
	    margin: 10px 0 0 0 !important;
    }
    .action-bar.bar-bottom > .pagination.sonharicbak {
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    padding-bottom: 0 !important;
}

}

@media (min-width: 701px) {
	.mfm-floating-menu { display: none; }
}

