/* ==UserStyle==
@name           brave Search optimized & customizable for wide screens
@description    Brave Search website interface is reworked to offer a cleaner and comfortable experience on desktop, with visual adjustments that adapt to your needs.
@version        1.0.1
@author         BreatFR (https://breat.fr)
@namespace      https://breat.fr
@homepageURL    https://usercssjs.breat.fr/b/brave-search
@updateURL      https://code.breat.fr/b/brave-search/css/pc.user.css
@supportURL     https://discord.gg/Q8KSHzdBxs
@license        AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
@preprocessor   stylus

@var    text        fontsize    		"Custom font size"      1rem
@var	checkbox	hidefaq				"Hide FAQ"				0
@var	checkbox	hiderelatedqueries	"Hide related queries"	0
@var	checkbox	hidesearchelsewhere	"Hide search elsewhere"	0
@var	checkbox	hidescrollbars		"Hide scrollbars"		1
@var	checkbox	hidevideos			"Hide videos"			0
@var    checkbox    widemode    		"Wide mode"         	1
==/UserStyle== */

/* ==Credits==
Website         https://breat.fr
Bluesky			https://bsky.app/profile/breatfroff.bsky.social
facebook        https://www.facebook.com/breatfroff
mastodon        https://mastodon.social/@breat_fr
telegram        https://t.me/breatfr
vk              https://vk.com/breatfroff
X (twitter)     https://x.com/breatfroff
==/Credits== */

/* ==Support==
brave Creators  https://publishers.basicattentiontoken.org/c/breatfr
ko-fi           https://ko-fi.com/breatfr
PayPal          https://paypal.me/breat
==/Support== */

@-moz-document domain("search.brave.com") {
/* ========================================
	brave Search
======================================== */
    /* Versions */
    :root {
        --themeversion: 'Theme v1.0.1 by BreatFR (https://breat.fr)';
        --install: ' usercssjs.breat.fr/b/brave-search';
		--help: ' discord.gg/Q8KSHzdBxs';
        --support1: ' ko-fi.com/breatfr ';
        --support2: ' paypal.me/breat';
        --fontsize: fontsize;
    }

    @media screen and (min-width: 900px) {
		#site-header::after,
		#site-header::before {
			background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
            background-clip: text;
            color: transparent;
			display: block;
            font-family: inherit;
            font-size: inherit;
			line-height: calc(52px / 2);
            pointer-events: none;
            position: absolute;
            text-align: center;
			top: 1.2rem;
			transition: left .3s ease-in-out, right .3s ease-in-out;
            width: auto;
            white-space: pre-line;
            z-index: 9999;
		}
        #site-header::after {
            content: var(--themeversion) '\A Help: ' url("https://code.breat.fr/share/images/icons/discord.png") var(--help);
			left: 48%;
        }
		#site-header::before {
            content: 'Install & Infos: ' url("https://code.breat.fr/share/images/icons/breat.fr.png") var(--install) '\A Support me: ' url("https://code.breat.fr/share/images/icons/ko-fi.png") var(--support1) ' · ' url("https://code.breat.fr/share/images/icons/paypal.png") var(--support2);
            right: 10%;
        }
    }

    /* Font size */
    input
    .desktop-default-regular,
    .tab-item span {
        font-size: fontsize !important;
        line-height: 1.5 !important;
    }
    .sitename,
    .heading-serpresult {
        font-size: calc(var(--fontsize) + .1rem) !important;
        line-height: 1.5 !important;
    }
    cite,
    .action-container button,
    .desktop-small-regular {
        font-size: calc(var(--fontsize) - .1rem) !important;
        line-height: 1.5 !important;
    }

    .download-cta {
        display: none !important;
    }

	if hiderelatedqueries {
		#related-queries {
			display: none;
		}
	}

	if hidesearchelsewhere {
		#search-elsewhere {
			display: none;
		}
	}

	if hidefaq {
		#faq {
			display: none;
		}
	}

	if hidevideos {
		div:has(> .video-cluster-grid) {
			display: none;
		}
	}

    if hidescrollbars {
        *,
        :root ::-webkit-scrollbar {
            scrollbar-width: none !important;
            -ms-overflow-style: none !important;
            -moz-overflow-style: none !important;
            -webkit-overflow-style: none !important;
        }
        ::-webkit-scrollbar {
            display: none;
            width: 0;
        }
    }

    if widemode {
		body {
			box-sizing: border-box;
			overflow-x: hidden;
		}

        #site-header > div > div:nth-of-type(1) > div,
        #nav-tabs > div > nav,
        #search-page > div:nth-of-type(2),
        #search-page > div:nth-of-type(2) > div,
        #search-page > div:nth-of-type(2) > div > main,
        #search-page > div:nth-of-type(2) > div > main > div:nth-of-type(1) {
            max-width: 100% !important;
			min-width: 0!important;
            width: 100% !important;
        }

        #nav-tabs,
        #search-page > div:nth-of-type(2) {
            padding-left: 0 !important;
			padding-right: 0 !important;
        }

        #site-header > div > div:nth-of-type(1) > div {
            padding-right: 52px;
        }

        #nav-tabs > div > nav {
            padding-right: 1.2rem;
        }

		.attribution {
			align-items: center;
		}

		.infobox-profiles-body {
			gap: 1em !important;
			justify-content: space-evenly;
		}
		.infobox-profiles-body a,
		.infobox-profiles-body a img {
			height: auto !important;
			width: 32px !important;
		}

		/* Footer */
		footer > div,
		footer > div > div,
		footer main {
			max-width: 100% !important;
			padding-left: 0 !important;
			padding-right: 0 !important;
			width: 100% !important;
		}
		footer main > div {
			justify-content: space-evenly !important;
		}
		footer:has(.copyright) {
			padding: .4rem 1em;
		}
		.copyright {
			white-space: nowrap;
		}
    }
}
