/**
 * Back to Kvennasögusafn - Styles
 */

#btk-floating-button {
	position: fixed;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	transition: all 0.3s ease;
}

/* Position classes - all at bottom */
/* Note: Offsets are applied via JavaScript for dynamic control */
#btk-floating-button.btk-position-left {
	right: auto;
}

#btk-floating-button.btk-position-center {
	left: 50%;
	right: auto;
	margin-left: 0;
	transform: translateX(-50%);
}

#btk-floating-button.btk-position-right {
	left: auto;
}

/* Button link */
.btk-button-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	background-color: var(--btk-button-color, #4b4b4b);
	color: var(--btk-text-color, #ffffff);
	text-decoration: none;
	border-radius: 30px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
}

.btk-button-link:hover,
.btk-button-link:focus {
	background-color: var(--btk-button-color, #4b4b4b);
	color: var(--btk-text-color, #ffffff);
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Hover effect for non-center positions */
#btk-floating-button.btk-position-left .btk-button-link:hover,
#btk-floating-button.btk-position-left .btk-button-link:focus,
#btk-floating-button.btk-position-right .btk-button-link:hover,
#btk-floating-button.btk-position-right .btk-button-link:focus {
	transform: translateY(-2px);
}

/* Hover effect for center position */
#btk-floating-button.btk-position-center .btk-button-link:hover,
#btk-floating-button.btk-position-center .btk-button-link:focus {
	transform: translateX(-50%) translateY(-2px);
}

/* Disable hover transform on mobile/tablet (top alert style) */
@media screen and (max-width: 1024px) {
	#btk-floating-button .btk-button-link:hover,
	#btk-floating-button .btk-button-link:focus {
		transform: none;
		opacity: 0.9;
	}
}

/* Active state for non-center positions */
#btk-floating-button.btk-position-left .btk-button-link:active,
#btk-floating-button.btk-position-right .btk-button-link:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Active state for center position */
#btk-floating-button.btk-position-center .btk-button-link:active {
	transform: translateX(-50%) translateY(0);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Button icon */
.btk-button-icon {
	font-size: 18px;
	line-height: 1;
	font-weight: bold;
	color: var(--btk-icon-color, #c2002d);
}

/* Button text */
.btk-button-text {
	font-size: 14px;
	line-height: 1.4;
}

/* Size variations */
.btk-size-small .btk-button-link {
	padding: 10px 16px;
	font-size: 13px;
}

.btk-size-small .btk-button-icon {
	font-size: 16px;
}

.btk-size-medium .btk-button-link {
	padding: 12px 20px;
	font-size: 14px;
}

.btk-size-large .btk-button-link {
	padding: 14px 24px;
	font-size: 16px;
}

.btk-size-large .btk-button-icon {
	font-size: 20px;
}

/* Tablet responsiveness - Top alert style */
@media screen and (max-width: 1024px) and (min-width: 769px) {
	#btk-floating-button {
		top: 0 !important;
		bottom: auto !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		transform: none !important;
	}
	
	/* Position below WordPress admin bar if present */
	.admin-bar #btk-floating-button {
		top: 32px !important;
	}
	
	@media screen and (max-width: 782px) {
		.admin-bar #btk-floating-button {
			top: 46px !important;
		}
	}
	
	#btk-floating-button .btk-button-link {
		width: 100%;
		border-radius: 0;
		padding: 14px 20px;
		justify-content: center;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	}
	
	.btk-button-text {
		display: inline !important;
		font-size: 14px;
	}
	
	.btk-button-icon {
		font-size: 18px;
	}
	
	/* Add padding to body to prevent content from being hidden */
	body {
		padding-top: 56px !important;
	}
	
	.admin-bar body {
		padding-top: 88px !important;
	}
	
	@media screen and (max-width: 782px) {
		.admin-bar body {
			padding-top: 96px !important;
		}
	}
}

/* Mobile responsiveness - Top alert style */
@media screen and (max-width: 768px) {
	#btk-floating-button {
		top: 0 !important;
		bottom: auto !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		transform: none !important;
	}
	
	/* Position below WordPress admin bar if present */
	.admin-bar #btk-floating-button {
		top: 46px !important;
	}
	
	#btk-floating-button .btk-button-link {
		width: 100%;
		border-radius: 0;
		padding: 12px 16px;
		justify-content: center;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
		min-width: auto;
		height: auto;
	}
	
	.btk-button-text {
		display: inline !important;
		font-size: 13px;
	}
	
	.btk-button-icon {
		font-size: 18px;
		margin: 0;
	}
	
	/* Add padding to body to prevent content from being hidden */
	body {
		padding-top: 50px !important;
	}
	
	.admin-bar body {
		padding-top: 96px !important;
	}
}

/* Small mobile devices - Top alert style */
@media screen and (max-width: 480px) {
	#btk-floating-button {
		top: 0 !important;
		bottom: auto !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		transform: none !important;
	}
	
	/* Position below WordPress admin bar if present */
	.admin-bar #btk-floating-button {
		top: 46px !important;
	}
	
	#btk-floating-button .btk-button-link {
		width: 100%;
		border-radius: 0;
		padding: 10px 14px;
		justify-content: center;
		min-width: auto;
		height: auto;
	}
	
	.btk-button-text {
		display: inline !important;
		font-size: 12px;
	}
	
	.btk-button-icon {
		font-size: 16px;
	}
	
	/* Add padding to body to prevent content from being hidden */
	body {
		padding-top: 46px !important;
	}
	
	.admin-bar body {
		padding-top: 92px !important;
	}
}

/* Hide on mobile if disabled */
@media screen and (max-width: 768px) {
	#btk-floating-button.btk-hide-mobile {
		display: none !important;
	}
}

/* Accessibility */
.btk-button-link:focus {
	outline: 2px solid var(--btk-text-color, #ffffff);
	outline-offset: 2px;
}

/* Print styles */
@media print {
	#btk-floating-button {
		display: none !important;
	}
}

