/**
 * Vendora Vendor Widget – Sidebar
 *
 * Premium card: avatar, vendor name, address, View store button.
 *
 * @package Vendora
 * @since   1.0.0
 */

/* ── Variables ─────────────────────────────────────────────────────────── */
.vendora-vw,
.widget_vendora_vendor {
	--vendora-vw-accent:     #7c3aed;
	--vendora-vw-accent-h:  #6d28d9;
	--vendora-vw-text:      #1e293b;
	--vendora-vw-muted:      #64748b;
	--vendora-vw-border:    #e2e8f0;
	--vendora-vw-bg:        #ffffff;
	--vendora-vw-radius:    14px;
	--vendora-vw-radius-sm:  10px;
	--vendora-vw-shadow:    0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	--vendora-vw-shadow-h:  0 8px 24px rgba(124, 58, 237, 0.12);
	--vendora-vw-transition: 0.2s ease;
}

/* ── Wrapper ───────────────────────────────────────────────────────────── */
.vendora-vw {
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--vendora-vw-text);
}

.vendora-vw__card {
	background: var(--vendora-vw-bg);
	border: 1px solid var(--vendora-vw-border);
	border-radius: var(--vendora-vw-radius);
	box-shadow: var(--vendora-vw-shadow);
	overflow: hidden;
	padding: 20px;
	transition: box-shadow var(--vendora-vw-transition), border-color var(--vendora-vw-transition);
}

.vendora-vw__card:hover {
	box-shadow: var(--vendora-vw-shadow-h);
	border-color: rgba(124, 58, 237, 0.2);
}

/* ── Avatar ─────────────────────────────────────────────────────────────── */
.vendora-vw__avatar-wrap {
	text-align: center;
	margin-bottom: 14px;
}

.vendora-vw__avatar-link {
	display: inline-block;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
	transition: transform var(--vendora-vw-transition), box-shadow var(--vendora-vw-transition);
}

.vendora-vw__avatar-link:hover {
	transform: scale(1.04);
	box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
}

.vendora-vw__avatar {
	display: block;
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 50%;
	background: #f1f5f9;
}

/* When avatar is not a link (no store URL) */
.vendora-vw__avatar-wrap img.vendora-vw__avatar {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.vendora-vw__body {
	text-align: center;
}

.vendora-vw__name {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin-bottom: 6px;
	line-height: 1.3;
}

.vendora-vw__name-link {
	color: var(--vendora-vw-text);
	text-decoration: none;
	transition: color var(--vendora-vw-transition);
}

.vendora-vw__name-link:hover {
	color: var(--vendora-vw-accent);
}

/* ── Address ─────────────────────────────────────────────────────────────── */
.vendora-vw__address {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 6px;
	margin-bottom: 14px;
	font-size: 13px;
	color: var(--vendora-vw-muted);
	line-height: 1.45;
}

.vendora-vw__address-icon {
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	margin-top: 2px;
	background: currentColor;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	opacity: 0.85;
}

.vendora-vw__address-text {
	text-align: left;
	max-width: 100%;
	word-break: break-word;
}

/* ── Button ──────────────────────────────────────────────────────────────── */
.vendora-vw__actions {
	margin-top: 4px;
}

.vendora-vw__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 20px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	color: #fff;
	background: linear-gradient(135deg, var(--vendora-vw-accent) 0%, var(--vendora-vw-accent-h) 100%);
	border: none;
	border-radius: var(--vendora-vw-radius-sm);
	box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
	transition: transform var(--vendora-vw-transition), box-shadow var(--vendora-vw-transition), opacity var(--vendora-vw-transition);
	cursor: pointer;
}

.vendora-vw__btn::after {
	content: '';
	width: 14px;
	height: 14px;
	background: currentColor;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	opacity: 0.9;
}

.vendora-vw__btn:hover {
	color: #fff;
	opacity: 0.95;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.vendora-vw__btn:active {
	transform: translateY(0);
}

/* ── Widget title spacing (WordPress sidebar) ────────────────────────────── */
.widget_vendora_vendor .widget-title {
	margin-bottom: 12px;
}

.widget_vendora_vendor .vendora-vw {
	margin-top: 0;
}
