/* Fullscreen semi-transparent overlay */
.abr-modal {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 9999;
	display: none;
	background: rgba(0,0,0,0.4);
	display: flex;
	align-items: flex-start;       /* align modal dialog near top */
	justify-content: center;       /* center horizontally */
	overflow-y: auto;
	padding-top: 32px;             /* offset from top for visibility */
	box-sizing: border-box;
}

/* Extra top padding for WordPress admin bar */
body.admin-bar .abr-modal {
	padding-top: 64px;
}

/* Force modal visible when aria-hidden false */
.abr-modal[aria-hidden="false"] {
	display: flex !important;
}

/* Modal dialog box container */
.abr-modal-dialog {
	position: absolute;
	margin: 0;                    /* Remove margins for free dragging */
	z-index: 10000;
	border-radius: 0;
	box-shadow: 0 15px 40px 6px rgba(0,0,0,0.2);
	padding: 2em;
	outline: none;
	background: #ffffff;
	border-radius: 10px;
	/* min-width added inline by PHP where needed */
}

/* Cursor on the <h3> shows it can be used to drag modal */
.abr-modal-dialog h3 {
	cursor: move;
	user-select: none;            /* prevent text selection during drag */
}

.abr-modal h3 {
	border-bottom: 1px solid #ccc;
	margin: 0 0 25px;
}

/* Close button style */
.abr-modal-close {
	position: absolute;
	top: 12px;
	right: 18px;
	background: none;
	border: none;
	font-size: 2em;
	line-height: 1em;
	cursor: pointer;
	color: #888;
}

/* Modal trigger styling */
span.abr-modal-trigger {
	display: block;      /* Allows centering inside it */
	text-align: center;  /* Centers the inline elements inside */
	width: fit-content;        /* Spans the full width by default */
	cursor: pointer;
}

span.abr-modal-trigger[style*="float: right"],
span.abr-modal-trigger.float-right, /* Example class name if you use one */
span.abr-modal-trigger[class*="right"] { 
	display: inline-block; /* Essential so float works without stretching 100% */
	width: auto;           /* Shrinks the span to just the button's size */
	text-align: inherit;   /* Drops the forced center layout */
}

.abr-modal-trigger-fullwidth {
	width: 100%;
}

.abr-content hr {
	margin: 0;
}

.abr_float_right {
	float:right !important;
}

.abr_float_left {
	float:left !important;
}

@media only screen and (max-width: 769px) {
	/* Mobile-specific styling */
	.abr-modal-dialog {
		width: 90% !important;
	}
	.abr-modal-trigger {
		width: 100%;
		/*margin-bottom: 10px;*/
	}
	.abr-modal a.su-button {
		display: block !important;
	}
	.abr-modal-trigger a.su-button {
		display: block !important;
	}
	.abr_float_right{
		float:unset !important; /*Remove float right for mobile*/
	}
	.abr_float_left {
		float:unset !important; /*Remove float right for mobile*/
	}
	span.abr-modal-trigger[style*="float:right"], span.abr-modal-trigger.float-right, span.abr-modal-trigger[class*="right"] {
		width:100%;
	}
}
