/**
 * Personalization Form styles.
 *
 * @package Kadence_Child
 */

/* Layout
-------------------------------------------------------------- */
.kc-pform {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Photo preview
-------------------------------------------------------------- */
.kc-pform__photo-wrap {
	position: relative;
	display: flex;
	justify-content: center;
}

.kc-pform__photo-circle {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	overflow: hidden;
	background: #f3f4f6;
}

.kc-pform__photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kc-pform__photo-remove {
	position: absolute;
	top: 0;
	right: calc(50% - 72px);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: none;
	background: var(--global-palette5, #2b2f3a);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.kc-pform__photo-remove:hover {
	background: #ef4444;
}

/* Loading spinner on buttons
-------------------------------------------------------------- */
.upload-photo.is-loading,
.pay.is-loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.upload-photo.is-loading::after,
.pay.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: kc-spin 0.6s linear infinite;
}

@keyframes kc-spin {
	to { transform: rotate(360deg); }
}

/* Fields — shared styles
-------------------------------------------------------------- */
.kc-pform__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kc-pform__label {
	font-size: 16px;
	font-weight: 600;
	color: var(--global-palette5, #2b2f3a);
}

/* Input
-------------------------------------------------------------- */
.kc-pform__input-wrap {
	position: relative;
}

.kc-pform__input {
	width: 100%;
	padding: 12px 16px !important;
	border: 1px solid #e8dccb !important;
	border-radius: 16px !important;
	background: transparent;
	font-size: 16px;
	color: var(--global-palette5, #2b2f3a) !important;
	box-sizing: border-box;
}

.kc-pform__field--name .kc-pform__input {
	padding-right: 56px;
}

.kc-pform__input:focus {
	outline: none;
	border-color: #c89a67;
	box-shadow: none !important;
}

/* Name counter */
.kc-pform__counter {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 12px;
	color: #9ca3af;
	pointer-events: none;
}

.kc-pform__counter--over {
	color: #ef4444;
}

/* Custom Dropdown
-------------------------------------------------------------- */
.kc-pform__dropdown {
	position: relative;
}

.kc-pform__dropdown-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #e8dccb;
	border-radius: 16px;
	background: transparent;
	font-size: 16px;
	color: var(--global-palette5, #2b2f3a);
	cursor: pointer;
	text-align: left;
}

.kc-pform__dropdown.is-open .kc-pform__dropdown-toggle,
.kc-pform__dropdown-toggle:focus {
	outline: none;
	border-color: #c89a67;
}

.kc-pform__dropdown-value {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kc-pform__dropdown-chevron {
	flex-shrink: 0;
	color: #6b7280;
	transition: transform 0.2s;
}

.kc-pform__dropdown.is-open .kc-pform__dropdown-chevron {
	transform: rotate(180deg);
}

/* Panel */
.kc-pform__dropdown-panel {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 20;
	border: 1px solid #e8dccb;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

/* Header: search + reset */
.kc-pform__dropdown-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid #e8dccb;
}

.kc-pform__dropdown-search {
	flex: 1;
	padding: 6px 0 !important;
	border: none !important;
	font-size: 16px;
	color: var(--global-palette5, #2b2f3a) !important;
	background: transparent !important;
	outline: none;
	box-sizing: border-box;
}

.kc-pform__dropdown-search:focus {
	background-color: transparent !important;
	box-shadow: none !important;
}

.kc-pform__dropdown-reset {
	flex-shrink: 0;
	padding: 6px 12px;
	border: 1px solid #e8dccb;
	border-radius: 8px;
	background: transparent;
	font-size: 14px;
	color: var(--global-palette5, #2b2f3a);
	cursor: pointer;
	white-space: nowrap;
}

.kc-pform__dropdown-reset:hover {
	background: var(--global-palette1);
}

/* List */
.kc-pform__dropdown-list {
	list-style: none;
	margin: 0;
	padding: 4px 0;
	max-height: 200px;
	overflow-y: auto;
}

.kc-pform__dropdown-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	font-size: 16px;
	color: var(--global-palette5, #2b2f3a);
	cursor: pointer;
}

.kc-pform__dropdown-item:hover {
	background: #faf7f2;
}

.kc-pform__dropdown-item.is-selected {
	font-weight: 600;
}

.kc-pform__dropdown-check {
	display: none;
	color: var(--global-palette1, #091a3d);
}

.kc-pform__dropdown-item.is-selected .kc-pform__dropdown-check {
	display: block;
}

.kc-pform__dropdown-item.is-hidden {
	display: none;
}

/* Warnings
-------------------------------------------------------------- */
.kc-pform__warning {
	font-size: 12px;
	color: #ef4444;
}

/* Pay button disabled state
-------------------------------------------------------------- */
.pay.kc-pform__pay--disabled,
.pay[disabled] {
	opacity: 0.5;
	pointer-events: none;
	cursor: not-allowed;
}

