/* Contenedor debajo de cantidad y agregar al carrito */
.woocommerce div.product .tvt-product-btn-wrap {
	display: block;
	clear: both;
	width: 100%;
	margin-top: 12px;
}

/* Botón en ficha de producto: mismo tamaño que "Add to cart" */
.woocommerce div.product .tvt-product-btn-wrap .tvt-open-btn--product,
.woocommerce div.product .tvt-product-btn-wrap .tvt-open-btn--login {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: auto !important;
	max-width: 100%;
	margin-top: 0 !important;
	padding: 0 20px !important;
	min-height: 45px;
	height: 45px;
	line-height: 1.2 !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	border-radius: 0 !important;
	border-width: 2px !important;
	border-style: solid !important;
	color: inherit;
	cursor: pointer;
	text-decoration: none;
	box-shadow: none !important;
	transform: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	vertical-align: top;
}

.tvt-open-btn.button.alt {
	border-width: 2px !important;
	border-style: solid !important;
}

.tvt-open-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: auto !important;
	max-width: 100%;
	margin-top: 10px !important;
	padding: 0 18px !important;
	min-height: 42px;
	line-height: 1.2 !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	border-radius: 6px !important;
	border: none !important;
	cursor: pointer;
	box-shadow: none !important;
	transform: none !important;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tvt-open-btn:hover {
	transform: none !important;
	box-shadow: none !important;
}

.tvt-open-btn__icon {
	font-size: 1em;
	line-height: 1;
}

.tvt-open-btn__icon-img {
	display: block;
	width: 18px;
	height: 18px;
	object-fit: contain;
	flex-shrink: 0;
}

.tvt-modal[hidden] {
	display: none !important;
}

.tvt-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.tvt-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
}

.tvt-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 16px;
	width: min(520px, 100%);
	max-height: 90vh;
	overflow-y: auto;
	padding: 28px 24px 20px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.tvt-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #64748b;
}

.tvt-modal__title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	color: #0f172a;
}

.tvt-modal__subtitle {
	margin: 0 0 20px;
	color: #64748b;
	font-size: 0.95rem;
	line-height: 1.5;
}

.tvt-modal__product {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #f8fafc;
	border-radius: 10px;
	margin-bottom: 20px;
}

.tvt-modal__product img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
}

.tvt-modal__product span {
	font-weight: 600;
	color: #334155;
	font-size: 0.95rem;
}

.tvt-modal__product-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tvt-variation-label {
	font-size: 0.85rem !important;
	font-weight: 500 !important;
	color: #6366f1 !important;
}

.tvt-variation-hint {
	margin: -8px 0 16px;
	padding: 10px 12px;
	background: #fff7ed;
	border-radius: 8px;
	color: #c2410c;
	font-size: 0.875rem;
	line-height: 1.4;
}

.tvt-preview {
	margin-bottom: 16px;
	text-align: center;
}

.tvt-preview img {
	max-width: 100%;
	max-height: 220px;
	border-radius: 12px;
	object-fit: contain;
	border: 2px solid #e2e8f0;
}

.tvt-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 16px;
}

.tvt-modal .tvt-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 45px;
	padding: 0 16px !important;
	margin: 0 !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
	letter-spacing: 1px;
	text-transform: uppercase;
	border-radius: 0 !important;
	border-width: 2px !important;
	border-style: solid !important;
	cursor: pointer;
	box-shadow: none !important;
	transform: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	text-decoration: none;
	overflow: visible;
	font-family: inherit;
}

.tvt-modal .tvt-btn:hover,
.tvt-modal .tvt-btn:focus {
	transform: none !important;
	box-shadow: none !important;
}

.tvt-modal .tvt-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 0;
}

.tvt-modal .tvt-btn__svg {
	display: block;
}

.tvt-modal .tvt-btn__text {
	line-height: 1.2;
}

