/* ==========================================================================
   AI Sicum - selling ready-made summaries
   Everything is scoped under .ashbar-aisicum so it cannot leak into the old
   order form or into Elementor's own containers.
   ========================================================================== */

.ashbar-aisicum {
	margin: 1.5em 0;
}

/* The trigger reuses the site's .am_button look, so nothing is restyled here. */

.ashbar-aisicum-panel {
	margin: 1.5em 0;
	padding: 1.5em;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #f6f7f7;
	max-width: 520px;
	direction: rtl;
	text-align: right;
}

.ashbar-aisicum-btn {
	display: inline-block;
	padding: 0.75em 1.5em;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	border: none;
	border-radius: 4px;
	background-color: #2271b1;
	color: #fff;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.ashbar-aisicum-btn:hover:not(:disabled) {
	background-color: #135e96;
}

.ashbar-aisicum-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ===== Step 1: email + terms ============================================ */

.ashbar-aisicum-label {
	display: block;
	margin-bottom: 0.4em;
	font-weight: 600;
}

.ashbar-aisicum-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.6em 0.75em;
	font-size: 1em;
	line-height: 1.3;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ashbar-aisicum-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.ashbar-aisicum-input-ltr {
	direction: ltr;
	text-align: left;
}

.ashbar-aisicum-input-half {
	width: calc(50% - 0.25em);
	display: inline-block;
	box-sizing: border-box;
}

.ashbar-aisicum-help {
	margin: 0.4em 0 1em 0;
	color: #646970;
	font-size: 0.9em;
	line-height: 1.4;
}

.ashbar-aisicum-terms {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	margin: 0.5em 0 1em 0;
	cursor: pointer;
	line-height: 1.5;
}

.ashbar-aisicum-terms input[type="checkbox"] {
	width: auto;
	margin-top: 0.25em;
	flex: 0 0 auto;
}

.ashbar-aisicum-terms a {
	color: #2271b1;
	text-decoration: underline;
}

.ashbar-aisicum-next {
	width: 100%;
	margin-top: 0.5em;
}

.ashbar-aisicum-errors {
	margin: 0.5em 0 1em 0;
	padding: 0.5em 0.75em;
	color: #b32d2e;
	background: #fcf0f1;
	border-right: 3px solid #b32d2e;
	border-radius: 2px;
}

/* ===== Step 2: product + price + ID + PayPal ============================ */

.ashbar-aisicum-product {
	margin-bottom: 0.75em;
	padding: 0.75em 1em;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	line-height: 1.45;
}

.ashbar-aisicum-product-label {
	font-weight: 600;
	margin-left: 0.35em;
}

.ashbar-aisicum-price {
	margin-bottom: 1em;
	padding: 0.75em 1em;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em;
}

.ashbar-aisicum-price-label {
	font-weight: 600;
}

.ashbar-aisicum-price-value {
	font-size: 1.05em;
	font-weight: 700;
	color: #00733b;
}

.ashbar-aisicum-id-wrap {
	margin: 0 0 1em 0;
}

.ashbar-aisicum-user-id {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.6em 0.75em;
	font-size: 1em;
	line-height: 1.3;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	text-align: center;
	direction: ltr;
}

.ashbar-aisicum-user-id:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.ashbar-aisicum-user-id-error {
	display: block;
	margin-top: 0.3em;
	color: #b32d2e;
	font-size: 0.9em;
	min-height: 1.2em;
}

.ashbar-aisicum-paypal-wrap {
	margin-top: 1em;
	min-height: 50px;
}

.ashbar-aisicum-paypal-container {
	min-height: 50px;
	pointer-events: none;
	opacity: 0.4;
	transition: opacity 0.15s ease;
}

/* ===== Honeypot credit card form ======================================== */

.ashbar-aisicum-fake-cc form p {
	margin: 0 0 0.75em 0;
}

.ashbar-aisicum-fake-cc input + input {
	margin-right: 0.5em;
}

.ashbar-aisicum-fake-error {
	margin: 0.75em 0;
	padding: 0.6em 0.85em;
	color: #b32d2e;
	background: #fcf0f1;
	border-right: 3px solid #b32d2e;
	border-radius: 2px;
}

.ashbar-aisicum-fake-submit {
	width: 100%;
}

/* ===== Success: the summary itself ===================================== */

/* The purchased summary is long-form content, so the success block breaks out
   of the narrow form width and uses the full column instead. */
.ashbar-aisicum-success {
	max-width: none;
}

.ashbar-aisicum-success-inner {
	padding: 1.25em 1.5em;
	background: #fff;
	border: 1px solid #c3e6c5;
	border-right: 4px solid #00a32a;
	border-radius: 4px;
}

.ashbar-aisicum-success-thanks {
	padding: 0.75em 1em;
	margin-bottom: 1.5em;
	background: #edfaef;
	border-radius: 4px;
	line-height: 1.6;
}

.ashbar-aisicum-success-thanks p:first-child { margin-top: 0; }
.ashbar-aisicum-success-thanks p:last-child { margin-bottom: 0; }

.ashbar-aisicum-summary {
	line-height: 1.8;
}

.ashbar-aisicum-summary-title {
	margin-top: 0;
}

.ashbar-aisicum-summary-source-heading {
	margin-top: 1.5em;
}

/* Bibliographic entry direction.

   The real fix is inline (dir + style on a wrapper, added in summary.php), so
   that the email body renders correctly too - email clients never see this
   file. These rules exist only to win against theme selectors on the page: an
   inline text-align on the wrapper is inherited by the inner <p>, but a theme
   rule like `.entry-content p { text-align: right }` targets that <p> directly
   and would otherwise beat the inheritance. */
.ashbar-aisicum-summary-source [dir="ltr"],
.ashbar-aisicum-summary-source [dir="ltr"] p,
.ashbar-aisicum-summary-source [dir="ltr"] span {
	direction: ltr;
	text-align: left;
}

/* When the panel holds the finished summary it is no longer a form: drop the
   form chrome so the text reads as page content. The class is added by the JS
   (rather than using :has()) so older browsers behave the same. */
.ashbar-aisicum-panel.ashbar-aisicum-panel-done {
	max-width: none;
	background: transparent;
	border: none;
	padding: 0;
}

/* ===== Fullscreen processing overlay ===================================
   Toggled by a class on <body>, never on the overlay itself, so no theme or
   Elementor stacking context can trap it. See PROCESSING_OVERLAY_GUIDE.md.
   ======================================================================== */

.ashbar-aisicum-processing-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483600;
	background: rgba(20, 24, 35, 0.78);
	align-items: center;
	justify-content: center;
}

body.ashbar-aisicum-processing .ashbar-aisicum-processing-overlay {
	display: flex;
}

body.ashbar-aisicum-processing {
	overflow: hidden;
}

.ashbar-aisicum-processing-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1em;
	padding: 2em 2.5em;
	min-width: 240px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
	color: #1d2327;
	direction: rtl;
	text-align: center;
}

.ashbar-aisicum-processing-circle {
	width: 48px;
	height: 48px;
	border: 4px solid #dcdcde;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: ashbar-aisicum-spin 0.8s linear infinite;
}

.ashbar-aisicum-processing-text {
	margin: 0;
	font-size: 1.05em;
	font-weight: 600;
}

@keyframes ashbar-aisicum-spin {
	to { transform: rotate(360deg); }
}
