/*
 * File: /webroot/css/helpers/dialog.css
 * Created: Tuesday, 13th May 2025 11:44:26 am
 * Author: Giordano LN
 * 
 * Copyright (c) 2025 dudow.com.br.cake3
 */


/******************************************************************************/
/* Dialog *********************************************************************/

.dialog-wrapper {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 120;
}

.dialog-wrapper.active {
	display: flex;
	align-items: center;
	justify-content: center;
}

.dialog-wrapper .dialog-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba( 0, 0, 0, 0.9 );
}

.dialog-wrapper .dialog-container {
	background: #FFF;
	border-radius: 0.75rem;
	max-height: 98%;
	position: relative;
	max-width: 800px;
	display: flex;
}

.dialog-wrapper .dialog-container:before {
	content: '';
	display: block;
	height: calc( 100% - 4rem );
	width: 95%;
	background: rgba( 255, 255, 255, 0.125 );
	border-radius: 0.75rem;
	position: absolute;
	top: 2rem;
	left: 3.5rem;
	transform: rotate( 3deg );
}

.dialog-wrapper .dialog-link-close {
	background: rgba( 255, 255, 255, 0.85 );
	border-radius: 50%;
	padding: 0.375rem 0.5rem 0.5rem;
	margin: -0.65rem -1.35rem 0 0.5rem;
	position: absolute;
	text-align: center;
	right: 2.125rem;
	height: 2rem;
	width: 2rem;
	top: 1.5rem;
	z-index: 2;
}

.dialog-wrapper .dialog-link-close svg path {
	stroke: var( --color-gray3 );
}

.dialog-wrapper .dialog-link-close:hover {
	background: rgba( var( --color-gray6-rgb ), 0.5 );
}

.dialog-wrapper .dialog-link-close:hover svg path {
	stroke: #000;
}

.dialog-wrapper .dialog-content {
	min-width: 10rem;
	max-height: 100%;
	overflow-y: auto;
	padding: 1.5rem 1.75rem;
	z-index: 1;
}

/* Firefox */
@-moz-document url-prefix()
{
	.dialog-wrapper .dialog-content {
		scrollbar-width: thin;
		scrollbar-color: rgba(0, 0, 0, 0.5) transparent;
	}
}

/* Legacy browsers with `::-webkit-scrollbar-*` support */
@supports selector( ::-webkit-scrollbar )
{
	.dialog-wrapper .dialog-content {
		scrollbar-width: unset;
	}

	.dialog-wrapper .dialog-content::-webkit-scrollbar {
		width: 0.5rem;
	}
	
	.dialog-wrapper .dialog-content::-webkit-scrollbar-track {
		background: transparent;
		border-radius: 10px;
		margin-top: 0.5rem;
		margin-bottom: 0.5rem;
	}
	
	.dialog-wrapper .dialog-content::-webkit-scrollbar-thumb {
		background: rgba(0, 0, 0, 0.25);
		border-radius: 0.75rem;
		border: 2px solid transparent;
		border-radius: 10px;
		background-clip: padding-box;
	}

	.dialog-wrapper .dialog-content::-webkit-scrollbar-thumb:hover {
		background: rgba(0, 0, 0, 0.5);
	}
}

.dialog-wrapper .dialog-content .dialog-footer {
	margin-top: 1.5rem;
	text-align: center;
}

.dialog-wrapper .dialog-content .dialog-footer .button {
	background: rgba( var( --color-brand1-rgb ), 0.8 );
	border-radius: 0.5rem;
	margin: 0 0.75rem;
	text-transform: none;
	width: 45%;
}

.dialog-wrapper .dialog-content .dialog-footer .button:hover {
	background: var( --color-brand1 );
}

.dialog-wrapper .dialog-content .dialog-footer .link {
	background: #FFF;
	border: 0.1rem solid rgba( var( --color-brand1-rgb ), 0.8 );
	border-radius: 0.5rem;
	color: rgba( var( --color-brand1-rgb ), 0.8 );
}

.dialog-wrapper .dialog-content .dialog-footer .link:hover {
	background: #FFF;
	border-color: var( --color-brand1 );
	color: var( --color-brand1 );
}

.dialog-wrapper .dialog-content .dialog-footer .dialog-link-close {
	border-radius: 0.5rem;
	height: auto;
	margin: 0 0.75rem;
	position: static;
}

.dialog-wrapper .dialog-content .dialog-link-back {
	float: left;
	margin-left: -0.5rem;
}

