/**
 * Frontend styles for TeamTela Book Tools.
 */

.teamtela-book {
	--teamtela-book-primary-color: #2563eb;
	--teamtela-book-secondary-color: #f97316;
	--teamtela-book-text-color: #1f2937;
	--teamtela-book-muted-color: #6b7280;
	--teamtela-book-background-color: #ffffff;
	--teamtela-book-surface-color: #f9fafb;
	--teamtela-book-border-color: #e5e7eb;
	--teamtela-book-success-color: #16a34a;
	--teamtela-book-warning-color: #f59e0b;
	--teamtela-book-danger-color: #dc2626;
	--teamtela-book-border-radius: 28px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 0 20px;
	color: var(--teamtela-book-text-color);
	font-size: 14px;
	line-height: 1.8;
	direction: rtl;
	text-align: right;
}

.teamtela-book *,
.teamtela-book *::before,
.teamtela-book *::after { box-sizing: border-box; }

.teamtela-book svg { display: block; width: 1em; height: 1em; fill: currentColor; flex: 0 0 auto; }

.teamtela-book-section-title { margin: 0 0 12px; padding: 0; color: var(--teamtela-book-text-color); font-size: 18px; font-weight: 700; line-height: 1.6; }

.teamtela-book-specs-card { display: grid; grid-template-columns: 1fr; gap: 0; overflow: hidden; width: 100%; background: var(--teamtela-book-background-color); border: 1px solid var(--teamtela-book-border-color); border-radius: var(--teamtela-book-border-radius); box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06); }
.teamtela-book-spec-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 12px 16px; border-bottom: 1px solid var(--teamtela-book-border-color); }
.teamtela-book-spec-row:last-child { border-bottom: 0; }
.teamtela-book-spec-label { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; color: var(--teamtela-book-muted-color); font-size: 13px; font-weight: 500; white-space: nowrap; }
.teamtela-book-spec-label svg { width: 18px; height: 18px; color: var(--teamtela-book-secondary-color); }
.teamtela-book-spec-value { color: var(--teamtela-book-text-color); font-size: 14px; font-weight: 600; text-align: left; }

.teamtela-book-sample-pdf { display: flex; align-items: center; justify-content: flex-start; }
.teamtela-book-sample-pdf-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; color: #ffffff; background: var(--teamtela-book-primary-color); border: 1px solid var(--teamtela-book-primary-color); border-radius: calc(var(--teamtela-book-border-radius) / 1.8); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18); font-size: 14px; font-weight: 700; line-height: 1.4; text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease; }
.teamtela-book-sample-pdf-button:hover,
.teamtela-book-sample-pdf-button:focus { color: #ffffff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24); outline: none; }
.teamtela-book-sample-pdf-button:focus-visible { outline: 2px solid var(--teamtela-book-primary-color); outline-offset: 3px; }
.teamtela-book-sample-pdf-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: currentColor; }

.teamtela-book-sample-text-card { width: 100%; padding: 18px 20px; color: var(--teamtela-book-text-color); background: var(--teamtela-book-background-color); border: 1px solid var(--teamtela-book-border-color); border-radius: var(--teamtela-book-border-radius); box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06); font-size: 15px; line-height: 2; }
.teamtela-book-sample-text-card p { margin: 0 0 14px; }
.teamtela-book-sample-text-card p:last-child { margin-bottom: 0; }

.teamtela-book-reactions { --teamtela-book-reaction-card-radius: var(--teamtela-book-border-radius); --teamtela-book-reaction-icon-size: 26px; --teamtela-book-reaction-count-size: 24px; --teamtela-book-reaction-color: var(--teamtela-book-primary-color); }
.teamtela-book-reactions-card { display: flex; align-items: stretch; justify-content: center; gap: 0; width: 100%; max-width: 520px; padding: 18px 22px; background: var(--teamtela-book-background-color); border: 1px solid rgba(229, 231, 235, 0.82); border-radius: var(--teamtela-book-reaction-card-radius); box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08); }

