/**
 * Frontend CSS for TP Fragrance Percent Plugin
 */

/* ===========================
   Base Styles
   =========================== */

.tp-fragrance-display {
	margin: 30px 0;
	padding: 25px 0;
	background: #fff;
	border-radius: 8px;
}

.tp-fragrance-title {
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 25px 0;
	color: #333;
	text-align: right;
}

.tp-fragrance-bars {
	max-width: 400px;
	margin: 0;
}

.tp-fragrance-bar-wrapper {
	margin-bottom: 20px;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.tp-fragrance-bar-wrapper.animated {
	opacity: 1;
	transform: translateY(0);
}

.tp-fragrance-bar-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.tp-ingredient-name {
    font-size: 12px;
    color: #333;
    line-height: 1;
    position: absolute;
    top: calc(50% - 6px);
    z-index: 1;
    right: 5px;
}

.tp-fragrance-bar-container {
	position: relative;
	width: 100%;
	height: 30px;
	background: #f0f0f0;
	border-radius: 15px;
	overflow: hidden;
}

.tp-fragrance-bar {
	height: 100%;
	width: 0%;
	transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 12px;
}

.tp-bar-inner {
	display: block;
	width: 100%;
	height: 100%;
}

/* ===========================
   Style 1: Elegant (Default)
   =========================== */

.tp-style-elegant .tp-fragrance-display {
	background: #fafbfc;
	border: 2px solid #e8eaed;
	box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.tp-style-elegant .tp-fragrance-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-size: 19px;
	color: #34495e;
	font-weight: 500;
}

.tp-style-elegant .tp-fragrance-bar-container {
	background: #f0f2f5;
	border-radius: 6px;
	height: 35px;
}

.tp-style-elegant .tp-fragrance-bar {
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.tp-style-elegant .tp-bar-inner {
	background: linear-gradient(90deg,
		rgba(255,255,255,0.35) 0%,
		rgba(255,255,255,0) 100%);
}

.tp-style-elegant .tp-ingredient-name {
	font-weight: 500;
	text-transform: capitalize;
}

/* ===========================
   Style 2: Modern
   =========================== */

.tp-style-modern .tp-fragrance-display {
	background: #ffffff;
	border: 2px solid #e0e0e0;
	box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.tp-style-modern .tp-fragrance-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 20px;
	color: #2c3e50;
}

.tp-style-modern .tp-fragrance-bar-container {
	background: #ecf0f1;
	border-radius: 4px;
	height: 35px;
}

.tp-style-modern .tp-fragrance-bar {
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tp-style-modern .tp-bar-inner {
	background: linear-gradient(90deg,
		rgba(255,255,255,0.4) 0%,
		rgba(255,255,255,0) 100%);
}

.tp-style-modern .tp-ingredient-name {
	font-weight: 600;
	text-transform: capitalize;
}

/* ===========================
   Style 3: Minimal
   =========================== */

.tp-style-minimal .tp-fragrance-display {
	background: #ffffff;
	border: 1px solid #f0f0f0;
	box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.tp-style-minimal .tp-fragrance-title {
	font-size: 18px;
	color: #222;
	font-weight: 400;
}

.tp-style-minimal .tp-fragrance-bar-container {
	background: #f8f9fa;
	border-radius: 3px;
	height: 20px;
}

.tp-style-minimal .tp-fragrance-bar {
	border-radius: 3px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.tp-style-minimal .tp-bar-inner {
	background: linear-gradient(90deg,
		rgba(255,255,255,0.3) 0%,
		rgba(255,255,255,0) 100%);
}

.tp-style-minimal .tp-ingredient-name {
	font-weight: 400;
	text-transform: capitalize;
}

.tp-style-minimal .tp-fragrance-bar-wrapper {
	margin-bottom: 8px;
}

/* ===========================
   Style 4: Bold
   =========================== */

.tp-style-bold .tp-fragrance-display {
	background: #2c3e50;
	border: 2px solid #34495e;
	box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.tp-style-bold .tp-fragrance-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-transform: uppercase;
	letter-spacing: 2.5px;
	font-size: 22px;
	color: #ecf0f1;
	font-weight: 700;
}

.tp-style-bold .tp-fragrance-bar-container {
	background: #1a252f;
	border-radius: 5px;
	height: 38px;
}

.tp-style-bold .tp-fragrance-bar {
	border-radius: 5px;
	box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

.tp-style-bold .tp-bar-inner {
	background: linear-gradient(90deg,
		rgba(255,255,255,0.25) 0%,
		rgba(255,255,255,0) 100%);
}

.tp-style-bold .tp-ingredient-name {
	font-weight: 600;
	text-transform: capitalize;
	color: #ecf0f1;
}

.tp-style-bold .tp-fragrance-bar-wrapper {
	margin-bottom: 22px;
}

/* ===========================
   Responsive Design
   =========================== */

@media screen and (max-width: 768px) {
	.tp-fragrance-display {
		padding: 20px 15px;
	}

	.tp-fragrance-title {
		font-size: 20px;
		margin-bottom: 20px;
	}

	.tp-fragrance-bars {
		max-width: 100%;
	}

	.tp-ingredient-name {
		font-size: 14px;
	}

	.tp-fragrance-bar-container {
		height: 28px;
	}

	.tp-style-elegant .tp-fragrance-bar-container,
	.tp-style-modern .tp-fragrance-bar-container {
		height: 30px;
	}

	.tp-style-bold .tp-fragrance-bar-container {
		height: 32px;
	}
}

@media screen and (max-width: 480px) {
	.tp-fragrance-display {
		padding: 15px 0;
		margin: 20px 0;
	}

	.tp-fragrance-title {
		font-size: 18px;
	}

	.tp-ingredient-name {
		font-size: 13px;
	}

	.tp-fragrance-bar-wrapper {
		margin-bottom: 15px;
	}
}

/* ===========================
   RTL Support
   =========================== */

body.rtl .tp-fragrance-display {
	direction: rtl;
}

body.rtl .tp-fragrance-bar {
	padding-right: 0;
	padding-left: 12px;
	justify-content: flex-start;
}



/* ===========================
   Bottle Display Styles
   =========================== */

/* Bottle Container */
.tp-bottle-container {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px 20px;
	min-height: 500px;
}

.tp-bottle-wrapper {
	display: flex;
	align-items: center;
	gap: 60px;
	max-width: 800px;
	width: 100%;
}

/* Bottle Structure */
.tp-bottle {
	position: relative;
	width: 150px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Bottle Cap */
.tp-bottle-cap {
	width: 60px;
	height: 35px;
	background: #d4d4d4;
	border-radius: 50% 50% 0 0;
	position: relative;
	z-index: 10;
}

.tp-bottle-cap::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 50px;
	height: 4px;
	background: #c0c0c0;
	border-radius: 2px;
}

/* Bottle Neck */
.tp-bottle-neck {
	width: 50px;
	height: 25px;
	background: #e0e0e0;
	position: relative;
	z-index: 9;
}

.tp-bottle-neck::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 55px;
	height: 5px;
	background: #c8c8c8;
	border-radius: 2px;
}

/* Bottle Body */
.tp-bottle-body {
	width: 150px;
	height: 280px;
	background: #e8e8e8;
	border-radius: 8px;
	position: relative;
	overflow: hidden;
}

/* Glass Effect Overlay - Removed for skeleton style */
.tp-bottle-glass {
	display: none;
}

/* Liquid Container */
.tp-bottle-liquid {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	top: 0;
	display: flex;
	flex-direction: column-reverse;
	z-index: 1;
}

/* Individual Liquid Layers */
.tp-liquid-layer {
	width: 100%;
	height: 0;
	transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	border-top: 1px solid rgba(255,255,255,0.2);
	flex-shrink: 0;
}

.tp-liquid-layer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100%;
	background: linear-gradient(90deg,
		rgba(0,0,0,0.1) 0%,
		transparent 20%,
		rgba(255,255,255,0.3) 50%,
		transparent 80%,
		rgba(0,0,0,0.1) 100%);
	pointer-events: none;
}

/* Bottle Labels */
.tp-bottle-labels {
	display: flex;
	flex-direction: column;
	gap: 20px;
	flex: 1;
}

.tp-bottle-label {
	display: flex;
	align-items: center;
	gap: 15px;
	opacity: 0;
	transform: translateX(20px);
	animation: labelFadeIn 0.6s ease forwards;
}


.tp-bottle-label[data-index="0"] { animation-delay: 0.3s; }
.tp-bottle-label[data-index="1"] { animation-delay: 0.5s; }
.tp-bottle-label[data-index="2"] { animation-delay: 0.7s; }
.tp-bottle-label[data-index="3"] { animation-delay: 0.9s; }
.tp-bottle-label[data-index="4"] { animation-delay: 1.1s; }
.tp-bottle-label[data-index="5"] { animation-delay: 1.3s; }
.tp-bottle-label[data-index="6"] { animation-delay: 1.5s; }
.tp-bottle-label[data-index="7"] { animation-delay: 1.7s; }

.tp-label-line {
	display: block;
	width: 40px;
	height: 0;
	border-bottom: 2px solid;
	position: relative;
}

.tp-label-line::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	border: 2px solid #fff;
}

.tp-label-text {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-weight: 500;
	text-transform: capitalize;
}

/* Label Fade In Animation */
@keyframes labelFadeIn {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ===========================
   Bottle Style: Classic
   =========================== */

.tp-style-bottle-classic .tp-fragrance-display {
	background: #ffffff;
	padding: 40px 20px;
}

.tp-style-bottle-classic .tp-fragrance-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-size: 22px;
	color: #2c3e50;
	font-weight: 500;
	text-align: center;
	margin-bottom: 30px;
}

.tp-style-bottle-classic .tp-bottle-cap {
	background: #d4d4d4;
	width: 65px;
	height: 40px;
}

.tp-style-bottle-classic .tp-bottle-cap::before {
	background: #bfbfbf;
	width: 55px;
	height: 5px;
}

.tp-style-bottle-classic .tp-bottle-neck {
	background: #e0e0e0;
	width: 55px;
	height: 30px;
}

.tp-style-bottle-classic .tp-bottle-neck::after {
	background: #c8c8c8;
	width: 60px;
	height: 6px;
}

.tp-style-bottle-classic .tp-bottle-body {
	background: #e8e8e8;
	border-radius: 10px;
}

/* ===========================
   Bottle Style: Modern
   =========================== */

.tp-style-bottle-modern .tp-fragrance-display {
	background: #fafafa;
	padding: 40px 20px;
}

.tp-style-bottle-modern .tp-fragrance-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 20px;
	color: #2c3e50;
	font-weight: 600;
	text-align: center;
	margin-bottom: 30px;
}

.tp-style-bottle-modern .tp-bottle {
	width: 140px;
}

.tp-style-bottle-modern .tp-bottle-cap {
	background: #cccccc;
	width: 60px;
	height: 32px;
	border-radius: 4px 4px 0 0;
}

.tp-style-bottle-modern .tp-bottle-cap::before {
	background: #b8b8b8;
	width: 50px;
	height: 3px;
}

.tp-style-bottle-modern .tp-bottle-neck {
	background: #dadada;
	width: 50px;
	height: 22px;
}

.tp-style-bottle-modern .tp-bottle-neck::after {
	background: #c0c0c0;
	width: 55px;
	height: 4px;
}

.tp-style-bottle-modern .tp-bottle-body {
	background: #e0e0e0;
	width: 140px;
	height: 280px;
	border-radius: 6px;
}

/* ===========================
   Bottle Responsive Design
   =========================== */

@media screen and (max-width: 768px) {
	.tp-bottle-wrapper {
		flex-direction: column;
		gap: 40px;
	}

	.tp-bottle-labels {
		width: 100%;
		max-width: 300px;
	}

	.tp-bottle-container {
		min-height: auto;
		padding: 30px 15px;
	}
}

@media screen and (max-width: 480px) {
	.tp-bottle {
		width: 120px;
		transform: scale(0.9);
	}

	.tp-style-bottle-modern .tp-bottle {
		width: 110px;
	}

	.tp-bottle-body {
		height: 250px;
	}

	.tp-label-text {
		font-size: 14px;
	}

	.tp-label-line {
		width: 30px;
	}
}

/* ===========================
   RTL Support for Bottle
   =========================== */

body.rtl .tp-bottle-wrapper {
	flex-direction: row-reverse;
}

body.rtl .tp-bottle-label {
	flex-direction: row-reverse;
	transform: translateX(-20px);
}

body.rtl .tp-bottle-label {
	animation: labelFadeInRTL 0.6s ease forwards;
}

@keyframes labelFadeInRTL {
	from {
		opacity: 0;
		transform: translateX(-20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

body.rtl .tp-label-line::after {
	right: auto;
	left: 0;
}


/* ===========================
   Pie Chart Display
   =========================== */

.tp-style-pie-chart .tp-fragrance-display {
	background: #ffffff;
	padding: 40px 20px;
}

.tp-style-pie-chart .tp-fragrance-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 22px;
	color: #2c3e50;
	font-weight: 600;
	text-align: center;
	margin-bottom: 30px;
}

.tp-pie-container {
	position: relative;
	width: 400px;
	height: 400px;
	margin: 0 auto;
}

.tp-pie-chart {
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.tp-pie-slice {
	cursor: pointer;
	transition: opacity 0.8s ease;
	transform-origin: center;
}

/* Pie Labels - Inside the pie */
.tp-pie-labels {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.tp-pie-label {
	position: absolute;
	transform: translate(-50%, -50%);
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0,0,0,0.3);
	opacity: 0;
	animation: fadeInLabel 0.5s ease forwards;
	line-height: 1.2;
	max-width: 80px;
	word-wrap: break-word;
}

.tp-pie-label:nth-child(1) { animation-delay: 0.3s; }
.tp-pie-label:nth-child(2) { animation-delay: 0.4s; }
.tp-pie-label:nth-child(3) { animation-delay: 0.5s; }
.tp-pie-label:nth-child(4) { animation-delay: 0.6s; }
.tp-pie-label:nth-child(5) { animation-delay: 0.7s; }
.tp-pie-label:nth-child(6) { animation-delay: 0.8s; }

@keyframes fadeInLabel {
	to {
		opacity: 1;
	}
}

/* ===========================
   Circular Progress Display
   =========================== */

.tp-style-circular-progress .tp-fragrance-display {
	background: #ffffff;
	padding: 40px 20px;
}

.tp-style-circular-progress .tp-fragrance-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 22px;
	color: #2c3e50;
	font-weight: 600;
	text-align: center;
	margin-bottom: 30px;
}

.tp-circular-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 30px;
	justify-items: center;
	max-width: 800px;
	margin: 0 auto;
}

.tp-circular-item {
	position: relative;
	width: 150px;
	height: 150px;
	opacity: 0;
	transform: scale(0.8);
	animation: scaleIn 0.6s ease forwards;
}

.tp-circular-item:nth-child(1) { animation-delay: 0.1s; }
.tp-circular-item:nth-child(2) { animation-delay: 0.2s; }
.tp-circular-item:nth-child(3) { animation-delay: 0.3s; }
.tp-circular-item:nth-child(4) { animation-delay: 0.4s; }
.tp-circular-item:nth-child(5) { animation-delay: 0.5s; }
.tp-circular-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes scaleIn {
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.tp-circular-svg {
	width: 100%;
	height: 100%;
}

.tp-circular-progress {
	transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tp-circular-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	width: 80%;
}

.tp-circular-name {
	font-size: 14px;
	font-weight: 600;
	color: #2c3e50;
	line-height: 1.2;
	word-wrap: break-word;
}

.tp-circular-percentage {
	display: none; /* Hide percentage */
}

/* Responsive for Circular Progress */
@media screen and (max-width: 768px) {
	.tp-circular-container {
		grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
		gap: 20px;
	}

	.tp-circular-item {
		width: 120px;
		height: 120px;
	}

	.tp-circular-name {
		font-size: 12px;
	}
}

/* Responsive for Pie Chart */
@media screen and (max-width: 768px) {
	.tp-pie-container {
		width: 300px;
		height: 300px;
	}

	.tp-pie-label {
		font-size: 11px;
		max-width: 60px;
	}
}

