/*
 * Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
 * wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
 */

/**
 * Print styles
 */

%tabs-print-display-none-important {
	display: none !important;
}

%carousel-print-panel {
	[role="tabpanel"] {
		margin-bottom: .5em;
	}

	figure {
		page-break-inside: avoid;
	}

	figcaption {
		border: 1px solid #000;
	}
}

.wb-tabs {
	&.carousel-s1 {
		@extend %carousel-print-panel;
	}

	&.carousel-s2 {
		@extend %carousel-print-panel;
	}

	[role="tablist"] {
		@extend %tabs-print-display-none-important;
	}

	[role="tabpanel"] {
		display: block !important;
		opacity: 1 !important;
		overflow: visible !important;
		position: static !important;
		transform: none;
		visibility: visible !important;

		figcaption {
			position: static;
		}

		summary {
			display: list-item !important;
		}

		&.noheight {
			max-height: none;
		}
	}

	& > .tabpanels {
		overflow: visible !important;
	}

	&.print-active {
		> {
			.tabpanels {
				> {
					div {
						&.out {
							@extend %tabs-print-display-none-important;
						}
					}

					details {
						&.out {
							.tgl-panel {
								@extend %tabs-print-display-none-important;
							}
						}

						> {
							summary {
								&[aria-expanded="false"] {
									+ {
										.tgl-panel {
											@extend %tabs-print-display-none-important;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
