/* Kürtaj Hakkım Chatbot — modern, sade, mobil uyumlu görünüm.
   Marka renklerine geçmek için aşağıdaki :root değişkenlerini güncelleyin. */

:root {
	--khc-primary: #26323e;
	--khc-primary-dark: #171e27;
	--khc-primary-contrast: #ffffff;
	--khc-accent: #5b6b7c;
	--khc-bg: #ffffff;
	--khc-bg-subtle: #f6f7f9;
	--khc-bg-subtle-hover: #eef0f3;
	--khc-border: #eaebee;
	--khc-text: #1b1f27;
	--khc-text-muted: #7b8190;
	--khc-radius-lg: 24px;
	--khc-radius-md: 18px;
	--khc-radius-sm: 13px;
	--khc-radius-pill: 999px;
	--khc-shadow-lg: 0 20px 48px -12px rgba(20, 24, 33, 0.28), 0 4px 12px rgba(20, 24, 33, 0.06);
	--khc-shadow-sm: 0 2px 8px rgba(20, 24, 33, 0.08);
	--khc-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--khc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.khc-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: var(--khc-font);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.khc-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	background: linear-gradient(155deg, var(--khc-primary), var(--khc-primary-dark));
	color: var(--khc-primary-contrast);
	cursor: pointer;
	box-shadow: var(--khc-shadow-lg);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: transform 0.22s var(--khc-ease), box-shadow 0.22s var(--khc-ease);
}

.khc-launcher:hover {
	transform: scale(1.06) translateY(-1px);
}

.khc-launcher:active {
	transform: scale(0.96);
}

.khc-launcher-icon {
	position: absolute;
	font-size: 23px;
	line-height: 1;
	transition: opacity 0.2s var(--khc-ease), transform 0.28s var(--khc-ease);
}

.khc-icon-chat::before {
	content: "\1F4AC";
}

.khc-icon-close::before {
	content: "\2715";
	font-size: 19px;
}

.khc-icon-close {
	opacity: 0;
	transform: rotate(-45deg) scale(0.5);
}

.khc-widget.khc-open .khc-icon-chat {
	opacity: 0;
	transform: rotate(45deg) scale(0.5);
}

.khc-widget.khc-open .khc-icon-close {
	opacity: 1;
	transform: rotate(0) scale(1);
}

.khc-panel {
	position: absolute;
	right: 0;
	bottom: 76px;
	width: 368px;
	max-width: calc(100vw - 32px);
	height: min(608px, 70vh);
	background: var(--khc-bg);
	border-radius: var(--khc-radius-lg);
	box-shadow: var(--khc-shadow-lg);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform-origin: bottom right;
	animation: khc-panel-in 0.26s var(--khc-ease);
}

@keyframes khc-panel-in {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.khc-panel[hidden] {
	display: none;
}

.khc-panel-header {
	background: linear-gradient(135deg, var(--khc-primary), var(--khc-primary-dark));
	color: var(--khc-primary-contrast);
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	position: relative;
}

.khc-panel-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -10px;
	height: 10px;
	background: linear-gradient(to bottom, rgba(20, 24, 33, 0.06), transparent);
	pointer-events: none;
}

.khc-panel-header-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.khc-panel-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
}

.khc-panel-title {
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.1px;
}

.khc-close {
	background: transparent;
	border: none;
	color: var(--khc-primary-contrast);
	opacity: 0.8;
	font-size: 14px;
	cursor: pointer;
	line-height: 1;
	padding: 7px;
	border-radius: 50%;
	transition: background 0.18s var(--khc-ease), opacity 0.18s var(--khc-ease);
}

.khc-close:hover {
	background: rgba(255, 255, 255, 0.16);
	opacity: 1;
}

.khc-messages {
	padding: 18px 16px 14px;
	overflow-y: auto;
	flex: 1 1 auto;
	background: var(--khc-bg);
	scroll-behavior: smooth;
}

.khc-bubble {
	background: var(--khc-bg-subtle);
	color: var(--khc-text);
	border-radius: var(--khc-radius-md);
	border-bottom-left-radius: 5px;
	padding: 11px 15px;
	margin-bottom: 10px;
	font-size: 14px;
	white-space: pre-line;
	max-width: 92%;
	box-shadow: var(--khc-shadow-sm);
}

.khc-bubble.khc-user-choice {
	background: var(--khc-primary);
	color: var(--khc-primary-contrast);
	margin-left: auto;
	border-radius: var(--khc-radius-md);
	border-bottom-right-radius: 5px;
	max-width: 85%;
	box-shadow: 0 4px 14px -4px rgba(38, 50, 62, 0.45);
}

.khc-bubble.khc-note {
	font-size: 12px;
	color: var(--khc-text-muted);
	background: transparent;
	box-shadow: none;
	padding: 0 2px;
	margin-top: -4px;
}

.khc-bubble.khc-typing {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 14px 17px;
	width: fit-content;
}

.khc-bubble.khc-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--khc-text-muted);
	display: inline-block;
	animation: khc-typing-bounce 1.1s infinite ease-in-out;
}

.khc-bubble.khc-typing span:nth-child(2) {
	animation-delay: 0.15s;
}

