/* ═══════════════════════════════════════════
   CircleKit Activity Composer
   ═══════════════════════════════════════════ */

.ck-composer-block {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
	padding: 0;
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	overflow: hidden;
}

/* ─── Login Prompt ─── */
.ck-composer-login {
	padding: 32px;
	text-align: center;
}

/* ─── Collapsed Bar (Facebook-style) ─── */
.ck-c-collapsed {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	cursor: pointer;
	transition: background 0.15s;
}

.ck-c-collapsed:hover {
	background: #f9fafb;
}

.ck-c-collapsed-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ck-c-collapsed-input {
	flex: 1;
	padding: 10px 16px;
	background: #f3f4f6;
	border-radius: 24px;
	font-size: 15px;
	color: #9ca3af;
	user-select: none;
	transition: background 0.15s;
}

.ck-c-collapsed:hover .ck-c-collapsed-input {
	background: #e5e7eb;
}

.ck-c-collapsed-icons {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}

.ck-c-collapsed-icon {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 18px;
	transition: background 0.15s;
	cursor: pointer;
}

.ck-c-collapsed-icon:hover {
	background: #f3f4f6;
}

/* ─── Expanded Composer ─── */
.ck-c-expanded {
	animation: ckExpandIn 0.25s ease;
}

@keyframes ckExpandIn {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ─── Header: Avatar + Toolbar ─── */
.ck-c-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px 0;
}

.ck-c-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.ck-c-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

.ck-c-online-dot {
	position: absolute;
	bottom: 2px;
	right: 2px;
	width: 10px;
	height: 10px;
	background: #22c55e;
	border: 2px solid #fff;
	border-radius: 50%;
}

/* ─── Toolbar ─── */
.ck-c-toolbar {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	background: #f8f9fb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 6px 8px;
	flex: 1;
}

.ck-c-format-group {
	display: flex;
	align-items: center;
	gap: 2px;
	padding-right: 8px;
	border-right: 1px solid #e5e7eb;
}

.ck-c-format-group:last-child {
	border-right: none;
	padding-right: 0;
}

.ck-c-fmt {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 4px;
	font-size: 13px;
	color: #4b5563;
	line-height: 1;
	transition: background 0.15s, color 0.15s;
}

.ck-c-fmt:hover {
	background: #e5e7eb;
	color: #111827;
}

.ck-c-fmt.active {
	background: #6366f1;
	color: #fff;
}

.ck-c-block-type {
	border: none;
	background: none;
	font-size: 13px;
	color: #4b5563;
	cursor: pointer;
	padding: 4px 2px;
}

/* ─── Content Area ─── */
.ck-c-content-wrap {
	padding: 0 20px;
	position: relative;
}

.ck-c-content {
	min-height: 120px;
	max-height: 300px;
	overflow-y: auto;
	padding: 16px 0;
	outline: none;
	font-size: 15px;
	line-height: 1.6;
	color: #1f2937;
	border-bottom: 1px solid #f3f4f6;
}

.ck-c-content:empty::before {
	content: attr(data-placeholder);
	color: #9ca3af;
	pointer-events: none;
}

.ck-c-content-footer {
	display: flex;
	justify-content: flex-end;
	padding: 4px 0 8px;
}

.ck-c-charcount {
	font-size: 12px;
	color: #9ca3af;
}

/* ─── URL Preview ─── */
.ck-c-url-preview {
	padding: 0 20px 12px;
}

.ck-lp-loading {
	padding: 16px;
	text-align: center;
	font-size: 13px;
	color: #9ca3af;
	background: #f8f9fb;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.ck-lp-card {
	position: relative;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.15s;
}

.ck-lp-card:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ck-lp-dismiss {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 10;
	width: 24px;
	height: 24px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 11px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	transition: background 0.15s;
}

.ck-lp-dismiss:hover {
	background: rgba(239,68,68,0.9);
}

.ck-lp-image img {
	width: 100%;
	max-height: 260px;
	object-fit: cover;
	display: block;
}

.ck-lp-embed {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	background: #000;
}

.ck-lp-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.ck-lp-body {
	padding: 12px 14px;
}

.ck-lp-site {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
}

.ck-lp-favicon {
	width: 16px;
	height: 16px;
	border-radius: 2px;
}

.ck-lp-site span {
	font-size: 11px;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	font-weight: 600;
}

