/**
 * Authyo NF — Plugin Tour Styles
 *
 * Lightweight, responsive, cross-browser compatible.
 *
 * @since 1.0.5
 */

/* ========================================================================
   1. RESTART TOUR BUTTON (admin header)
   ======================================================================== */

.authyo-tour-restart-wrap {
	display: inline-block;
	margin-left: 12px;
	vertical-align: middle;
}

.authyo-tour-restart-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 14px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.8;
	color: #2271b1;
	background: #f0f6fc;
	border: 1px solid #2271b1;
	border-radius: 4px;
	cursor: pointer;
	-webkit-transition: all 0.2s ease;
	transition: all 0.2s ease;
	vertical-align: middle;
}

.authyo-tour-restart-btn:hover {
	background: #2271b1;
	color: #fff;
}

.authyo-tour-restart-btn:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.authyo-tour-restart-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

/* ========================================================================
   2. OVERLAY (full-viewport dark backdrop)
   ======================================================================== */

.authyo-tour-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99990;
	pointer-events: auto;
	background: rgba(0, 0, 0, 0.45);
}

/* Nav tabs are lifted above the overlay (99990) but kept BELOW the tooltip
   (99992) so they stay clickable without visually punching through the card. */
.authyo-tour-nav-lifted {
	position: relative !important;
	z-index: 99991 !important;
}

/* ========================================================================
   3. SPOTLIGHT (cutout around the target element)
   ======================================================================== */

.authyo-tour-spotlight {
	position: fixed;
	z-index: 99991;
	border-radius: 6px;
	pointer-events: none;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
	-webkit-transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
	transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
}

/* ========================================================================
   4. TOOLTIP (the step content card)
   ======================================================================== */

.authyo-tour-tooltip {
	position: fixed;
	z-index: 99992;
	width: 400px;
	max-width: calc(100vw - 40px);
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	overflow: hidden;
	opacity: 0;
	-webkit-transform: translateY(8px);
	-ms-transform: translateY(8px);
	transform: translateY(8px);
	-webkit-transition: opacity 0.25s ease, -webkit-transform 0.25s ease;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.authyo-tour-tooltip.authyo-tour-visible {
	opacity: 1;
	-webkit-transform: translateY(0);
	-ms-transform: translateY(0);
	transform: translateY(0);
}

/* --- Progress bar --- */
.authyo-tour-progress {
	height: 3px;
	background: #e2e4e7;
	overflow: hidden;
}

.authyo-tour-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #2271b1, #135e96);
	-webkit-transition: width 0.35s ease;
	transition: width 0.35s ease;
	border-radius: 0 2px 2px 0;
}

/* --- Header --- */
.authyo-tour-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 0;
}

.authyo-tour-step-counter {
	font-size: 12px;
	font-weight: 600;
	color: #2271b1;
	background: #f0f6fc;
	padding: 2px 10px;
	border-radius: 10px;
	letter-spacing: 0.3px;
	white-space: nowrap;
}

.authyo-tour-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
	font-size: 18px;
	line-height: 1;
	color: #8c8f94;
	background: transparent;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	-webkit-transition: all 0.15s ease;
	transition: all 0.15s ease;
}

.authyo-tour-close:hover {
	background: #f0f0f1;
	color: #1d2327;
}

.authyo-tour-close:focus {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

/* --- Body --- */
.authyo-tour-body {
	padding: 14px 20px 8px;
}

.authyo-tour-title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.4;
}

.authyo-tour-content {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: #50575e;
}

.authyo-tour-content strong {
	color: #1d2327;
	font-weight: 600;
}

.authyo-tour-content code {
	display: inline-block;
	padding: 1px 6px;
	font-size: 12px;
	font-family: Consolas, Monaco, monospace;
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	color: #2271b1;
}

/* --- Footer (navigation buttons) --- */
.authyo-tour-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px 16px;
	gap: 8px;
}

.authyo-tour-footer-left {
	flex-shrink: 0;
}

.authyo-tour-footer-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Shared button base */
.authyo-tour-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	border-radius: 5px;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	-webkit-transition: all 0.15s ease;
	transition: all 0.15s ease;
}

.authyo-tour-btn:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Skip / Previous */
.authyo-tour-btn-skip,
.authyo-tour-btn-prev {
	color: #50575e;
	background: transparent;
	border: 1px solid #c3c4c7;
}

.authyo-tour-btn-skip:hover,
.authyo-tour-btn-prev:hover {
	background: #f0f0f1;
	color: #1d2327;
	border-color: #8c8f94;
}

/* Next */
.authyo-tour-btn-next {
	color: #fff;
	background: #2271b1;
}