.teamtela-book-reaction-button { --teamtela-book-reaction-color: var(--teamtela-book-primary-color); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 92px; min-height: 74px; margin: 0; padding: 8px 14px; color: var(--teamtela-book-muted-color); background: transparent; border: 0; border-radius: calc(var(--teamtela-book-border-radius) / 1.6); box-shadow: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; appearance: none; transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease; }
.teamtela-book-reaction-button:hover,
.teamtela-book-reaction-button:focus { color: var(--teamtela-book-reaction-color); background: color-mix(in srgb, var(--teamtela-book-reaction-color) 8%, transparent); outline: none; }
@supports not (background: color-mix(in srgb, #000 10%, transparent)) { .teamtela-book-reaction-button:hover, .teamtela-book-reaction-button:focus { background: rgba(15, 23, 42, 0.04); } }
.teamtela-book-reaction-button:focus-visible { outline: 2px solid var(--teamtela-book-reaction-color); outline-offset: 3px; }
.teamtela-book-reaction-button:active { transform: scale(0.98); }
.teamtela-book-reaction-button.is-active { color: var(--teamtela-book-reaction-color); background: color-mix(in srgb, var(--teamtela-book-reaction-color) 11%, transparent); }
@supports not (background: color-mix(in srgb, #000 10%, transparent)) { .teamtela-book-reaction-button.is-active { background: rgba(15, 23, 42, 0.05); } }
.teamtela-book-reaction-button[disabled],
.teamtela-book-reaction-button.is-disabled { cursor: not-allowed; opacity: 0.48; transform: none; }
.teamtela-book-reaction-button.is-loading { pointer-events: none; opacity: 0.72; }
.teamtela-book-reaction-button.is-loading::after { content: ""; position: absolute; inset: 8px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 999px; opacity: 0.45; animation: teamtela-book-reaction-spin 0.75s linear infinite; }

.teamtela-book-reaction-icon { display: inline-flex; align-items: center; justify-content: center; width: var(--teamtela-book-reaction-icon-size); height: var(--teamtela-book-reaction-icon-size); color: var(--teamtela-book-reaction-color); line-height: 1; }
.teamtela-book-reaction-icon svg { width: var(--teamtela-book-reaction-icon-size); height: var(--teamtela-book-reaction-icon-size); }
.teamtela-book-reaction-label { color: currentColor; font-size: 13px; font-weight: 600; line-height: 1.5; }
.teamtela-book-reaction-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; color: var(--teamtela-book-text-color); font-size: var(--teamtela-book-reaction-count-size); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.teamtela-book-reaction-button.is-active .teamtela-book-reaction-count { color: var(--teamtela-book-reaction-color); }

.teamtela-book-reactions-message { min-height: 20px; margin-top: 10px; color: var(--teamtela-book-muted-color); font-size: 13px; line-height: 1.7; text-align: center; }
.teamtela-book-reactions-message.is-success,
.teamtela-book-reactions-message.teamtela-book-message--success { color: var(--teamtela-book-success-color); }
.teamtela-book-reactions-message.is-error,
.teamtela-book-reactions-message.teamtela-book-message--error { color: var(--teamtela-book-danger-color); }
.teamtela-book-reactions-message.is-warning,
.teamtela-book-reactions-message.teamtela-book-message--warning { color: var(--teamtela-book-warning-color); }

.teamtela-book-reactions--compact .teamtela-book-reactions-card { justify-content: space-around; gap: 8px; padding: 18px 20px; border-radius: 30px; }
.teamtela-book-reactions--compact .teamtela-book-reaction-button { flex-direction: column; gap: 8px; min-width: 76px; min-height: 82px; padding: 10px 12px; }
.teamtela-book-reactions--compact .teamtela-book-reaction-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.teamtela-book-reactions--compact .teamtela-book-reaction-icon,
.teamtela-book-reactions--compact .teamtela-book-reaction-icon svg { width: 28px; height: 28px; }
.teamtela-book-reactions--compact .teamtela-book-reaction-count { font-size: 26px; font-weight: 800; color: var(--teamtela-book-text-color); }

.teamtela-book-reactions--default .teamtela-book-reactions-card { flex-wrap: wrap; justify-content: flex-start; gap: 10px; max-width: 100%; padding: 14px; }
.teamtela-book-reactions--default .teamtela-book-reaction-button { flex-direction: row; min-width: auto; min-height: 44px; padding: 9px 14px; background: var(--teamtela-book-surface-color); border: 1px solid var(--teamtela-book-border-color); }
.teamtela-book-reactions--default .teamtela-book-reaction-count { min-width: 22px; padding-inline-start: 2px; font-size: 14px; font-weight: 800; color: var(--teamtela-book-muted-color); }
.teamtela-book-reactions--default .teamtela-book-reaction-button.is-active { border-color: var(--teamtela-book-reaction-color); }
.teamtela-book-reactions--default .teamtela-book-reaction-button.is-active .teamtela-book-reaction-count { color: var(--teamtela-book-reaction-color); }

.teamtela-book-reaction-button--interest { --teamtela-book-reaction-color: var(--teamtela-book-secondary-color); }
.teamtela-book-reaction-button--want-to-read { --teamtela-book-reaction-color: var(--teamtela-book-primary-color); }
.teamtela-book-reaction-button--recommend { --teamtela-book-reaction-color: var(--teamtela-book-success-color); }
.teamtela-book-reaction-button--not-recommend { --teamtela-book-reaction-color: var(--teamtela-book-danger-color); }

@keyframes teamtela-book-reaction-spin { to { transform: rotate(360deg); } }

.woocommerce div.product .teamtela-book,
.single-product .teamtela-book,
.product .teamtela-book { clear: both; }
.woocommerce div.product .teamtela-book a,
.single-product .teamtela-book a,
.product .teamtela-book a { text-decoration: none; }
.woodmart-theme .teamtela-book,
body.theme-woodmart .teamtela-book,
.woodmart-theme .teamtela-book-reaction-button,
body.theme-woodmart .teamtela-book-reaction-button { font-family: inherit; }
.elementor-widget-container .teamtela-book { margin-bottom: 0; }
.elementor-widget-container .teamtela-book + .teamtela-book { margin-top: 18px; }

@media (max-width: 767px) {
	.teamtela-book { margin-bottom: 16px; }
	.teamtela-book-section-title { font-size: 16px; }
	.teamtela-book-spec-row { align-items: flex-start; flex-direction: column; gap: 4px; padding: 12px 14px; }
	.teamtela-book-spec-label { min-width: 0; }
	.teamtela-book-spec-value { width: 100%; text-align: right; }
	.teamtela-book-sample-text-card { padding: 16px; font-size: 14px; }
	.teamtela-book-reactions-card { max-width: 100%; }
	.teamtela-book-reactions--compact .teamtela-book-reactions-card { justify-content: space-between; gap: 4px; padding: 14px 12px; border-radius: 24px; }
	.teamtela-book-reactions--compact .teamtela-book-reaction-button { min-width: 64px; min-height: 76px; padding: 8px 6px; }
	.teamtela-book-reactions--compact .teamtela-book-reaction-icon,
	.teamtela-book-reactions--compact .teamtela-book-reaction-icon svg { width: 24px; height: 24px; }
	.teamtela-book-reactions--compact .teamtela-book-reaction-count { font-size: 22px; }
	.teamtela-book-reactions--default .teamtela-book-reaction-button { flex: 1 1 calc(50% - 8px); }
}

@media (max-width: 420px) {
	.teamtela-book-reactions--compact .teamtela-book-reactions-card { padding: 12px 8px; }
	.teamtela-book-reactions--compact .teamtela-book-reaction-button { min-width: 58px; }
	.teamtela-book-reactions--compact .teamtela-book-reaction-count { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.teamtela-book *,
	.teamtela-book *::before,
	.teamtela-book *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