.ck-lp-title {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
	margin-bottom: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ck-lp-desc {
	font-size: 12px;
	color: #6b7280;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ─── Media Preview ─── */
.ck-c-media-preview {
	padding: 0 20px 12px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ck-c-media-thumb {
	position: relative;
	width: 100px;
	height: 100px;
	border-radius: 8px;
	overflow: hidden;
	background: #f3f4f6;
	flex-shrink: 0;
}

.ck-c-media-thumb img,
.ck-c-media-thumb video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ck-c-media-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 32px;
	height: 32px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	pointer-events: none;
}

.ck-c-media-file {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	font-size: 11px;
	color: #4b5563;
	text-align: center;
	word-break: break-all;
	line-height: 1.3;
}

.ck-c-media-remove {
	position: absolute;
	top: 6px;
	right: 6px;
	background: rgba(0,0,0,0.65);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	font-size: 11px;
	line-height: 24px;
	text-align: center;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.ck-c-media-remove:hover {
	background: rgba(239,68,68,0.9);
}

/* ─── Media Buttons Row ─── */
.ck-c-media-row {
	display: flex;
	gap: 8px;
	padding: 12px 20px;
	border-top: 1px solid #e5e7eb;
}

.ck-c-media-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	color: #4b5563;
	cursor: pointer;
	transition: all 0.15s;
}

.ck-c-media-btn:hover {
	background: #f8f9fb;
	border-color: #6366f1;
	color: #6366f1;
}

.ck-c-media-icon {
	font-size: 16px;
}

/* ─── Options Row ─── */
.ck-c-options-row {
	display: flex;
	gap: 12px;
	padding: 12px 20px;
}

.ck-c-option {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f8f9fb;
}

.ck-c-option-icon {
	font-size: 18px;
}

.ck-c-option-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
}

.ck-c-option-label {
	font-size: 11px;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 600;
}

.ck-c-select {
	border: none;
	background: none;
	font-size: 13px;
	font-weight: 500;
	color: #1f2937;
	cursor: pointer;
	padding: 2px 0;
	width: 100%;
	outline: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.ck-c-select:focus {
	outline: none;
	box-shadow: none;
	border: none;
}

/* Reset all composer inputs/selects focus */
.ck-composer-block select:focus,
.ck-composer-block input:focus,
.ck-composer-block button:focus {
	outline: none;
	box-shadow: none;
}

.ck-c-block-type:focus {
	outline: none;
	box-shadow: none;
}

/* ─── Hashtag / Mention ─── */
.ck-c-hashtag-row {
	padding: 0 20px 12px;
	position: relative;
}

.ck-c-hashtag-input {
	width: 100%;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 10px 40px 10px 14px;
	font-size: 13px;
	color: #1f2937;
	background: #f8f9fb;
	outline: none;
	transition: border-color 0.15s;
	box-sizing: border-box;
}

.ck-c-hashtag-input:focus {
	border-color: #6366f1;
}

.ck-c-hashtag-icon {
	position: absolute;
	right: 32px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	color: #9ca3af;
	font-weight: 700;
}

/* ─── Toggles ─── */
.ck-c-toggles-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	padding: 12px 20px;
	border-top: 1px solid #f3f4f6;
}

.ck-c-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	padding: 8px 12px;
	border-radius: 8px;
	transition: background 0.15s;
}

.ck-c-toggle:hover {
	background: #f8f9fb;
}

.ck-c-toggle-icon {
	font-size: 16px;
}

.ck-c-toggle-text {
	flex: 1;
	font-size: 13px;
	color: #4b5563;
}

.ck-c-toggle-input {
	display: none;
}

.ck-c-toggle-slider {
	position: relative;
	width: 36px;
	height: 20px;
	background: #d1d5db;
	border-radius: 10px;
	transition: background 0.2s;
	flex-shrink: 0;
}

.ck-c-toggle-slider::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
	box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.ck-c-toggle-input:checked + .ck-c-toggle-slider {
	background: #6366f1;
}

.ck-c-toggle-input:checked + .ck-c-toggle-slider::after {
	transform: translateX(16px);
}

/* ─── Schedule Row ─── */
.ck-c-schedule-row {
	padding: 0 20px 12px;
}

.ck-c-schedule-input {
	width: 100%;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	box-sizing: border-box;
}

/* ─── Footer ─── */
.ck-c-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-top: 1px solid #f3f4f6;
	background: #fafbfc;
}

.ck-btn-ghost {
	background: none;
	border: 1px solid #d1d5db;
	color: #4b5563;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s;
}

.ck-btn-ghost:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}

.ck-btn-post {
	padding: 10px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	background: #6366f1;
	color: #fff;
	cursor: pointer;
	transition: all 0.15s;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ck-btn-post:hover {
	background: #4f46e5;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.ck-btn-post:disabled {
	background: #c7c8f4;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* ─── Button Focus/Active Reset ─── */
.ck-composer-block button:focus,
.ck-composer-block button:active,
.ck-composer-block button:focus-visible,
.ck-composer-block select:focus,
.ck-composer-block select:active,
.ck-composer-block input:focus,
.ck-c-media-btn:focus,
.ck-c-media-btn:active,
.ck-c-media-btn:focus-visible,
.ck-c-fmt:focus,
.ck-c-fmt:active,
.ck-c-fmt:focus-visible,
.ck-c-link-btn:focus,
.ck-c-link-btn:active,
.ck-c-emoji-btn:focus,
.ck-c-emoji-btn:active,
.ck-c-collapsed-icon:focus,
.ck-c-collapsed-icon:active {
	outline: none !important;
	box-shadow: none !important;
	-webkit-tap-highlight-color: transparent !important;
	background-color: inherit;
	color: inherit;
	border-color: inherit;
}

.ck-c-fmt:active,
.ck-c-media-btn:active {
	transform: scale(0.96);
	opacity: 0.8;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
	.ck-c-media-row { flex-wrap: wrap; }
	.ck-c-media-btn { flex: 1 1 calc(50% - 4px); }
	.ck-c-options-row { flex-direction: column; }
	.ck-c-toggles-row { grid-template-columns: 1fr; }
	.ck-c-toolbar { flex-wrap: wrap; }
}
