/* Reusable component styles: buttons, cards, badges, chips, forms, accordion, tabs. */

/* Buttons */
.oi-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	border-radius: var(--oi-radius-sm);
	padding: 13px 26px;
	font-weight: 700;
	font-size: 14.5px;
	transition: transform .15s ease, box-shadow .15s ease, background-position .25s ease;
	background-size: 200% auto;
	background-position: 0 0;
}
.oi-btn:hover { background-position: 100% 0; transform: translateY(-1px); }

.oi-btn--primary {
	background-image: var(--oi-brand-gradient);
	color: #fff;
	box-shadow: var(--oi-shadow-btn);
}
.oi-btn--primary:hover { box-shadow: var(--oi-shadow-btn-lg); }

.oi-btn--dark {
	background: var(--oi-ink);
	color: #fff;
}

.oi-btn--outline {
	background: #fff;
	color: var(--oi-ink);
	border: 1.5px solid var(--oi-border-btn);
}
.oi-btn--outline:hover { border-color: var(--oi-blue); color: var(--oi-blue); }

.oi-btn--ghost-dark {
	background: rgba(255, 255, 255, .08);
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, .24);
}

.oi-btn--sm { padding: 9px 18px; font-size: 13px; }
.oi-btn--block { width: 100%; }

/* Icon container */
.oi-icon-box {
	width: var(--oi-icon-container);
	height: var(--oi-icon-container);
	border-radius: var(--oi-radius-md);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: var(--oi-tint-blue);
	color: var(--oi-blue);
}
.oi-icon-box--circle { border-radius: 50%; }
.oi-icon-box--gradient { background: var(--oi-icon-gradient); color: #fff; }
.oi-icon-box--green { background: var(--oi-tint-green); color: var(--oi-success); }
.oi-icon-box--dark { background: rgba(255, 255, 255, .08); color: var(--oi-cyan); }

@media (max-width: 782px) {
	.oi-icon-box { width: var(--oi-icon-container-mobile); height: var(--oi-icon-container-mobile); border-radius: var(--oi-radius-sm); }
}

/* Card */
.oi-card {
	background: #fff;
	border: 1px solid var(--oi-border);
	border-radius: var(--oi-radius-lg);
	padding: 32px;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.oi-card:hover { transform: translateY(-3px); box-shadow: var(--oi-shadow-card); border-color: rgba(46, 92, 230, .25); }
.oi-card--dark { background: var(--oi-dark-gradient); color: #fff; border-color: transparent; box-shadow: var(--oi-shadow-dark); }
.oi-card--flat:hover { transform: none; box-shadow: none; }

@media (max-width: 782px) {
	.oi-card { padding: 20px; border-radius: var(--oi-radius-md); }
}

/* Badges / chips / pills */
.oi-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-radius: var(--oi-radius-pill);
	font-size: 12.5px;
	font-weight: 700;
	padding: 6px 14px;
}
.oi-pill--blue { background: var(--oi-tint-blue); color: var(--oi-blue); border: 1px solid var(--oi-tint-blue-border); }
.oi-pill--gold { background: var(--oi-gold-gradient); color: var(--oi-gold-text); }
.oi-pill--amber { background: var(--oi-amber-bg); color: var(--oi-amber-text); }
.oi-pill--green { background: var(--oi-tint-green); color: var(--oi-success); }

.oi-chip {
	border-radius: var(--oi-radius-pill);
	padding: 10px 20px;
	font-size: 13.5px;
	font-weight: 600;
	background: #fff;
	color: var(--oi-ink);
	border: 1.5px solid var(--oi-border);
	transition: all .15s ease;
	display: inline-block;
}
.oi-chip:hover { border-color: var(--oi-blue); }
.oi-chip.is-active {
	background-image: var(--oi-brand-gradient);
	color: #fff;
	border-color: transparent;
	font-weight: 700;
}
.oi-chip--dark-active.is-active {
	background-image: none;
	background: var(--oi-ink);
	color: #fff;
}
.oi-chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.oi-chip-row--center { justify-content: center; }

@media (max-width: 782px) {
	.oi-chip { padding: 9px 15px; font-size: 12.5px; }
}

/* Forms */
.oi-field { display: flex; flex-direction: column; gap: 6px; }
.oi-field label { font-size: 13px; font-weight: 600; color: var(--oi-ink); }
.oi-field input,
.oi-field textarea,
.oi-field select {
	border: 1.5px solid var(--oi-border);
	border-radius: var(--oi-radius-sm);
	padding: 12px 14px;
	background: #fff;
	color: var(--oi-body);
	width: 100%;
}
.oi-field input:focus,
.oi-field textarea:focus,
.oi-field select:focus { border-color: var(--oi-blue); }

.oi-checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--oi-body); }
.oi-checkbox-row a { color: var(--oi-blue); text-decoration: underline; }

