/**
 * FlexRate frontend styles: delivery-estimate badge and help-tip icon
 * appended to a rate's label on classic cart/checkout.
 */

.flexrate-delivery-eta {
	font-size: 0.9em;
	color: #6b7280;
}

/**
 * Question-mark icon + hover bubble, styled after the reference plugin's
 * own [data-tooltip] tooltip (pure CSS, no JS/icon-font dependency): a
 * dark rounded bubble above the icon, shown via :hover/:focus rather than
 * the native `title` attribute so it renders consistently across browsers.
 */
.flexrate-help-tip {
	display: inline-block;
	position: relative;
	width: 16px;
	height: 16px;
	line-height: 16px;
	border-radius: 50%;
	background: #3b82f6;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
	cursor: help;
	margin-left: 4px;
	transition: background-color 0.15s ease;
}

/* !important since themes commonly tint interactive elements inside a
   shipping-method row with their own accent color on hover, which would
   otherwise override the blue-to-green swap below. */
.flexrate-help-tip:hover,
.flexrate-help-tip:focus {
	background: #28a745 !important;
	color: #fff !important;
}

.flexrate-help-tip:before,
.flexrate-help-tip:after {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.flexrate-help-tip:before {
	position: absolute;
	z-index: 10;
	bottom: 130%;
	left: 50%;
	margin-left: -100px;
	padding: 7px;
	width: 200px;
	border-radius: 3px;
	background-color: hsla( 0, 0%, 20%, 0.9 );
	color: #fff;
	content: attr( data-tooltip );
	text-align: center;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
}

.flexrate-help-tip:after {
	position: absolute;
	z-index: 10;
	bottom: 130%;
	left: 50%;
	margin-left: -5px;
	width: 0;
	border-top: 5px solid hsla( 0, 0%, 20%, 0.9 );
	border-right: 5px solid transparent;
	border-left: 5px solid transparent;
	content: " ";
}

.flexrate-help-tip:hover:before,
.flexrate-help-tip:hover:after,
.flexrate-help-tip:focus:before,
.flexrate-help-tip:focus:after {
	visibility: visible;
	opacity: 1;
}
