/**
 * Digital Card 3D Flip & Hardware Styling
 *
 * @package DigitalCardAndBand
 * @author  Farhan
 */

:root {
	--dcb-card-width: 380px;
	--dcb-card-height: 240px;
	--dcb-card-radius: 16px;
}

/* 3D Scene Container */
.dcb-interactive-card-component {
	display: inline-block;
	max-width: 100%;
	perspective: 1200px;
	margin: 0 auto;
	user-select: none;
}

.dcb-card-3d-scene {
	width: var(--dcb-card-width);
	max-width: 90vw;
	height: var(--dcb-card-height);
	position: relative;
	margin: 0 auto;
	cursor: pointer;
}

.dcb-card-3d-flipper {
	width: 100%;
	height: 100%;
	position: relative;
	transform-style: preserve-3d;
	transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
	border-radius: var(--dcb-card-radius);
	box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.35), 0 0 1px 1px rgba(255, 255, 255, 0.1);
}

.dcb-interactive-card-component.flipped .dcb-card-3d-flipper {
	transform: rotateY(180deg);
}

/* Base Card Face */
.dcb-card-side {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	border-radius: inherit;
	border: 1px solid rgba(255, 255, 255, 0.15);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 22px 26px;
	box-sizing: border-box;
}

/* Holographic dynamic light overlay */
.dcb-card-shine {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
	pointer-events: none;
	border-radius: inherit;
}

/* Front Side Layout */
.dcb-card-front {
	z-index: 2;
	transform: rotateY(0deg);
}

.dcb-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.dcb-card-chip {
	width: 44px;
	height: 34px;
	border-radius: 6px;
	overflow: hidden;
}

.dcb-chip-icon {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.dcb-card-nfc {
	width: 24px;
	height: 24px;
	opacity: 0.75;
}

.dcb-nfc-icon {
	width: 100%;
	height: 100%;
	filter: invert(1);
}

.dcb-card-logo-container {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 0;
}

.dcb-card-logo-wrap {
	max-width: 160px;
	max-height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dcb-card-logo-img {
	max-width: 100%;
	max-height: 75px;
	object-fit: contain;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.dcb-card-footer {
	display: flex;
	align-items: center;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.5px;
	opacity: 0.9;
}

.dcb-card-website-text {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.08);
	padding: 4px 12px;
	border-radius: 20px;
	backdrop-filter: blur(4px);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.dcb-web-url {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 240px;
}

/* Back Side Layout */
.dcb-card-back {
	transform: rotateY(180deg);
	padding: 0;
}

.dcb-card-magstripe {
	width: 100%;
	height: 38px;
	background: #09090b;
	margin-top: 20px;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.dcb-card-back-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 24px;
	flex: 1;
	gap: 16px;
}

.dcb-card-name-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dcb-card-customer-name {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5px;
	line-height: 1.25;
	word-break: break-word;
}

.dcb-card-tagline {
	font-size: 11px;
	opacity: 0.7;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.dcb-card-qr-container {
	flex-shrink: 0;
}

.dcb-qr-frame {
	background: #ffffff;
	padding: 6px;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
	line-height: 0;
}

.dcb-card-qr-img {
	width: 95px;
	height: 95px;
	display: block;
	object-fit: contain;
}

.dcb-card-back-footer {
	padding: 8px 24px 14px 24px;
	display: flex;
	justify-content: flex-end;
}

.dcb-brand-signature {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 2px;
	opacity: 0.5;
}

/* Flip Controls */
.dcb-card-flip-controls {
	margin-top: 14px;
	text-align: center;
}

.dcb-btn-flip-card {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(15, 23, 42, 0.85);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dcb-btn-flip-card:hover {
	background: #0284c7;
	border-color: #38bdf8;
	transform: translateY(-1px);
}

/* Side by Side Layout */
.dcb-cards-side-by-side {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	justify-content: center;
}

.dcb-card-viewport {
	width: var(--dcb-card-width);
	max-width: 100%;
}

.dcb-card-label {
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	text-align: center;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.dcb-card-single-wrapper {
	width: var(--dcb-card-width);
	max-width: 100%;
	height: var(--dcb-card-height);
	position: relative;
	border-radius: var(--dcb-card-radius);
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
}

.dcb-card-single-wrapper .dcb-card-side {
	position: relative;
	transform: none !important;
}

/* Responsive */
@media (max-width: 480px) {
	:root {
		--dcb-card-width: 320px;
		--dcb-card-height: 202px;
	}
	.dcb-card-customer-name {
		font-size: 15px;
	}
	.dcb-card-qr-img {
		width: 75px;
		height: 75px;
	}
}