/* Quantity stepper */
.oi-qty {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid var(--oi-border);
	border-radius: var(--oi-radius-sm);
	overflow: hidden;
}
.oi-qty button {
	background: none;
	border: none;
	width: 36px;
	height: 36px;
	font-size: 16px;
	color: var(--oi-ink);
}
.oi-qty input {
	width: 40px;
	text-align: center;
	border: none;
	background: none;
	font-weight: 700;
	-moz-appearance: textfield;
}
.oi-qty input::-webkit-outer-spin-button,
.oi-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Accordion (native <details>/<summary> — answers always in the DOM, per design review) */
.oi-accordion-item {
	background: #fff;
	border: 1px solid var(--oi-border);
	border-radius: var(--oi-radius-lg);
	margin-bottom: 12px;
	padding: 0;
}
.oi-accordion-item summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px;
	font-size: 15px;
	font-weight: 600;
	color: var(--oi-ink);
}
.oi-accordion-item summary::-webkit-details-marker { display: none; }
.oi-accordion-item summary::marker { content: ""; }
.oi-accordion-toggle {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--oi-tint-blue);
	color: var(--oi-blue);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	line-height: 1;
}
.oi-accordion-item[open] .oi-accordion-toggle::before { content: "\2212"; }
.oi-accordion-item:not([open]) .oi-accordion-toggle::before { content: "\002B"; }
.oi-accordion-body {
	padding: 0 24px 20px;
	font-size: 14px;
	color: var(--oi-muted);
	line-height: 1.85;
}

@media (max-width: 782px) {
	.oi-accordion-item { border-radius: var(--oi-radius-md); margin-bottom: 10px; }
	.oi-accordion-item summary { padding: 15px 16px; font-size: 13.5px; }
	.oi-accordion-toggle { width: 24px; height: 24px; font-size: 14px; }
	.oi-accordion-body { padding: 0 16px 16px; font-size: 12.5px; }
}

/* Tabs */
.oi-tabs-nav {
	display: flex;
	gap: 24px;
	border-bottom: 1px solid var(--oi-border);
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.oi-tabs-nav::-webkit-scrollbar { display: none; }
.oi-tabs-nav button {
	background: none;
	border: none;
	padding: 14px 2px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--oi-faint);
	border-bottom: 2.5px solid transparent;
	white-space: nowrap;
}
.oi-tabs-nav button.is-active { color: var(--oi-blue); font-weight: 700; border-color: var(--oi-blue); }
.oi-tab-panel { display: none; padding-top: 28px; }
.oi-tab-panel.is-active { display: block; }

/* Generic icon+label inline pair, for one-off spots not already inside a flex row. */
.oi-inline-icon { display: inline-flex; align-items: center; gap: 6px; }

/* Trust / check list rows */
.oi-check-list { display: flex; flex-direction: column; gap: 10px; }
.oi-check-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--oi-body); }
.oi-check-list--dark li { color: var(--oi-dark-subtext); }
.oi-check-icon { color: var(--oi-success); flex-shrink: 0; }
.oi-check-icon--cyan { color: var(--oi-cyan); }

