/* ========================================
   PREISGENERATOR PRO - Modern Design v2
   Premium Frontend Styles - Complete
   ======================================== */

:root {
	/* Primary Colors */
	--pgp-primary: #6366f1;
	--pgp-primary-dark: #4f46e5;
	--pgp-primary-light: #818cf8;
	
	/* Backgrounds & Surfaces */
	--pgp-bg: #f9fafb;
	--pgp-surface: #ffffff;
	--pgp-surface-alt: #f3f4f6;
	--pgp-text: #111827;
	--pgp-text-secondary: #6b7280;
	--pgp-text-muted: #9ca3af;
	
	/* Status Colors */
	--pgp-success: #10b981;
	--pgp-error: #ef4444;
	--pgp-warning: #f59e0b;
	--pgp-info: #3b82f6;
	
	/* UI Elements */
	--pgp-radius: 12px;
	--pgp-radius-lg: 16px;
	--pgp-border: #e5e7eb;
	--pgp-border-focus: #d1d5db;
	
	/* Shadows */
	--pgp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--pgp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
	--pgp-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
	--pgp-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
	
	/* Transitions */
	--pgp-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======== Dark Mode ======== */
.pgp-skin-dark {
	--pgp-primary: #818cf8;
	--pgp-primary-dark: #6366f1;
	--pgp-primary-light: #a5b4fc;
	
	--pgp-bg: #1f2937;
	--pgp-surface: #111827;
	--pgp-surface-alt: #1f2937;
	--pgp-text: #f3f4f6;
	--pgp-text-secondary: #d1d5db;
	--pgp-text-muted: #9ca3af;
	
	--pgp-success: #34d399;
	--pgp-error: #f87171;
	--pgp-warning: #fbbf24;
	--pgp-info: #60a5fa;
	
	--pgp-border: #374151;
	--pgp-border-focus: #4b5563;
	
	--pgp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
	--pgp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
	--pgp-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
	--pgp-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* ======== Base Styles ======== */
* {
	box-sizing: border-box;
}

.pgp-wrap {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
	             'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: var(--pgp-text);
	background: var(--pgp-surface);
	border-radius: var(--pgp-radius-lg);
	border: 1px solid var(--pgp-border);
	padding: 28px;
	box-shadow: var(--pgp-shadow-lg);
	max-width: 680px;
	margin: 20px auto;
	transition: var(--pgp-transition);
}

@media (max-width: 640px) {
	.pgp-wrap {
		border-radius: 12px;
		padding: 20px;
		margin: 16px;
	}
}

/* ======== Header Section ======== */
.pgp-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--pgp-border);
	gap: 16px;
}

.pgp-title-section {
	flex: 1;
}

.pgp-title {
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.5px;
	color: var(--pgp-text);
	margin: 0;
	line-height: 1.3;
}

.pgp-title-small {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--pgp-text-secondary);
	margin-top: 4px;
}

.pgp-price-wrapper {
	text-align: right;
	min-width: 140px;
}

.pgp-price {
	font-size: 2.25rem;
	font-weight: 800;
	color: var(--pgp-primary-dark);
	letter-spacing: -1px;
	line-height: 1;
	margin: 0;
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 6px;
}

.pgp-currency {
	font-size: 1.25rem;
	font-weight: 600;
	opacity: 0.8;
}

.pgp-price-notice {
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--pgp-text-muted);
	margin-top: 8px;
	line-height: 1.5;
}

/* ======== Form Styles ======== */
.pgp-form {
	display: grid;
	gap: 16px;
	margin-bottom: 24px;
}

.pgp-field {
	display: grid;
	gap: 6px;
}

.pgp-field label {
	display: block;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--pgp-text);
	transition: var(--pgp-transition);
}

.pgp-field label .pgp-required {
	color: var(--pgp-error);
	margin-left: 2px;
}

.pgp-field input[type="text"],
.pgp-field input[type="email"],
.pgp-field input[type="number"],
.pgp-field input[type="date"],
.pgp-field input[type="tel"],
.pgp-field select,
.pgp-field textarea {
	width: 100%;
	padding: 10px 12px;
	font-size: 0.9375rem;
	font-family: inherit;
	color: var(--pgp-text);
	background-color: var(--pgp-bg);
	border: 1.5px solid var(--pgp-border);
	border-radius: 8px;
	transition: var(--pgp-transition);
	appearance: none;
}