.tvt-modal .tvt-btn--primary.button.alt {
	background-color: var(--tvt-modal-btn-color, #6366f1) !important;
	background: var(--tvt-modal-btn-color, #6366f1) !important;
	border-color: var(--tvt-modal-btn-border, #6366f1) !important;
	color: var(--tvt-modal-btn-text, #ffffff) !important;
}

.tvt-modal .tvt-btn--primary.button.alt:hover,
.tvt-modal .tvt-btn--primary.button.alt:focus {
	background-color: var(--tvt-modal-btn-hover, #4f46e5) !important;
	background: var(--tvt-modal-btn-hover, #4f46e5) !important;
	border-color: var(--tvt-modal-btn-hover-border, #4f46e5) !important;
	color: var(--tvt-modal-btn-text-hover, #ffffff) !important;
}

.tvt-modal .tvt-btn--primary:disabled,
.tvt-modal .tvt-btn--primary:disabled:hover {
	opacity: 0.55;
	cursor: not-allowed;
}

.tvt-modal .tvt-btn--secondary.button {
	background: var(--tvt-modal-secondary-bg, #ffffff) !important;
	border-color: var(--tvt-modal-secondary-border, #141414) !important;
	color: var(--tvt-modal-secondary-text, #141414) !important;
}

.tvt-modal .tvt-btn--secondary.button:hover,
.tvt-modal .tvt-btn--secondary.button:focus {
	background: var(--tvt-modal-secondary-hover-bg, #141414) !important;
	border-color: var(--tvt-modal-secondary-hover-bg, #141414) !important;
	color: var(--tvt-modal-secondary-hover-text, #ffffff) !important;
}

.tvt-btn--full {
	width: 100%;
}

.tvt-result-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 16px;
}

.tvt-previous-result {
	margin-top: 12px;
	padding: 12px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	background: #f8fafc;
}

.tvt-previous-result__title {
	margin: 0 0 8px;
	font-size: 13px;
	color: #334155;
}

.tvt-camera {
	margin-bottom: 16px;
	text-align: center;
}

.tvt-camera video {
	width: 100%;
	max-height: 280px;
	border-radius: 12px;
	background: #000;
}

.tvt-camera .tvt-btn {
	margin-top: 10px;
}

.tvt-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid #e2e8f0;
	border-top-color: #6366f1;
	border-radius: 50%;
	animation: tvt-spin 0.8s linear infinite;
	margin: 24px auto 16px;
}

@keyframes tvt-spin {
	to { transform: rotate(360deg); }
}

.tvt-loading-text {
	text-align: center;
	font-weight: 600;
	color: #334155;
	margin: 0;
	min-height: 1.5em;
	transition: opacity 0.35s ease;
}

.tvt-loading-text.tvt-loading-text--fade {
	opacity: 0.2;
}

.tvt-loading-hint {
	text-align: center;
	color: #94a3b8;
	font-size: 0.875rem;
	margin: 6px 0 24px;
}

.tvt-result-title {
	text-align: center;
	margin: 0 0 16px;
	color: #0f172a;
}

.tvt-result-message {
	margin: -8px 0 14px;
	text-align: center;
	font-weight: 600;
	color: #7c3aed;
}

.tvt-result-comparison {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 16px;
}

.tvt-result-comparison figure {
	margin: 0;
	text-align: center;
}

.tvt-result-comparison img {
	width: 100%;
	border-radius: 10px;
	border: 2px solid #e2e8f0;
	aspect-ratio: 3/4;
	object-fit: cover;
}

.tvt-result-comparison figcaption {
	margin-top: 6px;
	font-size: 0.8rem;
	color: #64748b;
}

.tvt-error {
	color: #dc2626;
	background: #fef2f2;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 0.9rem;
	margin-top: 12px;
}

.tvt-disclaimer {
	margin: 16px 0 0;
	font-size: 0.75rem;
	color: #94a3b8;
	text-align: center;
	line-height: 1.4;
}

.tvt-modal__credit {
	margin: 8px 0 0;
	font-size: 0.6875rem;
	color: #cbd5e1;
	text-align: center;
	line-height: 1.3;
}

.tvt-modal__credit a {
	color: inherit;
	text-decoration: none;
}

.tvt-modal__credit a:hover,
.tvt-modal__credit a:focus {
	color: #94a3b8;
	text-decoration: underline;
}

/* Modo oscuro del modal */
.tvt-modal--dark .tvt-modal__dialog {
	background: #111111;
	color: #ffffff;
}

.tvt-modal--dark .tvt-modal__title {
	color: #ffffff;
}

.tvt-modal--dark .tvt-modal__subtitle {
	color: #cbd5e1;
}

.tvt-modal--dark .tvt-modal__close {
	color: #94a3b8;
}

.tvt-modal--dark .tvt-modal__close:hover,
.tvt-modal--dark .tvt-modal__close:focus {
	color: #ffffff;
}

.tvt-modal--dark .tvt-modal__product {
	background: #1a1a1a;
}

.tvt-modal--dark .tvt-modal__product span {
	color: #e2e8f0;
}

.tvt-modal--dark .tvt-variation-hint {
	background: #1f2937;
	color: #fbbf24;
}

.tvt-modal--dark .tvt-preview img {
	border-color: #374151;
}

.tvt-modal--dark .tvt-previous-result {
	background: #1a1a1a;
	border-color: #374151;
}

.tvt-modal--dark .tvt-previous-result__title {
	color: #e2e8f0;
}

.tvt-modal--dark .tvt-loading-text {
	color: #e2e8f0;
}

.tvt-modal--dark .tvt-loading-hint {
	color: #94a3b8;
}

.tvt-modal--dark .tvt-result-title {
	color: #ffffff;
}

.tvt-modal--dark .tvt-result-comparison figcaption {
	color: #94a3b8;
}

.tvt-modal--dark .tvt-result-comparison img {
	border-color: #374151;
}

.tvt-modal--dark .tvt-disclaimer {
	color: #64748b;
}

.tvt-modal--dark .tvt-modal__credit {
	color: #64748b;
}

.tvt-modal--dark .tvt-modal__credit a:hover,
.tvt-modal--dark .tvt-modal__credit a:focus {
	color: #94a3b8;
}

.tvt-modal--dark .tvt-spinner {
	border-color: #374151;
	border-top-color: var(--tvt-modal-btn-color, #6366f1);
}

@media (max-width: 480px) {
	.tvt-actions {
		grid-template-columns: 1fr;
	}

	.tvt-result-comparison {
		grid-template-columns: 1fr;
	}
}