.khc-bubble.khc-typing span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes khc-typing-bounce {
	0%, 60%, 100% {
		transform: translateY(0);
		opacity: 0.5;
	}
	30% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

.khc-fade-in {
	animation: khc-fade-in 0.28s var(--khc-ease);
}

@keyframes khc-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.khc-city-search-wrap {
	position: relative;
	margin-bottom: 2px;
}

.khc-city-search-input {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 13.5px;
	padding: 11px 14px 11px 34px;
	border: none;
	border-radius: var(--khc-radius-pill);
	background: var(--khc-bg-subtle);
	background-image: none;
	color: var(--khc-text);
	box-shadow: inset 0 0 0 1.5px transparent;
	transition: box-shadow 0.18s var(--khc-ease), background 0.18s var(--khc-ease);
}

.khc-city-search-wrap::before {
	content: "\1F50D";
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 12.5px;
	opacity: 0.55;
	pointer-events: none;
}

.khc-city-search-input:focus {
	outline: none;
	background: var(--khc-bg);
	box-shadow: inset 0 0 0 1.5px var(--khc-accent);
}

.khc-city-suggestions {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	background: var(--khc-bg);
	border-radius: var(--khc-radius-md);
	box-shadow: var(--khc-shadow-lg);
	max-height: 190px;
	overflow-y: auto;
	z-index: 2;
	padding: 5px;
}

.khc-city-suggestion {
	display: block;
	width: 100%;
	text-align: left;
	background: transparent;
	border: none;
	border-radius: var(--khc-radius-sm);
	padding: 9px 10px;
	font-size: 13px;
	color: var(--khc-text);
	cursor: pointer;
	transition: background 0.12s ease;
}

.khc-city-suggestion:hover {
	background: var(--khc-bg-subtle);
}

.khc-org-card {
	background: var(--khc-bg-subtle);
	border-radius: var(--khc-radius-sm);
	padding: 12px 14px;
	margin-bottom: 8px;
	max-width: 94%;
}

.khc-org-name {
	font-weight: 600;
	font-size: 13.5px;
	color: var(--khc-text);
	margin-bottom: 3px;
}

.khc-org-desc {
	font-size: 12.5px;
	color: var(--khc-text-muted);
	margin-bottom: 8px;
	line-height: 1.45;
}

.khc-org-contact {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	color: var(--khc-primary);
	text-decoration: none;
	font-weight: 600;
	background: var(--khc-bg);
	border-radius: var(--khc-radius-pill);
	padding: 5px 11px;
	margin: 0 6px 4px 0;
	box-shadow: var(--khc-shadow-sm);
	transition: transform 0.12s var(--khc-ease), box-shadow 0.12s var(--khc-ease);
}

.khc-org-contact:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px -2px rgba(20, 24, 33, 0.16);
}

.khc-links {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 4px 0 12px;
}

.khc-link-btn {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	font-size: 13px;
	color: var(--khc-text);
	font-weight: 600;
	text-decoration: none;
	background: var(--khc-bg-subtle);
	border-radius: var(--khc-radius-sm);
	padding: 10px 13px;
	word-break: break-word;
	transition: background 0.15s var(--khc-ease), transform 0.15s var(--khc-ease);
}

.khc-link-btn::after {
	content: "\2197";
	color: var(--khc-text-muted);
	flex-shrink: 0;
}

.khc-link-btn:hover {
	background: var(--khc-bg-subtle-hover);
	transform: translateY(-1px);
}

.khc-options {
	padding: 12px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex-shrink: 0;
	max-height: 42vh;
	overflow-y: auto;
	background: var(--khc-bg);
	box-shadow: inset 0 1px 0 var(--khc-border);
}

.khc-option-btn {
	width: 100%;
	text-align: left;
	background: var(--khc-bg-subtle);
	border: none;
	color: var(--khc-text);
	border-radius: var(--khc-radius-sm);
	padding: 11px 14px;
	font-size: 13.5px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s var(--khc-ease), transform 0.12s var(--khc-ease), box-shadow 0.15s var(--khc-ease);
}

.khc-option-btn:hover {
	background: var(--khc-bg-subtle-hover);
	transform: translateY(-1px);
	box-shadow: var(--khc-shadow-sm);
}

.khc-option-btn:active {
	transform: scale(0.98);
}

.khc-option-btn.khc-secondary {
	background: transparent;
	color: var(--khc-text-muted);
	box-shadow: inset 0 0 0 1px var(--khc-border);
}

.khc-option-btn.khc-secondary:hover {
	box-shadow: inset 0 0 0 1px var(--khc-accent);
	background: transparent;
}

.khc-option-row {
	display: flex;
	gap: 8px;
}

.khc-option-row .khc-option-btn {
	flex: 1;
}

@media (max-width: 480px) {
	.khc-widget {
		right: 14px;
		bottom: 14px;
	}

	.khc-panel {
		position: fixed;
		right: 10px;
		left: 10px;
		bottom: 10px;
		top: 10px;
		width: auto;
		max-width: none;
		height: auto;
		border-radius: var(--khc-radius-lg);
	}

	.khc-options {
		max-height: 46vh;
	}
}