.pgp-field input[type="text"]:focus,
.pgp-field input[type="email"]:focus,
.pgp-field input[type="number"]:focus,
.pgp-field input[type="date"]:focus,
.pgp-field input[type="tel"]:focus,
.pgp-field select:focus,
.pgp-field textarea:focus {
	outline: none;
	border-color: var(--pgp-primary);
	background-color: var(--pgp-surface);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pgp-field select {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px;
	padding-right: 36px;
}

.pgp-field input[type="range"] {
	width: 100%;
	height: 6px;
	padding: 0;
	margin: 8px 0;
	-webkit-appearance: none;
	appearance: none;
	background: var(--pgp-border);
	border-radius: 3px;
	outline: none;
}

.pgp-field input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	background: var(--pgp-primary);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: var(--pgp-shadow-md);
	transition: var(--pgp-transition);
}

.pgp-field input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.1);
	box-shadow: var(--pgp-shadow-lg);
}

.pgp-field input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: var(--pgp-primary);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: var(--pgp-shadow-md);
	transition: var(--pgp-transition);
}

.pgp-field input[type="range"]::-moz-range-thumb:hover {
	transform: scale(1.1);
	box-shadow: var(--pgp-shadow-lg);
}

.pgp-slider-value {
	display: inline-block;
	margin-left: 10px;
	font-weight: 700;
	color: var(--pgp-primary);
	background: rgba(99, 102, 241, 0.1);
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.85rem;
}

.pgp-help {
	color: var(--pgp-text-muted);
	font-size: 0.8125rem;
	line-height: 1.5;
	margin-top: 4px;
}

/* ======== Checkbox & Radio Groups ======== */
.pgp-checkbox-group,
.pgp-radio-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pgp-check-wrap,
.pgp-radio-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: var(--pgp-surface-alt);
	border: 1px solid var(--pgp-border);
	border-radius: 10px;
	cursor: pointer;
	transition: var(--pgp-transition);
	user-select: none;
}

.pgp-check-wrap:hover,
.pgp-radio-wrap:hover {
	background: var(--pgp-bg);
	border-color: var(--pgp-primary);
}

.pgp-check-wrap:focus-within,
.pgp-radio-wrap:focus-within {
	outline: 2px solid rgba(99,102,241,0.25);
	outline-offset: 2px;
}

.pgp-check-wrap input[type="checkbox"],
.pgp-radio-wrap input[type="checkbox"] {
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 6px;
	border: 2px solid var(--pgp-border);
	background: var(--pgp-surface);
	transition: var(--pgp-transition);
	position: relative;
	flex-shrink: 0;
}

.pgp-radio-wrap input[type="radio"],
.pgp-check-wrap input[type="radio"] {
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--pgp-border);
	background: var(--pgp-surface);
	transition: var(--pgp-transition);
	position: relative;
	flex-shrink: 0;
}

.pgp-check-wrap input[type="checkbox"]:checked,
.pgp-radio-wrap input[type="checkbox"]:checked,
.pgp-radio-wrap input[type="radio"]:checked,
.pgp-check-wrap input[type="radio"]:checked {
	border-color: var(--pgp-primary);
	background: var(--pgp-primary);
	box-shadow: 0 0 0 4px rgba(99,102,241,0.14);
}

.pgp-check-wrap input[type="checkbox"]:checked::after,
.pgp-radio-wrap input[type="checkbox"]:checked::after,
.pgp-check-wrap input[type="radio"]:checked::after,
.pgp-radio-wrap input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 2px;
	width: 8px;
	height: 12px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.pgp-radio-wrap input[type="radio"]:checked::after,
.pgp-check-wrap input[type="radio"]:checked::after {
	left: 6px;
	top: 6px;
	width: 8px;
	height: 8px;
	border: none;
	border-radius: 50%;
	background: #fff;
	transform: none;
}

.pgp-check-wrap input[type="checkbox"]:focus-visible,
.pgp-radio-wrap input[type="checkbox"]:focus-visible,
.pgp-radio-wrap input[type="radio"]:focus-visible,
.pgp-check-wrap input[type="radio"]:focus-visible {
	outline: 2px solid rgba(99,102,241,0.35);
	outline-offset: 2px;
}

