.akl-comment-root {
	--akl-color-primary: #ba0007;
	--akl-color-bg: #fcf6f2;
	--akl-color-text: inherit;
	--akl-color-btn-text: #ffffff;
	--akl-radius: 12px;
	--akl-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
	--akl-overlay: rgba(0, 0, 0, 0.55);
	--akl-border: rgba(0, 0, 0, 0.12);
	--akl-error-bg: #fdecea;
	--akl-error-text: #8a1f17;
	--akl-success-bg: #e8f5e9;
	--akl-success-text: #2e7d32;
	font-family: inherit;
	color: var(--akl-color-text);
	box-sizing: border-box;
}

.akl-comment-root *,
.akl-comment-root *::before,
.akl-comment-root *::after {
	box-sizing: border-box;
	font-family: inherit;
}

.akl-comment-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 100px;
	background: var(--akl-color-primary);
	color: var(--akl-color-btn-text);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.akl-comment-trigger:hover,
.akl-comment-trigger:focus-visible {
	opacity: 0.92;
}

.akl-comment-trigger:focus-visible {
	outline: 2px solid var(--akl-color-primary);
	outline-offset: 3px;
}

.akl-comment-overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: var(--akl-overlay);
	backdrop-filter: blur(2px);
}

.akl-comment-overlay[hidden] {
	display: none !important;
}

.akl-comment-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	pointer-events: none;
}

.akl-comment-modal[hidden] {
	display: none !important;
}

.akl-comment-modal__inner {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: 2rem 1.5rem 1.5rem;
	border-radius: var(--akl-radius);
	background: var(--akl-color-bg);
	box-shadow: var(--akl-shadow);
	color: var(--akl-color-text);
	pointer-events: auto;
}

.akl-comment-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.akl-comment-close:hover,
.akl-comment-close:focus-visible {
	background: rgba(0, 0, 0, 0.06);
}

.akl-comment-close:focus-visible {
	outline: 2px solid var(--akl-color-primary);
	outline-offset: 2px;
}

.akl-comment-title {
	margin: 0 2rem 0.75rem 0;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.3;
}

.akl-comment-intro {
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
	line-height: 1.6;
	opacity: 0.85;
}

.akl-comment-message {
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.akl-comment-message[hidden] {
	display: none !important;
}

.akl-comment-message--error {
	background: var(--akl-error-bg);
	color: var(--akl-error-text);
}

.akl-comment-message--success {
	background: var(--akl-success-bg);
	color: var(--akl-success-text);
}

.akl-comment-modal__inner.akl-comment--success .akl-comment-title,
.akl-comment-modal__inner.akl-comment--success .akl-comment-intro,
.akl-comment-modal__inner.akl-comment--success .akl-comment-form,
.akl-comment-modal__inner.akl-comment--success .akl-comment-message--error {
	display: none !important;
}

.akl-comment-modal__inner.akl-comment--success .akl-comment-message--success {
	display: block !important;
	margin: 2rem 0;
	padding: 2rem 1.5rem;
	text-align: center;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.5;
}

.akl-comment-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.akl-comment-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.akl-comment-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.akl-comment-row > .akl-comment-field {
	flex: 1 1 200px;
	min-width: 0;
}

.akl-comment-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.akl-comment-field label,
.akl-comment-field legend {
	font-size: 0.9rem;
	font-weight: 600;
}

.akl-comment-required {
	color: var(--akl-color-primary);
}

.akl-comment-field input[type="text"],
.akl-comment-field input[type="email"],
.akl-comment-field input[type="file"],
.akl-comment-field select,
.akl-comment-field textarea {
	width: 100%;
	min-height: 44px;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--akl-border);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font-size: 1rem;
	line-height: 1.4;
}

.akl-comment-field textarea {
	min-height: 120px;
	resize: vertical;
}

.akl-comment-field input:focus-visible,
.akl-comment-field select:focus-visible,
.akl-comment-field textarea:focus-visible {
	outline: 2px solid var(--akl-color-primary);
	outline-offset: 1px;
	border-color: var(--akl-color-primary);
}

.akl-comment-field--radio {
	border: none;
	margin: 0;
	padding: 0;
}

.akl-comment-field--radio legend {
	margin-bottom: 0.35rem;
	padding: 0;
}

.akl-comment-radio {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-right: 1rem;
	font-weight: 400;
	cursor: pointer;
}

.akl-comment-radio input {
	width: auto;
	min-height: auto;
	margin: 0;
}

.akl-comment-field--checkbox {
	margin-top: 0.25rem;
}

.akl-comment-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-weight: 400;
	cursor: pointer;
}

.akl-comment-checkbox input {
	width: auto;
	min-height: auto;
	margin-top: 0.2rem;
	flex-shrink: 0;
}

.akl-comment-checkbox span {
	line-height: 1.5;
}

.akl-comment-hint {
	margin: 0.25rem 0 0;
	font-size: 0.85rem;
	opacity: 0.75;
}

.akl-comment-upload-wrap[hidden] {
	display: none !important;
}

.akl-comment-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.akl-comment-submit,
.akl-comment-cancel {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.75rem 1.5rem;
	border-radius: var(--akl-radius);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.akl-comment-submit {
	border: none;
	background: var(--akl-color-primary);
	color: var(--akl-color-btn-text);
}

.akl-comment-submit:hover,
.akl-comment-submit:focus-visible {
	opacity: 0.92;
}

.akl-comment-submit:focus-visible {
	outline: 2px solid var(--akl-color-primary);
	outline-offset: 3px;
}

.akl-comment-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.akl-comment-cancel {
	border: 1px solid var(--akl-border);
	background: transparent;
	color: inherit;
}

.akl-comment-cancel:hover,
.akl-comment-cancel:focus-visible {
	background: rgba(0, 0, 0, 0.04);
}

.akl-comment-cancel:focus-visible {
	outline: 2px solid var(--akl-color-primary);
	outline-offset: 2px;
}

body.akl-comment-modal-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.akl-comment-row {
		flex-direction: column;
		gap: 1rem;
	}

	.akl-comment-row > .akl-comment-field {
		flex: 1 1 100%;
	}

	.akl-comment-modal {
		align-items: flex-end;
		padding-top: calc(env(safe-area-inset-top, 0px) + 1.5rem);
		padding-right: 0.75rem;
		padding-bottom: max(env(safe-area-inset-bottom, 0px), 0.75rem);
		padding-left: 0.75rem;
	}

	.akl-comment-modal__inner {
		max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 3rem);
		max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 3rem);
		padding: 1.5rem 1rem 1rem;
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
	}

	.akl-comment-actions {
		flex-direction: column;
	}

	.akl-comment-submit,
	.akl-comment-cancel {
		width: 100%;
	}
	.akl-comment-modal__inner h2 {
		font-size: 23px!important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.akl-comment-trigger,
	.akl-comment-submit,
	.akl-comment-cancel {
		transition: none;
	}
}
