/* ============================================================
   Install as App — Frontend Styles
   Built by Zemen Digital (https://zemendigital.com)
   ============================================================ */

/* ---------------------------------------------------------------
   Banner root container
--------------------------------------------------------------- */
#iaa-banner-root {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 2147483640;
	isolation: isolate;
}

/* On wider screens, pin to a centred column */
@media (min-width: 640px) {
	#iaa-banner-root {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
		width: 460px;
	}
}

/* ---------------------------------------------------------------
   Main install banner
--------------------------------------------------------------- */
#iaa-banner {
	/* CSS custom properties set from JS */
	background-color: var(--iaa-bg,  #1a6b2a);
	color:            var(--iaa-fg,  #ffffff);

	border-radius: 20px 20px 0 0;
	box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.22);
	padding: 18px 16px 20px;

	/* slide-up animation */
	transform: translateY(110%);
	transition: transform 0.35s cubic-bezier(0.34, 1.20, 0.64, 1);
	will-change: transform;
}

#iaa-banner.iaa-banner-in {
	transform: translateY(0);
}

.iaa-banner-inner {
	max-width: 540px;
	margin: 0 auto;
}

/* ---------------------------------------------------------------
   Banner header row
--------------------------------------------------------------- */
.iaa-banner-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 14px;
}

.iaa-banner-text {
	flex: 1;
}

.iaa-banner-title {
	display: block;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 4px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.iaa-banner-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.9;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------------------------------------------------------------
   Close button
--------------------------------------------------------------- */
.iaa-close-btn {
	flex-shrink: 0;
	background: none;
	border: none;
	padding: 2px;
	cursor: pointer;
	color: var(--iaa-fg, #ffffff);
	opacity: 0.75;
	line-height: 1;
	transition: opacity 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.iaa-close-btn:hover,
.iaa-close-btn:focus {
	opacity: 1;
	outline: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 4px;
}

/* ---------------------------------------------------------------
   Install button
--------------------------------------------------------------- */
.iaa-install-btn {
	display: block;
	width: 100%;
	padding: 16px 12px;
	background-color: var(--iaa-btn-bg, #ffffff);
	color:            var(--iaa-btn-fg, #1a6b2a);
	border: none;
	border-radius: 14px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.2px;
	cursor: pointer;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	transition: opacity 0.2s, transform 0.1s;
	-webkit-tap-highlight-color: transparent;
}

.iaa-install-btn:hover {
	opacity: 0.88;
}

.iaa-install-btn:active {
	transform: scale(0.98);
	opacity: 0.8;
}

.iaa-install-btn:focus {
	outline: 3px solid rgba(255, 255, 255, 0.6);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------
   iOS instruction overlay
--------------------------------------------------------------- */
#iaa-ios-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

#iaa-ios-overlay.iaa-ios-overlay-in {
	opacity: 1;
}

#iaa-ios-overlay.iaa-ios-overlay-in .iaa-ios-dialog {
	transform: translateY(0);
}

.iaa-ios-dialog {
	background: #1c1c1e;
	border-radius: 18px;
	padding: 32px 24px 24px;
	max-width: 340px;
	width: 100%;
	text-align: center;
	color: #ffffff;
	transform: translateY(24px);
	transition: transform 0.25s ease;
}

.iaa-ios-icon {
	width: 76px;
	height: 76px;
	border-radius: 17px;
	object-fit: cover;
	margin-bottom: 18px;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.iaa-ios-instr {
	font-size: 16px;
	line-height: 1.55;
	color: #e5e5ea;
	margin: 0 0 24px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.iaa-ios-close {
	background: none;
	border: none;
	color: #0a84ff;
	font-size: 17px;
	font-weight: 400;
	cursor: pointer;
	padding: 8px 16px;
	border-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	transition: opacity 0.2s;
}

.iaa-ios-close:hover {
	opacity: 0.75;
}

.iaa-ios-close:focus {
	outline: 2px solid #0a84ff;
	outline-offset: 2px;
}

/* ---------------------------------------------------------------
   "Already installed" toast
--------------------------------------------------------------- */
#iaa-toast {
	position: fixed;
	top: 16px;
	left: 50%;
	transform: translateX(-50%) translateY(-80px);
	background: #ffffff;
	color: #1a1a1a;
	padding: 12px 18px;
	border-radius: 12px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
	z-index: 2147483647;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	line-height: 1.4;
	max-width: calc(100vw - 32px);
	transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.4s ease;
	opacity: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

#iaa-toast.iaa-toast-in {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

.iaa-toast-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.iaa-toast-msg {
	flex: 1;
}