.authyo-tour-btn-next:hover {
	background: #135e96;
}

/* Start */
.authyo-tour-btn-start {
	color: #fff;
	background: #2271b1;
	padding: 9px 24px;
	font-size: 14px;
}

.authyo-tour-btn-start:hover {
	background: #135e96;
}

/* Finish */
.authyo-tour-btn-finish {
	color: #fff;
	background: #00a32a;
}

.authyo-tour-btn-finish:hover {
	background: #008a20;
}

/* ========================================================================
   5. TOOLTIP ARROW
   ======================================================================== */

.authyo-tour-arrow {
	position: absolute;
	width: 14px;
	height: 14px;
	background: #fff;
	-webkit-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
	box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}

.authyo-tour-tooltip[data-position="bottom"] .authyo-tour-arrow {
	top: -7px;
	left: 50%;
	-webkit-transform: translateX(-50%) rotate(45deg);
	-ms-transform: translateX(-50%) rotate(45deg);
	transform: translateX(-50%) rotate(45deg);
}

.authyo-tour-tooltip[data-position="top"] .authyo-tour-arrow {
	bottom: -7px;
	left: 50%;
	-webkit-transform: translateX(-50%) rotate(45deg);
	-ms-transform: translateX(-50%) rotate(45deg);
	transform: translateX(-50%) rotate(45deg);
	box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.04);
}

.authyo-tour-tooltip[data-position="left"] .authyo-tour-arrow {
	right: -7px;
	top: 50%;
	-webkit-transform: translateY(-50%) rotate(45deg);
	-ms-transform: translateY(-50%) rotate(45deg);
	transform: translateY(-50%) rotate(45deg);
	box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.04);
}

.authyo-tour-tooltip[data-position="right"] .authyo-tour-arrow {
	left: -7px;
	top: 50%;
	-webkit-transform: translateY(-50%) rotate(45deg);
	-ms-transform: translateY(-50%) rotate(45deg);
	transform: translateY(-50%) rotate(45deg);
	box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.04);
}

.authyo-tour-tooltip[data-position="center"] .authyo-tour-arrow {
	display: none;
}

/* ========================================================================
   6. CENTERED MODAL VARIANT (welcome / finish steps)
   ======================================================================== */

.authyo-tour-tooltip[data-position="center"] {
	text-align: center;
}

.authyo-tour-tooltip[data-position="center"] .authyo-tour-body {
	padding: 20px 24px 12px;
}

.authyo-tour-tooltip[data-position="center"] .authyo-tour-title {
	font-size: 18px;
}

.authyo-tour-tooltip[data-position="center"] .authyo-tour-footer {
	justify-content: center;
}

.authyo-tour-tooltip[data-position="center"] .authyo-tour-footer-left {
	display: none;
}

/* ========================================================================
   7. HIGHLIGHTED TARGET ELEMENT
   ======================================================================== */

.authyo-tour-target-highlight {
	position: relative;
	z-index: 99991 !important;
	outline: 2px solid #2271b1;
	outline-offset: 4px;
	border-radius: 6px;
}

/* ========================================================================
   8. RESPONSIVE
   ======================================================================== */

@media screen and (max-width: 960px) {
	.authyo-tour-tooltip {
		width: 360px;
	}
}

@media screen and (max-width: 600px) {
	.authyo-tour-tooltip {
		width: calc(100vw - 24px);
		max-width: none;
		left: 12px !important;
		right: 12px !important;
	}

	.authyo-tour-tooltip .authyo-tour-arrow {
		display: none;
	}

	.authyo-tour-title {
		font-size: 15px;
	}

	.authyo-tour-content {
		font-size: 13px;
	}

	.authyo-tour-btn {
		padding: 6px 12px;
		font-size: 12px;
	}

	.authyo-tour-restart-btn {
		margin-left: 0;
		margin-top: 8px;
		display: flex;
	}
}

/* ========================================================================
   9. REDUCED MOTION
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
	.authyo-tour-tooltip,
	.authyo-tour-spotlight,
	.authyo-tour-progress-bar {
		-webkit-transition: none !important;
		transition: none !important;
	}
}

/* ========================================================================
   10. RTL SUPPORT
   ======================================================================== */

html[dir="rtl"] .authyo-tour-restart-wrap {
	margin-left: 0;
	margin-right: 12px;
}

html[dir="rtl"] .authyo-tour-tooltip[data-position="bottom"] .authyo-tour-arrow,
html[dir="rtl"] .authyo-tour-tooltip[data-position="top"] .authyo-tour-arrow {
	left: auto;
	right: 30px;
}

html[dir="rtl"] .authyo-tour-footer {
	flex-direction: row-reverse;
}
