/* ---------------------------------------------------------------
 * Wrapper + toggle
 * ------------------------------------------------------------ */
.olori-share {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
}

.olori-share__label {
	font-weight: 600;
}

/* Themes style every <button>, so the icon button is forced back to plain. */
.olori-share .olori-share__toggle,
.olori-share button.olori-share__toggle {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 auto;
	width: 40px !important;
	min-width: 0 !important;
	max-width: none;
	height: 40px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(0, 0, 0, .18) !important;
	border-radius: 50% !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #111 !important;
	font-size: 0;
	line-height: 1 !important;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}

.olori-share .olori-share__toggle:hover,
.olori-share .olori-share__toggle[aria-expanded="true"] {
	background: #111 !important;
	border-color: #111 !important;
	color: #fff !important;
}

.olori-share .olori-share__toggle:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/* Icons always follow the current text colour. */
.olori-share svg,
.olori-share-overlay svg {
	display: block;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	fill: currentColor;
	stroke: none;
}

.olori-share svg path,
.olori-share-overlay svg path {
	fill: currentColor !important;
}

/* ---------------------------------------------------------------
 * Popup (default)
 * ------------------------------------------------------------ */
.olori-share-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .5);
}

.olori-share-overlay[hidden] {
	display: none;
}

.olori-share-modal {
	width: 100%;
	max-width: 380px;
	max-height: 85vh;
	overflow-y: auto;
	padding: 18px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.olori-share-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.olori-share-modal__title {
	margin: 0 !important;
	color: #111;
	font-size: 17px;
	line-height: 1.3;
}

.olori-share-modal .olori-share-modal__close,
.olori-share-modal button.olori-share-modal__close {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 32px !important;
	min-width: 0 !important;
	height: 32px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #666 !important;
	font-size: 0;
	cursor: pointer;
}

.olori-share-modal .olori-share-modal__close:hover {
	background: #f2f2f2 !important;
	color: #111 !important;
}

/* Inside the popup the panel is just a plain list. */
.olori-share-overlay .olori-share__panel {
	position: static;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

html.olori-share-open,
html.olori-share-open body {
	overflow: hidden;
}

/* ---------------------------------------------------------------
 * Dropdown mode
 * ------------------------------------------------------------ */
.olori-share__panel {
	position: absolute;
	z-index: 999;
	top: calc(100% + 10px);
	left: 0;
	min-width: 200px;
	padding: 8px;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.olori-share__label ~ .olori-share__toggle + .olori-share__panel {
	left: 56px;
}

.olori-share__panel[hidden] {
	display: none;
}

/* ---------------------------------------------------------------
 * Rows (shared by both modes)
 * ------------------------------------------------------------ */
.olori-share__panel .olori-share__item,
.olori-share__panel a.olori-share__item,
.olori-share__panel button.olori-share__item {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 12px !important;
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 10px 12px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #111 !important;
	font-family: inherit;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.25 !important;
	letter-spacing: normal !important;
	text-align: left !important;
	text-transform: none !important;
	text-decoration: none !important;
	cursor: pointer;
}

.olori-share__panel .olori-share__item:hover,
.olori-share__panel .olori-share__item:focus-visible {
	background: #f2f2f2 !important;
}

.olori-share__panel .olori-share__item span {
	flex: 1 1 auto;
	text-align: left;
}

.olori-share__panel .olori-share__item--whatsapp:hover { color: #25d366 !important; }
.olori-share__panel .olori-share__item--facebook:hover { color: #1877f2 !important; }
.olori-share__panel .olori-share__item--instagram:hover { color: #e1306c !important; }
.olori-share__panel .olori-share__item--pinterest:hover { color: #e60023 !important; }
.olori-share__panel .olori-share__item--linkedin:hover { color: #0a66c2 !important; }
.olori-share__panel .olori-share__item--telegram:hover { color: #229ed9 !important; }

@media (max-width: 575px) {
	.olori-share__panel,
	.olori-share__label ~ .olori-share__toggle + .olori-share__panel {
		left: 0;
		right: 0;
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.olori-share .olori-share__toggle { transition: none; }
}
