/* Krikil Addons - Popover Cepat Telepon Penting & Layanan Darurat */

.krikil-tp-popover {
	position: fixed;
	z-index: 999990;
	width: 280px;
	max-width: calc(100vw - 24px);
	background: #ffffff;
	border: 2px solid #ffffff;
	border-radius: 14px;
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: scale(0.92) translateX(8px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
	font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	box-sizing: border-box;
}

.krikil-tp-popover.is-side-right {
	transform: scale(0.92) translateX(-8px);
}

.krikil-tp-popover.is-open,
.krikil-tp-popover.is-side-right.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: scale(1) translateX(0);
}

/* Header Ringkas */
.krikil-tp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 12px;
	background: #182438;
	border-bottom: 2px solid #EFC448;
	color: #ffffff;
}

.krikil-tp-header-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.krikil-tp-header-icon {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: #D90700;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.krikil-tp-header-icon svg {
	width: 13px;
	height: 13px;
}

.krikil-tp-title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.krikil-tp-close {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	padding: 0;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease;
}

.krikil-tp-close:hover,
.krikil-tp-close:focus-visible {
	background: #D90700;
	border-color: #D90700;
	outline: none;
}

.krikil-tp-close svg {
	width: 13px;
	height: 13px;
}

/* Search Bar Ringkas */
.krikil-tp-search-wrap {
	position: relative;
	padding: 8px 10px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
}

.krikil-tp-search-icon {
	position: absolute;
	left: 19px;
	color: #64748b;
	display: inline-flex;
	pointer-events: none;
}

.krikil-tp-search-icon svg {
	width: 14px;
	height: 14px;
}

.krikil-tp-search-input {
	width: 100%;
	height: 30px;
	padding: 4px 10px 4px 28px;
	border: 1px solid #cbd5e1;
	border-radius: 7px;
	background: #ffffff;
	color: #0f172a;
	font-size: 12px;
	line-height: 1.3;
	box-sizing: border-box;
}

.krikil-tp-search-input:focus {
	outline: none;
	border-color: #182438;
}

/* Body Daftar Kontak */
.krikil-tp-body {
	max-height: 260px;
	overflow-y: auto;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #ffffff;
}

.krikil-tp-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px 10px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #ffffff;
}

.krikil-tp-row.is-emergency {
	border-color: rgba(217, 7, 0, 0.3);
	background: linear-gradient(180deg, rgba(254, 242, 242, 0.65) 0%, #ffffff 100%);
}

.krikil-tp-row-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 6px;
}

.krikil-tp-row-name {
	margin: 0;
	font-size: 12.5px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
	word-break: break-word;
}

.krikil-tp-badge-emergency {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: 2px 6px;
	border-radius: 999px;
	font-size: 9.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: #D90700;
	color: #ffffff;
}

.krikil-tp-row-number {
	font-size: 14px;
	font-weight: 800;
	color: #182438;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.krikil-tp-row.is-emergency .krikil-tp-row-number {
	color: #D90700;
}

.krikil-tp-row-desc {
	margin: 0;
	font-size: 11px;
	color: #475569;
	line-height: 1.35;
}

/* Tombol Aksi Ringkas */
.krikil-tp-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.krikil-tp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 26px;
	padding: 0 9px;
	border-radius: 6px;
	border: 1px solid transparent;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.krikil-tp-btn svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

.krikil-tp-btn-call {
	flex: 1 1 auto;
	background: #182438;
	color: #ffffff;
}

.krikil-tp-row.is-emergency .krikil-tp-btn-call {
	background: #D90700;
}

.krikil-tp-btn-call:hover {
	background: #0f172a;
	color: #ffffff;
}

.krikil-tp-row.is-emergency .krikil-tp-btn-call:hover {
	background: #b50600;
	color: #ffffff;
}

.krikil-tp-btn-wa {
	background: #15803d;
	color: #ffffff;
}

.krikil-tp-btn-wa:hover {
	background: #166534;
	color: #ffffff;
}

.krikil-tp-btn-copy {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #334155;
}

.krikil-tp-btn-copy:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.krikil-tp-btn-copy.is-copied {
	background: #EFC448;
	border-color: #d4a62a;
	color: #182438;
}

/* Empty State Ringkas */
.krikil-tp-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 16px 10px;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	background: #f8fafc;
	color: #475569;
}

.krikil-tp-empty-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #182438;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 8px;
}

.krikil-tp-empty-icon svg {
	width: 16px;
	height: 16px;
}

.krikil-tp-empty h4 {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
}

.krikil-tp-empty p {
	margin: 0;
	font-size: 11.5px;
	line-height: 1.4;
	color: #64748b;
}
