/* ==========================================================================
   MT Wood Gifts - Personalization popup (variation "Персонализација" = да)
   ========================================================================== */

.mtwg-personalize-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(28, 20, 16, 0.55);
}

.mtwg-personalize-modal.is-open {
	display: flex;
}

.mtwg-personalize-modal__panel {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 8px;
	padding: 32px 28px 28px;
	box-shadow: 0 24px 60px rgba(28, 20, 16, 0.35);
	box-sizing: border-box;
}

.mtwg-personalize-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: #7a6c5d;
	cursor: pointer;
}

.mtwg-personalize-modal__close:hover {
	color: #1c1410;
}

.mtwg-personalize-modal__title {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 18px;
	color: #1c1410;
	margin: 0 0 6px;
}

.mtwg-personalize-modal__product {
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #a97f3d;
	margin: 0 0 10px;
}

.mtwg-personalize-modal__intro {
	font-size: 13px;
	line-height: 1.6;
	color: #7a6c5d;
	margin: 0 0 16px;
}

.mtwg-personalize-modal__textarea {
	width: 100%;
	min-height: 90px;
	resize: vertical;
	box-sizing: border-box;
	padding: 12px 14px;
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	color: #1c1410;
	border: 1px solid #e5dbca;
	border-radius: 6px;
	background: #faf7f2;
}

.mtwg-personalize-modal__textarea:focus {
	outline: none;
	border-color: #c9a15a;
}

.mtwg-personalize-modal__counter {
	text-align: right;
	font-size: 12px;
	color: #7a6c5d;
	margin-top: 6px;
}

/* Optional photo ------------------------------------------------------- */

.mtwg-personalize-modal__photo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin-top: 14px;
}

.mtwg-personalize-modal__photo [hidden] {
	display: none !important;
}

.mtwg-personalize-modal__photo-add {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #4a3f34;
	background: #faf7f2;
	border: 1px dashed #cfc3b0;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.mtwg-personalize-modal__photo-add:hover {
	border-color: #a97f3d;
	color: #a97f3d;
}

.mtwg-personalize-modal__photo-hint {
	font-size: 11px;
	color: #7a6c5d;
}

.mtwg-personalize-modal__photo-preview {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 8px;
	background: #faf7f2;
	border: 1px solid #e5dbca;
	border-radius: 6px;
	box-sizing: border-box;
}

.mtwg-personalize-modal__photo-preview img {
	flex: none;
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 4px;
	transition: opacity 0.2s ease;
}

.mtwg-personalize-modal__photo-preview.is-uploading img {
	opacity: 0.45;
}

.mtwg-personalize-modal__photo-status {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font-size: 12px;
	color: #4a3f34;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.mtwg-personalize-modal__photo-preview.is-uploading .mtwg-personalize-modal__photo-status {
	color: #a97f3d;
}

.mtwg-personalize-modal__photo-remove {
	flex: none;
	width: 28px;
	height: 28px;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	color: #7a6c5d;
	background: transparent;
	border: none;
	cursor: pointer;
}

.mtwg-personalize-modal__photo-remove:hover {
	color: #1c1410;
}

.mtwg-personalize-modal__error {
	margin: 10px 0 0;
	font-size: 13px;
	color: #c94b4b;
}

.mtwg-personalize-modal__actions {
	display: flex;
	gap: 12px;
	margin-top: 20px;
}

.mtwg-personalize-modal__actions button {
	flex: 1;
	padding: 13px 16px;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 6px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mtwg-personalize-modal__cancel {
	background: #fff;
	color: #4a3f34;
	border-color: #e5dbca;
}

.mtwg-personalize-modal__cancel:hover {
	border-color: #a97f3d;
	color: #a97f3d;
}

.mtwg-personalize-modal__confirm {
	background: #1c1410;
	color: #c9a15a;
}

.mtwg-personalize-modal__confirm:hover {
	background: #a97f3d;
	color: #1c1410;
}

.mtwg-personalize-modal__confirm:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.mtwg-personalize-modal__panel {
		padding: 26px 20px 22px;
	}

	.mtwg-personalize-modal__actions {
		flex-direction: column-reverse;
	}
}