/* Sticky bars */
.oi-sticky-bar {
	position: sticky;
	bottom: 0;
	z-index: 30;
	background: #fff;
	border-top: 1px solid var(--oi-border);
	box-shadow: var(--oi-shadow-sticky);
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.oi-sticky-bar.is-hidden { display: none; }

/* Star rating */
.oi-stars { color: var(--oi-gold-start); letter-spacing: 2px; font-size: 14px; }

/* Comments / reviews — shared by comments.php (blog posts) and
   woocommerce/single-product-reviews.php (product reviews). */
.oi-comments { margin-top: 10px; padding-top: 15px; }
.oi-comments__title { font-size: 22px; margin-bottom: 24px; }
.oi-comments__empty, .oi-comments__closed { color: var(--oi-muted); font-size: 13.5px; margin-bottom: 24px; }

.oi-comment-list { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.oi-comment-list .children { list-style: none; margin: 20px 0 0; padding-inline-start: 40px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 782px) { .oi-comment-list .children { padding-inline-start: 14px; } }
.oi-comment-card { background: #fff; border: 1px solid var(--oi-border); border-radius: var(--oi-radius-lg); padding: 20px; }
.oi-comment-card__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.oi-comment-card__avatar { width: 36px; height: 36px; font-size: 14px; flex-shrink: 0; }
.oi-comment-card__author { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oi-comment-card__verified { font-size: 10.5px; padding: 3px 8px; }
.oi-comment-card__date { font-size: 12px; color: var(--oi-muted); display: block; margin-top: 2px; }
.oi-comment-card__content { font-size: 13.5px; color: var(--oi-body); line-height: 1.8; }
.oi-comment-card__content p { margin-bottom: 10px; }
.oi-comment-card__content p:last-child { margin-bottom: 0; }
.oi-comment-card__pending { font-size: 12.5px; color: var(--oi-amber-text); background: var(--oi-amber-bg); border-radius: var(--oi-radius-sm); padding: 8px 12px; margin-bottom: 12px; }
.oi-comment-card__reply { margin-top: 10px; }
.oi-comment-card__reply a { font-size: 12.5px; font-weight: 700; color: var(--oi-blue); }

/* Comment form */
.oi-comment-form { background: var(--oi-ice); border: 1px solid var(--oi-border); border-radius: var(--oi-radius-lg); padding: 24px; }
.oi-comment-form__title { font-size: 17px; margin-bottom: 16px; }
.oi-comment-form .comment-form-author,
.oi-comment-form .comment-form-email,
.oi-comment-form .comment-form-comment,
.oi-comment-form .comment-notes,
.oi-comment-form .comment-form-rating,
.oi-comment-form .oi-rating-field { margin-bottom: 14px; }
.oi-comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.oi-comment-form input[type="text"],
.oi-comment-form input[type="email"],
.oi-comment-form textarea,
.oi-comment-form select {
	width: 100%; border: 1.5px solid var(--oi-border); border-radius: var(--oi-radius-sm);
	padding: 11px 14px; font-size: 13.5px; background: #fff;
}
.oi-comment-form textarea { min-height: 110px; resize: vertical; }
.oi-comment-form .required { color: var(--oi-danger); }
.oi-comment-form .logged-in-as { font-size: 12.5px; color: var(--oi-muted); margin-bottom: 14px; }
.oi-comment-form .logged-in-as a { color: var(--oi-blue); }
.oi-comment-form .form-submit { margin-top: 4px; }
.oi-recaptcha-field { margin-bottom: 14px; }
.must-log-in { font-size: 13.5px; color: var(--oi-muted); }
.must-log-in a { color: var(--oi-blue); font-weight: 700; }
.oi-rating-field select { max-width: 220px; }
/* WP's default cookie-consent checkbox field — flexing the wrapping <p> lays
   the checkbox and its label out as flex items side by side regardless of
   the label's own (block) display value from the rule above. */
.oi-comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.oi-comment-form .comment-form-cookies-consent label { margin: 0; font-weight: 400; }

.oi-comment-form .oi-rating-field p.stars {
	    font-size: 12px;
}
/* WooCommerce's .star-rating markup — its own icon font is disabled
   (inc/woocommerce.php dequeues WC's default stylesheet), so this renders
   the same 5-star widget with plain unicode stars instead. */
.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; font-size: 15px; line-height: 1; margin-bottom: 12px; }
.star-rating::before {
	content: "\2605\2605\2605\2605\2605"; color: var(--oi-border); letter-spacing: 2px;
	display: block; white-space: nowrap;
}
.star-rating span { position: absolute; inset-inline-start: 0; top: 0; overflow: hidden; }
.star-rating span::before {
	content: "\2605\2605\2605\2605\2605"; color: var(--oi-gold-start); letter-spacing: 2px;
	display: block; white-space: nowrap;
}

/* Clickable star-rating picker — progressive enhancement over the review
   form's plain <select id="rating"> (assets/js/main.js hides the select and
   builds this instead; without JS the select itself still works fine). */
.oi-rating-field.has-star-picker select { display: none; }
.oi-star-picker { display: inline-flex; gap: 4px; direction: ltr; }
.oi-star-picker__star {
	background: none; border: none; padding: 2px; cursor: pointer; line-height: 1;
	font-size: 28px; color: #c4c4c4; transition: color .1s ease, transform .1s ease;
}
.oi-star-picker__star:hover { transform: scale(1.12); }
.oi-star-picker__star.is-active { color: var(--oi-gold-start); }

/* Floating support button (Telegram/WhatsApp) — fixed to the visual bottom-right
   corner on every page regardless of RTL, so `right`/`bottom` are physical, not
   logical inset-inline properties. */
.oi-support-widget { position: fixed; z-index: 50; bottom: 24px; right: 24px; }
.oi-support-widget__toggle {
	width: 56px; height: 56px; border-radius: 50%; border: none;
	background-image: var(--oi-brand-gradient); background-size: 200% auto; color: #fff;
	box-shadow: var(--oi-shadow-btn-lg); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	position: relative; animation: oiSupportPulse 2.6s ease-in-out infinite;
}
.oi-support-widget__toggle:hover { animation-play-state: paused; background-position: 100% 0; }
.oi-support-widget__icon-close { display: none; }
.oi-support-widget.is-open .oi-support-widget__icon-open { display: none; }
.oi-support-widget.is-open .oi-support-widget__icon-close { display: block; }
.oi-support-widget.is-open .oi-support-widget__toggle { animation: none; }

.oi-support-widget__menu {
	position: absolute; bottom: calc(100% + 14px); right: 0;
	display: flex; flex-direction: column; gap: 10px;
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
	pointer-events: none;
}
.oi-support-widget.is-open .oi-support-widget__menu {
	opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.oi-support-widget__link {
	display: flex; align-items: center; gap: 10px; white-space: nowrap;
	background: #fff; border: 1px solid var(--oi-border); border-radius: var(--oi-radius-pill);
	padding: 10px 18px 10px 14px; font-size: 13.5px; font-weight: 700; color: var(--oi-ink);
	box-shadow: var(--oi-shadow-chip);
}
.oi-support-widget__link--telegram { color: #229ED9; }
.oi-support-widget__link--whatsapp { color: #25D366; }
.oi-support-widget__link:hover { transform: translateY(-2px); }

@keyframes oiSupportPulse {
	0%, 100% { box-shadow: var(--oi-shadow-btn-lg), 0 0 0 0 rgba(37, 99, 235, .35); }
	50% { box-shadow: var(--oi-shadow-btn-lg), 0 0 0 10px rgba(37, 99, 235, 0); }
}

@media (max-width: 782px) {
	/* Cart/checkout/product pages also show a sticky bottom CTA bar on
	   mobile (~70px tall) — clear it unconditionally rather than tracking
	   which pages have it, since sitting a bit higher costs nothing on the
	   pages that don't. */
	.oi-support-widget { bottom: 90px; right: 16px; }
	.oi-support-widget__toggle { width: 50px; height: 50px; }
}