.dialog-wrapper .dialog-content .dialog-link-back .taskbar-icon {
	fill: var( --color-gray3 );
}

.dialog-wrapper .dialog-content .dialog-link-back:hover .taskbar-icon {
	fill: var( --color-gray1 );
}

.dialog-wrapper .dialog-content h1 {
	font-size: 1rem;
	border-bottom: 0.1rem solid var( --color-gray6 );
	margin: 0 -0.5rem 1rem;
	padding: 0 2rem 0.75rem;
}

.dialog-wrapper .dialog-content h1 .dialog-link-back {
	margin-right: 1rem;
	margin-left: -1.5rem;
}

@media ( max-width: 1000px )
{
	.dialog-wrapper .dialog-container:before {
		display: none;
	}
}

@media ( max-width: 600px )
{
	.dialog-wrapper .dialog-container {
		border-radius: 0;
		height: 100%;
		max-height: 100%;
		max-width: 100%;
		width: 100%;
	}

	.dialog-wrapper .dialog-content {
		padding: 1.5rem 1.25rem 1.5rem 1rem;
		width: 100%;
	}

	.dialog-wrapper .dialog-content h1 {
		padding: 0 0.75rem 0.75rem 0.5rem;
		position: relative;
	}

	.dialog-wrapper .dialog-content h1:has( .paging ) {
		padding-bottom: 3rem;
	}

	.dialog-wrapper .dialog-content h1 .paging {
		bottom: 0;
		left: 0;
		padding-bottom: 0.5rem;
		position: absolute;
		right: 0;
		text-align: center;
	}

	.dialog-wrapper .dialog-content h1 .paging ul {
		padding-left: 0;
	}

	.dialog-wrapper .dialog-content .dialog-footer .button {
		width: 100%;
		margin: 0;
	}

	.dialog-wrapper .dialog-content .dialog-footer .button:first-child {
		margin-bottom: 0.5rem;
	}

	.dialog-wrapper .dialog-content .dialog-footer {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 0 1rem 1rem;
	}
}

@media ( max-width: 600px )
{
	.dialog-wrapper .dialog-content h1 {
		padding-right: 1.5rem;
	}

	.dialog-wrapper .dialog-content h1 .dialog-link-back {
		margin-left: 0;
		margin-bottom: 0.5rem;
	}
}

/* Paginator *******************************************************************/

.dialog-wrapper .dialog-paginator {
	float: right;
	clear: none;
	margin-top: -0.35rem;
}

.dialog-wrapper .dialog-paginator::after {
	content: '';
	display: block;
	clear: both;
}

.dialog-wrapper .dialog-paginator ul {
	margin: 0;
	padding-bottom: 0.5rem;
	padding-right: 0.25rem;
}

.dialog-wrapper .dialog-paginator ul li {
	background: none;
	border: none;
	margin-right: 1.5rem;
	padding: 0;
	position: relative;
}

.dialog-wrapper .dialog-paginator ul li::after {
	background: var( --color-gray6 );
	content: '';
	display: block;
	height: 0.125rem;
	margin-right: -1.25rem;
	position: absolute;
	right: 0;
	top: 50%;
	margin-top: -0.025rem;
	width: 1rem;
}

.dialog-wrapper .dialog-paginator ul li:last-child {
	margin-right: 0;
}

.dialog-wrapper .dialog-paginator ul li:last-child::after {
	display: none;
}

.dialog-wrapper .dialog-paginator ul li.active {
	background: none;
}

.dialog-wrapper .dialog-paginator ul li:hover {
	background: none;
}

.dialog-wrapper .dialog-paginator ul li a {
	background: var( --color-gray5 );
	border-radius: 50%;
	border: 0.1rem solid transparent;
	color: var( --color-gray3 );
	font-size: 0.875rem;
	height: 1.5rem;
	line-height: 1;
	padding: 0.25rem;
	text-align: center;
	width: 1.5rem;
}

.dialog-wrapper .dialog-paginator ul li.active a {
	background: var( --color-brand3 );
	color: #FFF;
	pointer-events: none;
}

.dialog-wrapper .dialog-paginator ul li a:hover {
	border-color: var( --color-gray4 );
	color: var( --color-gray1 );
}

.dialog-wrapper .dialog-paginator ul li.active a:hover {
	background: var( --color-brand3 );
}

/* Message *********************************************************************/

.dialog-content > .message {
	margin: 0 1rem 1.5rem;
}