.pgp-check-wrap span,
.pgp-radio-wrap span {
	font-size: 0.9375rem;
	color: var(--pgp-text);
	flex: 1;
	line-height: 1.5;
}

/* ======== Action Buttons ======== */
.pgp-cta {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 10px;
	margin-top: 24px;
	margin-bottom: 16px;
}

@media (max-width: 640px) {
	.pgp-cta {
		grid-template-columns: 1fr;
	}
}

.pgp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.3px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: var(--pgp-transition);
	white-space: nowrap;
	text-decoration: none;
	position: relative;
	overflow: hidden;
}

.pgp-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Primary Button */
.pgp-btn:not(.ghost) {
	background: linear-gradient(135deg, var(--pgp-primary), var(--pgp-primary-dark));
	color: #ffffff;
	box-shadow: var(--pgp-shadow-md);
	font-weight: 700;
}

.pgp-btn:not(.ghost):hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: var(--pgp-shadow-lg);
}

.pgp-btn:not(.ghost):active:not(:disabled) {
	transform: translateY(0);
	box-shadow: var(--pgp-shadow-md);
}

/* Ghost Button */
.pgp-btn.ghost {
	background: transparent;
	color: var(--pgp-text);
	border: 1.5px solid var(--pgp-border);
	box-shadow: none;
}

.pgp-btn.ghost:hover:not(:disabled) {
	background: var(--pgp-surface-alt);
	border-color: var(--pgp-text-secondary);
}

/* Button Icons */
.pgp-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* ======== Result Messages ======== */
.pgp-result {
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.9375rem;
	display: none;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.pgp-result.pgp-success {
	background: rgba(16, 185, 129, 0.1);
	color: var(--pgp-success);
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.pgp-result.pgp-error {
	background: rgba(239, 68, 68, 0.1);
	color: var(--pgp-error);
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.pgp-result.pgp-info {
	background: rgba(59, 130, 246, 0.1);
	color: var(--pgp-info);
	border: 1px solid rgba(59, 130, 246, 0.3);
}

.pgp-result.pgp-show {
	display: block;
}

/* ======== Modal Styles ======== */
.pgp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.pgp-modal.pgp-show {
	display: flex;
	opacity: 1;
	align-items: center;
	justify-content: center;
}

.pgp-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.pgp-modal-content {
	position: relative;
	background: var(--pgp-surface);
	color: var(--pgp-text);
	border-radius: var(--pgp-radius-lg);
	max-width: 540px;
	width: 90%;
	padding: 36px;
	box-shadow: var(--pgp-shadow-xl);
	z-index: 10000;
	max-height: 90vh;
	overflow-y: auto;
	animation: slideUp 0.3s ease;
	border: 1px solid var(--pgp-border);
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 640px) {
	.pgp-modal-content {
		padding: 24px;
		width: 95%;
	}
}

.pgp-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 32px;
	color: var(--pgp-text-secondary);
	cursor: pointer;
	line-height: 1;
	padding: 4px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--pgp-transition);
	border-radius: 8px;
}

.pgp-modal-close:hover {
	color: var(--pgp-text);
	background: var(--pgp-surface-alt);
}

.pgp-modal-content h3 {
	margin: 0 0 24px 0;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.5px;
}

.pgp-form-group {
	margin-bottom: 20px;
}

.pgp-form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 0.9375rem;
	color: var(--pgp-text);
}

.pgp-form-group label .pgp-required {
	color: var(--pgp-error);
	margin-left: 2px;
}

.pgp-form-group input[type="text"],
.pgp-form-group input[type="email"],
.pgp-form-group input[type="tel"],
.pgp-form-group textarea {
	width: 100%;
	border-radius: 8px;
	border: 1.5px solid var(--pgp-border);
	padding: 11px 13px;
	background: var(--pgp-bg);
	color: var(--pgp-text);
	font-family: inherit;
	font-size: 0.9375rem;
	transition: var(--pgp-transition);
}

