/* ============================================================
   PEPTIDE CALCULATOR CSS
   
   SPECIFICITY RULE:
   - Plugin base styles: single class (.pcs-calc-card) — low specificity
   - Elementor widget selectors use {{WRAPPER}} which adds
     .elementor-element-XXXXX prefix — beats plugin styles
   - Elementor Advanced > Custom CSS uses selector() which also
     gets {{WRAPPER}} prefix — beats everything below
   - NO !important used here so Custom CSS works freely
   ============================================================ */

.peptide-calculator-wrapper {
	font-family: var(--pcs-font-body, 'Inter', sans-serif);
	width: 100%;
}

/* Outer card */
.pcs-calc-card {
	background: var(--pcs-card-bg, #4a7fb5);
	border-radius: 20px;
	padding: 30px;
	color: #fff;
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
	display: flex;
	flex-direction: column;
}

.pcs-calc-form {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

/* Sections */
.pcs-form-section {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

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

.pcs-section-title {
	font-size: 14px;
	font-weight: 500;
	opacity: 0.9;
	display: flex;
	align-items: center;
	gap: 8px;
}

.pcs-section-title .dashicons,
.pcs-section-title i {
	font-size: 16px;
	width: 16px;
	height: 16px;
	opacity: 0.85;
}

/* Form rows */
.pcs-form-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.pcs-form-row label {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

/* Inputs */
.pcs-input-dark {
	background: var(--pcs-input-bg, #25415c);
	border: none;
	border-radius: 25px;
	color: #fff;
	padding: 10px 22px;
	font-size: 16px;
	font-weight: 600;
	font-family: inherit;
	outline: none;
	transition: box-shadow 0.2s;
}

.pcs-input-dark:focus {
	box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.pcs-select-wrapper {
	flex-shrink: 0;
}

.pcs-select-full {
	width: 180px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
	text-align: center;
}

.pcs-input-with-unit {
	position: relative;
	width: 170px;
	flex-shrink: 0;
}

.pcs-input-with-unit input {
	width: 100%;
	padding-right: 46px;
	text-align: center;
	box-sizing: border-box;
}

.pcs-unit-text {
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	font-weight: 600;
	opacity: 0.8;
	pointer-events: none;
}

.pcs-input-split {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.pcs-input-split input {
	width: 100px;
	text-align: center;
}

.pcs-select-unit {
	width: 85px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	text-align: center;
	background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
	background-repeat: no-repeat;
	background-position: right 8px center;
	padding-right: 26px;
}

/* Add Peptide button */
.pcs-btn-add-peptide {
	background: #ffffff;
	color: #1e3b56;
	border: none;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: background 0.2s, color 0.2s;
	flex-shrink: 0;
}

.pcs-btn-add-peptide:hover {
	background: #e8edf2;
}

.pcs-btn-add-peptide .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.pcs-btn-remove-peptide {
	background: transparent;
	border: none;
	color: rgba(255,255,255,0.6);
	cursor: pointer;
	font-size: 18px;
	padding: 0 0 0 10px;
	line-height: 1;
	transition: color 0.2s;
}

.pcs-btn-remove-peptide:hover {
	color: #ff6b6b;
}

/* Save button */
.pcs-btn-light {
	background: #f4f6f8;
	color: #1e3b56;
	border: none;
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: background 0.2s, color 0.2s;
}

.pcs-btn-light:hover {
	background: #ffffff;
}

/* Results box */
.pcs-results-box {
	margin-top: 30px;
	background: #2d5278;
	border-radius: 15px;
	padding: 20px 24px;
}

.pcs-calc-card > .pcs-results-box {
	margin-top: 30px;
}

.pcs-scale-header {
	display: flex;
	justify-content: space-between;
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 14px;
	color: #fff;
}

.pcs-visual-scale {
	margin-bottom: 20px;
}

.pcs-scale-track {
	height: 32px;
	background: #7fa8c9;
	position: relative;
	border-radius: 3px;
	display: flex;
	overflow: visible;
}

.pcs-scale-fill {
	background: #1a3550;
	height: 100%;
	transition: width 0.3s ease;
	border-radius: 3px 0 0 3px;
	position: relative;
	z-index: 1;
}

.pcs-scale-markers {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 2;
}

.pcs-marker {
	position: absolute;
	top: 0;
	width: 1px;
	height: 8px;
	background: rgba(255,255,255,0.7);
}

.pcs-marker.major {
	height: 14px;
	background: rgba(255,255,255,0.9);
}

.pcs-marker-label {
	position: absolute;
	top: 16px;
	transform: translateX(-50%);
	font-size: 11px;
	color: #c8dce9;
	font-weight: 500;
	white-space: nowrap;
}

.pcs-result-bullets {
	margin-bottom: 18px;
}

.pcs-result-bullets ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pcs-result-bullets li {
	position: relative;
	padding-left: 18px;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 600;
	color: #fff;
}

.pcs-result-bullets li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 9px;
	width: 6px;
	height: 6px;
	background: #fff;
	border-radius: 50%;
}

.pcs-save-action {
	display: flex;
	justify-content: flex-end;
}

/* Hide spinners */
.peptide-calc-suite-wrapper input[type="number"]::-webkit-inner-spin-button,
.peptide-calc-suite-wrapper input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.peptide-calc-suite-wrapper input[type="number"] {
	-moz-appearance: textfield;
}

/* ============================================================
   RESPONSIVE
   Breakpoints follow Elementor's default device split:
   - Tablet : max-width 1024px
   - Mobile : max-width 767px
   - Small mobile : max-width 380px (fine‑tuning only)
   ============================================================ */

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.pcs-calc-card {
		padding: 24px;
	}
	.pcs-calc-form {
		gap: 20px;
	}
	.pcs-form-row label {
		font-size: 19px;
	}
	.pcs-select-full {
		width: 160px;
	}
	.pcs-input-with-unit {
		width: 150px;
	}
	.pcs-input-split input {
		width: 90px;
	}
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.pcs-calc-card {
		padding: 18px;
		border-radius: 16px;
	}
	.pcs-calc-form {
		gap: 18px;
	}
	.pcs-form-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.pcs-form-row label {
		font-size: 17px;
	}
	.pcs-section-header {
		flex-wrap: wrap;
		gap: 8px;
	}
	.pcs-input-with-unit,
	.pcs-input-split,
	.pcs-select-wrapper,
	.pcs-select-full {
		width: 100%;
	}
	.pcs-input-with-unit input,
	.pcs-input-dark.pcs-select-full {
		width: 100%;
		box-sizing: border-box;
	}
	.pcs-input-split input {
		flex: 1;
		width: auto;
	}
	.pcs-btn-add-peptide {
		font-size: 11px;
		padding: 7px 12px;
	}
	.pcs-results-box {
		margin-top: 20px;
		padding: 16px 18px;
	}
	.pcs-calc-card > .pcs-results-box {
		margin-top: 20px;
	}
	.pcs-scale-header {
		font-size: 14px;
	}
	.pcs-scale-track {
		height: 26px;
	}
	.pcs-marker-label {
		font-size: 9px;
	}
	.pcs-result-bullets li {
		font-size: 13px;
	}
	.pcs-save-action {
		justify-content: stretch;
	}
	.pcs-btn-light {
		width: 100%;
		justify-content: center;
	}
}

/* ---------- Small mobile fine‑tuning ---------- */
@media (max-width: 380px) {
	.pcs-calc-card {
		padding: 14px;
	}
	.pcs-form-row label {
		font-size: 15px;
	}
	.pcs-marker-label {
		font-size: 8px;
	}
}
