/*!
 * Percentage Calculator — module CSS (e2z-pct- prefix).
 * Color scheme (spec): Primary #22C55E (percent green), Secondary #1E293B,
 * Accent #F97316 (orange), BG #F0FDF4.
 * Scope: .e2z-tool-percentage-calculator (framework shortcode wrapper).
 */

.e2z-tool-percentage-calculator,
.e2z-tool-percentage-calculator *,
.e2z-tool-percentage-calculator *::before,
.e2z-tool-percentage-calculator *::after {
	box-sizing: border-box;
}

.e2z-tool-percentage-calculator .e2z-pct-container {
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	line-height: 1.5;
	color: #1E293B;
	width: 100%;
	margin: 0 auto;
	background: #F0FDF4;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(34, 197, 94, 0.16);
	overflow: hidden;
}

.e2z-tool-percentage-calculator .e2z-pct-mono,
.e2z-tool-percentage-calculator .e2z-pct-stat-value,
.e2z-tool-percentage-calculator .e2z-pct-formula,
.e2z-tool-percentage-calculator .e2z-pct-table td {
	font-family: 'SF Mono', 'Courier New', ui-monospace, Menlo, Consolas, monospace;
}

.e2z-tool-percentage-calculator .e2z-pct-header {
	padding: 22px 16px;
	background: linear-gradient(135deg, #1E293B, #15803D);
	color: #fff;
	text-align: center;
	border-bottom: 3px solid #F97316;
}
.e2z-tool-percentage-calculator .e2z-pct-title {
	font-size: 1.45rem;
	font-weight: 700;
	margin: 0 0 4px;
	color: #fff;
}
.e2z-tool-percentage-calculator .e2z-pct-subtitle {
	font-size: 0.82rem;
	opacity: 0.86;
	margin: 0;
}

.e2z-tool-percentage-calculator .e2z-pct-body { padding: 16px; }

.e2z-tool-percentage-calculator .e2z-pct-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 14px;
	background: #DCFCE7;
	padding: 4px;
	border-radius: 8px;
	flex-wrap: wrap;
}
.e2z-tool-percentage-calculator .e2z-pct-tab {
	flex: 1;
	min-width: 96px;
	min-height: 44px;
	padding: 10px 5px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: #15803D;
	font-family: inherit;
	font-size: 0.79rem;
	font-weight: 600;
	cursor: pointer;
}
.e2z-tool-percentage-calculator .e2z-pct-tab-active { background: #22C55E; color: #fff; }

.e2z-tool-percentage-calculator .e2z-pct-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}
.e2z-tool-percentage-calculator .e2z-pct-field {
	flex: 1;
	min-width: 140px;
	display: flex;
	flex-direction: column;
	margin-bottom: 12px;
}
.e2z-tool-percentage-calculator .e2z-pct-row .e2z-pct-field { margin-bottom: 0; }
.e2z-tool-percentage-calculator .e2z-pct-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #15803D;
	margin-bottom: 4px;
}
.e2z-tool-percentage-calculator .e2z-pct-hint {
	font-size: 0.73rem;
	color: #86EFAC;
	margin: 4px 0 10px;
	line-height: 1.45;
	display: block;
}
.e2z-tool-percentage-calculator .e2z-pct-input {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #BBF7D0;
	border-radius: 6px;
	font-size: 0.95rem;
	background: #fff;
	color: #1E293B;
	font-family: inherit;
}
.e2z-tool-percentage-calculator .e2z-pct-input:focus {
	outline: none;
	border-color: #F97316;
	box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.e2z-tool-percentage-calculator .e2z-pct-chain-row {
	display: flex;
	gap: 8px;
	align-items: flex-end;
	margin-bottom: 8px;
	padding: 8px;
	background: #F0FDF4;
	border: 1px solid #BBF7D0;
	border-left: 3px solid #F97316;
	border-radius: 8px;
	flex-wrap: wrap;
}
.e2z-tool-percentage-calculator .e2z-pct-chain-row .e2z-pct-field { min-width: 110px; margin-bottom: 0; }
.e2z-tool-percentage-calculator .e2z-pct-chain-name-field { flex: 1.5; }
.e2z-tool-percentage-calculator .e2z-pct-chain-del {
	min-height: 44px;
	min-width: 44px;
	border: 1px solid #FCA5A5;
	border-radius: 6px;
	background: #FEF2F2;
	color: #DC2626;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
}
.e2z-tool-percentage-calculator .e2z-pct-chain-del:hover { background: #DC2626; color: #fff; }

.e2z-tool-percentage-calculator .e2z-pct-add-step-btn {
	min-height: 44px;
	padding: 10px 18px;
	border: 1px dashed #F97316;
	border-radius: 8px;
	background: #fff;
	color: #C2410C;
	font-family: inherit;
	font-size: 0.86rem;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.e2z-tool-percentage-calculator .e2z-pct-add-step-btn:hover { background: #FFF7ED; }

.e2z-tool-percentage-calculator .e2z-pct-calc-btn {
	width: 100%;
	min-height: 48px;
	padding: 13px;
	border: none;
	border-radius: 8px;
	background: #22C55E;
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: filter 0.15s ease;
	margin-bottom: 14px;
}
.e2z-tool-percentage-calculator .e2z-pct-calc-btn:hover { filter: brightness(1.08); }
.e2z-tool-percentage-calculator .e2z-pct-calc-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.55);
}

.e2z-tool-percentage-calculator .e2z-pct-empty-state {
	padding: 24px;
	text-align: center;
	color: #86EFAC;
	background: #F0FDF4;
	border-radius: 8px;
}
.e2z-tool-percentage-calculator .e2z-pct-hero {
	border-radius: 10px;
	padding: 16px;
	text-align: center;
	margin-bottom: 14px;
	background: #1E293B;
	border-bottom: 3px solid #F97316;
}
.e2z-tool-percentage-calculator .e2z-pct-hero-value {
	font-size: 2rem;
	font-weight: 800;
	margin: 4px 0;
	line-height: 1.15;
	color: #4ADE80;
	font-family: 'SF Mono', 'Courier New', ui-monospace, monospace;
	word-break: break-word;
}
.e2z-tool-percentage-calculator .e2z-pct-hero-label {
	font-size: 0.83rem;
	font-weight: 600;
	color: #FDBA74;
	margin: 0;
}
.e2z-tool-percentage-calculator .e2z-pct-badge {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 800;
	margin-top: 6px;
	background: #DCFCE7;
	color: #15803D;
}
.e2z-tool-percentage-calculator .e2z-pct-badge-up { background: #DCFCE7; color: #15803D; }
.e2z-tool-percentage-calculator .e2z-pct-badge-down { background: #FEE2E2; color: #B91C1C; }

.e2z-tool-percentage-calculator .e2z-pct-result-block {
	background: #F0FDF4;
	border: 1px solid #BBF7D0;
	border-radius: 10px;
	padding: 14px;
	margin-bottom: 12px;
}
.e2z-tool-percentage-calculator .e2z-pct-result-block h3 {
	font-size: 0.98rem;
	color: #1E293B;
	margin: 0 0 10px;
}
.e2z-tool-percentage-calculator .e2z-pct-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 10px;
}
.e2z-tool-percentage-calculator .e2z-pct-stat {
	background: #fff;
	border: 1px solid #BBF7D0;
	border-radius: 8px;
	padding: 10px;
	text-align: center;
}
.e2z-tool-percentage-calculator .e2z-pct-stat-label {
	font-size: 0.72rem;
	font-weight: 600;
	color: #86EFAC;
	margin: 0 0 3px;
	font-family: 'Inter', system-ui, sans-serif;
}
.e2z-tool-percentage-calculator .e2z-pct-stat-value {
	font-size: 1.08rem;
	font-weight: 700;
	color: #1E293B;
	margin: 0;
	word-break: break-word;
}
.e2z-tool-percentage-calculator .e2z-pct-stat-green .e2z-pct-stat-value { color: #15803D; }
.e2z-tool-percentage-calculator .e2z-pct-stat-orange .e2z-pct-stat-value { color: #C2410C; }

.e2z-tool-percentage-calculator .e2z-pct-table-wrap { width: 100%; overflow-x: auto; }
.e2z-tool-percentage-calculator .e2z-pct-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.79rem;
	background: #fff;
}
.e2z-tool-percentage-calculator .e2z-pct-table th {
	background: #1E293B;
	color: #4ADE80;
	padding: 8px 6px;
	text-align: center;
	font-weight: 600;
	white-space: nowrap;
	font-family: 'Inter', system-ui, sans-serif;
}
.e2z-tool-percentage-calculator .e2z-pct-table td {
	padding: 7px 6px;
	text-align: right;
	border-bottom: 1px solid #F0FDF4;
	white-space: nowrap;
}
.e2z-tool-percentage-calculator .e2z-pct-table td.e2z-pct-td-left { text-align: left; }
.e2z-tool-percentage-calculator .e2z-pct-table tbody tr:nth-child(odd) { background: #F0FDF4; }
.e2z-tool-percentage-calculator .e2z-pct-table tfoot td {
	font-weight: 800;
	background: #FFF7ED;
	color: #C2410C;
	border-top: 2px solid #F97316;
}

.e2z-tool-percentage-calculator .e2z-pct-formula {
	display: block;
	background: #1E293B;
	color: #4ADE80;
	border-radius: 6px;
	padding: 9px 11px;
	font-size: 0.8rem;
	margin: 8px 0 0;
	overflow-x: auto;
	white-space: pre;
}

.e2z-tool-percentage-calculator .e2z-pct-note {
	font-size: 0.84rem;
	margin: 8px 0 0;
	padding: 9px 11px;
	border-radius: 6px;
}
.e2z-tool-percentage-calculator .e2z-pct-note-info { background: #DCFCE7; color: #166534; border-left: 3px solid #22C55E; }
.e2z-tool-percentage-calculator .e2z-pct-note-warn { background: #FFF7ED; color: #9A3412; border-left: 3px solid #F97316; }
.e2z-tool-percentage-calculator .e2z-pct-note-error { background: #FEF2F2; color: #991B1B; border-left: 3px solid #DC2626; }

.e2z-tool-percentage-calculator .e2z-pct-export-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 12px;
}
.e2z-tool-percentage-calculator .e2z-pct-print-btn,
.e2z-tool-percentage-calculator .e2z-pct-copy-btn {
	flex: 1;
	min-height: 44px;
	padding: 11px;
	border: none;
	border-radius: 8px;
	color: #fff;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
}
.e2z-tool-percentage-calculator .e2z-pct-print-btn { background: #1E293B; }
.e2z-tool-percentage-calculator .e2z-pct-copy-btn { background: #15803D; }
.e2z-tool-percentage-calculator .e2z-pct-print-btn:hover,
.e2z-tool-percentage-calculator .e2z-pct-copy-btn:hover { filter: brightness(1.25); }

.e2z-tool-percentage-calculator .e2z-pct-disclaimer {
	font-size: 0.75rem;
	color: #86EFAC;
	margin: 12px 0 0;
	line-height: 1.45;
}

.e2z-tool-percentage-calculator .e2z-pct-hidden { display: none !important; }

@media (max-width: 480px) {
	.e2z-tool-percentage-calculator .e2z-pct-title { font-size: 1.12rem; }
	.e2z-tool-percentage-calculator .e2z-pct-body { padding: 12px; }
	.e2z-tool-percentage-calculator .e2z-pct-hero-value { font-size: 1.5rem; }
	.e2z-tool-percentage-calculator .e2z-pct-tab { min-width: 46%; font-size: 0.74rem; }
	.e2z-tool-percentage-calculator .e2z-pct-field { min-width: 100%; }
}
@media (max-width: 360px) {
	.e2z-tool-percentage-calculator .e2z-pct-header { padding: 16px 10px; }
	.e2z-tool-percentage-calculator .e2z-pct-title { font-size: 1rem; }
}