.pgp-form-group input[type="text"]:focus,
.pgp-form-group input[type="email"]:focus,
.pgp-form-group input[type="tel"]:focus,
.pgp-form-group textarea:focus {
	outline: none;
	border-color: var(--pgp-primary);
	background-color: var(--pgp-surface);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pgp-form-group textarea {
	resize: vertical;
	min-height: 100px;
	font-family: inherit;
}

.pgp-privacy-group {
	padding: 14px;
	background: var(--pgp-surface-alt);
	border-radius: 8px;
	border: 1px solid var(--pgp-border);
	margin: 16px 0;
}

.pgp-privacy-group label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 400;
	cursor: pointer;
	font-size: 0.9375rem;
	margin: 0;
}

.pgp-privacy-group input[type="checkbox"] {
	appearance: none;
	margin-top: 1px;
	cursor: pointer;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border-radius: 6px;
	border: 2px solid var(--pgp-border);
	background: var(--pgp-surface);
	transition: var(--pgp-transition);
	position: relative;
}

.pgp-privacy-group input[type="checkbox"]:checked {
	border-color: var(--pgp-primary);
	background: var(--pgp-primary);
	box-shadow: 0 0 0 4px rgba(99,102,241,0.14);
}

.pgp-privacy-group input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 2px;
	width: 8px;
	height: 12px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.pgp-privacy-group input[type="checkbox"]:focus-visible {
	outline: 2px solid rgba(99,102,241,0.35);
	outline-offset: 2px;
}

.pgp-privacy-group a {
	color: var(--pgp-primary);
	text-decoration: none;
	font-weight: 600;
	transition: var(--pgp-transition);
}

.pgp-privacy-group a:hover {
	text-decoration: underline;
}

.pgp-modal-actions {
	display: flex;
	gap: 12px;
	margin-top: 28px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

@media (max-width: 480px) {
	.pgp-modal-actions {
		flex-direction: column;
	}
	
	.pgp-modal-actions button {
		width: 100%;
	}
}

.pgp-btn-primary,
.pgp-btn-ghost {
	padding: 12px 20px;
	font-size: 0.9375rem;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: var(--pgp-transition);
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.pgp-btn-primary {
	background: linear-gradient(135deg, var(--pgp-primary), var(--pgp-primary-dark));
	color: #fff;
	box-shadow: var(--pgp-shadow-md);
	font-weight: 700;
}

.pgp-btn-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: var(--pgp-shadow-lg);
}

.pgp-btn-primary:active:not(:disabled) {
	transform: translateY(0);
}

.pgp-btn-ghost {
	background: transparent;
	color: var(--pgp-text);
	border: 1.5px solid var(--pgp-border);
	box-shadow: none;
}

.pgp-btn-ghost:hover:not(:disabled) {
	background: var(--pgp-surface-alt);
	border-color: var(--pgp-text-secondary);
}

.pgp-btn-primary:disabled,
.pgp-btn-ghost:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ======== Responsive Design ======== */
@media (max-width: 480px) {
	.pgp-wrap {
		padding: 16px;
	}
	
	.pgp-header {
		flex-direction: column;
		gap: 12px;
	}
	
	.pgp-price-wrapper {
		text-align: left;
		min-width: auto;
	}
	
	.pgp-price {
		font-size: 1.75rem;
		justify-content: flex-start;
	}
	
	.pgp-title {
		font-size: 1.125rem;
	}
	
	.pgp-btn {
		width: 100%;
	}
}

/* ======== Print Styles ======== */
@media print {
	.pgp-cta,
	.pgp-btn,
	.pgp-modal {
		display: none !important;
	}
	
	.pgp-wrap {
		box-shadow: none;
		border: 1px solid #ccc;
		max-width: 100%;
		margin: 0;
		padding: 20px;
	}
}

/* ======== Branding Footer ======== */
.pgp-branding {
	text-align: center;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--pgp-border);
}

.pgp-branding small {
	color: var(--pgp-text-muted);
	font-size: 12px;
}

.pgp-branding a {
	color: var(--pgp-primary-dark);
	text-decoration: none;
	transition: var(--pgp-transition);
}

.pgp-branding a:hover {
	color: var(--pgp-primary);
	text-decoration: underline;
}

.pgp-skin-dark .pgp-branding {
	border-top-color: #374151;
}

.pgp-skin-dark .pgp-branding small {
	color: #9ca3af;
}