/* ==UserStyle==
@name            Crunchyroll responsive + customization
@version         1.0.5
@description     Crunchyroll website is more suitable for wide screens.
@author          BreatFR (https://breat.fr)
@namespace       https://gitlab.com/breatfr
@homepageURL     https://gitlab.com/breatfr/crunchyroll
@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    "Font size"     1.2rem
@downloadURL https://update.greasyfork.org/scripts/496843/Crunchyroll%20responsive%20%2B%20customization.user.css
@updateURL https://update.greasyfork.org/scripts/496843/Crunchyroll%20responsive%20%2B%20customization.meta.css
==/UserStyle== */

/* === Credits ===
Website          https://breat.fr
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 === */

@-moz-document domain("crunchyroll.com") {
    :root {
        --fontsize: fontsize;
		--fontsize4k: calc(var(--fontsize) + .2rem);
    }
	
	[class*="hero-content-card"],
	[class*="text--is"] {
		font-size: fontsize;
		line-height: 1.5;
		--line-height: 1.5;
	}
    [class*="browse-card-hover__description"] {
        --max-lines: 19;
    }
    [class*="hero-content-card__description"] {
        -webkit-line-clamp: unset;
    }
	
	[class*="wide-cards-carousel__arrow-icon"]  {
		--arrow-size: fontsize;
	}
	
	@media (min-resolution: 1dppx) and (min-width: 3800px) {
		[class*="hero-content-card"],
		[class*="text--is"] {
			font-size: var(--fontsize4k) !important;
			line-height: 1.5;
			--line-height: 1.5;
		}
		[class*="browse-card-hover__description"] {
			--max-lines: 35;
		}
		
		[class*="wide-cards-carousel__arrow-icon"] {
			--arrow-size: calc(var(--fontsize4k) * 4) !important;
		}
	}
    
    img,
	[class*="browse-card-hover__content"] {
        border-radius: .5em !important;
    }
    
    [class*="card-watchlist-label__background"] {
        border-width: 2rem;
    }
    [class*="card-watchlist-label__icon"] {
        width: 2rem;
    }
    
    /* Footer */
    [class*="container"] {
        max-width: 100% !important;
    }
}

@-moz-document regexp("https://www\\.crunchyroll\\.com/[^/]+/videos/.*") {
    /* Genres */
    .erc-genres-header .description,
    .content-wrapper--MF5LS,
    .erc-genres-content {
        max-width: 100%;
    }

    /* Hover texts */
    .browse-card__title--YK28O {
        font-size: 16px;
    }
    .browse-card-hover__title--8m4Az,
    .browse-card-hover__description--e28NH {
        font-size: 18px;
        --max-lines: 19;
    }
}

@-moz-document regexp("https://www\\.crunchyroll\\.com/[^/]+/history") {
    /* History */
    .history-playable-card__show-title--Ufpz3{
        font-size: 1.2rem;
        line-height: 1.5;
    }
    .content-wrapper--MF5LS {
        max-width: 100%;
    }
}

@-moz-document regexp("https://www\\.crunchyroll\\.com/[^/]+/watchlist") {
    /* Watchlist */
    .content-wrapper--MF5LS {
        max-width: 100%;
    }
}

@-moz-document regexp("https://www\\.crunchyroll\\.com/[^/]+/series/.*") {
    /* Series */
    .details-section-wrapper {
        display: flex !important;
        flex-direction: column;
    }
    [class*="expandable-section__wrapper--"] {
        max-height: fit-content;
    }
    [class*="expandable-section__wrapper--is-faded--"] {
        --fade-size: 0;
        -webkit-mask-image: none;
        mask-image: none;
    }
    [data-t="expandable-btn"] {
        display: none;
    }
    
    .playable-card-hover__title--qY0dg {
        flex-wrap: wrap;
        min-height: fit-content;
        --max-lines: unset;
    }
}

@-moz-document regexp("https://www\\.crunchyroll\\.com/[^/]+/notifications") {
    /* Centre de notifications */
    .content-wrapper--MF5LS {
        max-width: 100% !important;
    }
}

@-moz-document regexp("https://www\\.crunchyroll\\.com/[^/]+/watch/.*") {
    .content-wrapper--MF5LS {
        max-width: 100% !important;
    }
    .erc-watch-episode-layout .body-wrapper {
        grid-template-columns: 1fr 367px !important;
    }
}
