/**
 * Global pubbox composer styles (New post modal + inline composer).
 * Loaded from main/content.phtml on every page.
 */

/* Global modal uses inner cl-mc header — hide duplicate bootstrap header */
body div#add_new_post.modal.modal-pubbox .modal-header.modal-pubbox__header {
	display: none;
}

body div#add_new_post.modal.modal-pubbox .modal-body.modal-pubbox__body {
	padding: 0;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

body div#add_new_post.modal.modal-pubbox .modal-body.modal-pubbox__body .timeline-pubbox-container--modal {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

body div#add_new_post.modal.modal-pubbox .modal-body.modal-pubbox__body .timeline-pubbox-container--modal form.form {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

/* Category selector — inline timeline composer */
body div.timeline-pubbox-container .post-category,
body div#homepage-pubbox-modal .post-category,
body div#add_new_post.modal.modal-pubbox .cl-mc__category {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	min-width: 0;
}

body div.timeline-pubbox-container .post-category {
	margin-right: 10px;
}

body div.timeline-pubbox-container--modal form.form footer.cl-mc__dock div.cl-mc__dock-row--category {
	display: flex;
	align-items: center;
	width: 100%;
	padding-top: 8px;
	margin-top: 2px;
	border-top: 1px solid var(--cl-primary-border-color);
}

body div.timeline-pubbox-container--modal form.form footer.cl-mc__dock div.cl-mc__dock-row--category div.cl-mc__category {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	flex: 1;
	min-width: 0;
}

body div.timeline-pubbox-container--modal form.form footer.cl-mc__dock div.cl-mc__category-label {
	flex-shrink: 0;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--cl-secondary-text-color);
	white-space: nowrap;
}

body div.timeline-pubbox-container .post-category .form-control,
body div#homepage-pubbox-modal .post-category .form-control,
body div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control {
	min-width: 0;
	max-width: 100%;
	width: 100%;
	border-radius: 999px;
	font-size: 13px;
	height: 34px;
	padding: 4px 34px 4px 14px;
	border: 1px solid var(--cl-primary-border-color);
	color: var(--cl-primary-text-color);
	background-color: var(--cl-secondary-bg-color);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23818e9c' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 10px 7px;
	box-shadow: none;
	outline: 0;
	accent-color: var(--cl-primary-color);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

body[data-bg=dark] div.timeline-pubbox-container .post-category .form-control,
body[data-bg=dark] div#homepage-pubbox-modal .post-category .form-control,
body[data-bg=dark] div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238b949e' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body div.timeline-pubbox-container .post-category .form-control option,
body div#homepage-pubbox-modal .post-category .form-control option,
body div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control option {
	background-color: var(--cl-primary-bg-color);
	color: var(--cl-primary-text-color);
}

body div.timeline-pubbox-container .post-category .form-control option:checked,
body div#homepage-pubbox-modal .post-category .form-control option:checked,
body div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control option:checked {
	background-color: var(--cl-primary-color);
	color: #ffffff;
}

body div.timeline-pubbox-container .post-category .form-control option:hover,
body div#homepage-pubbox-modal .post-category .form-control option:hover,
body div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control option:hover,
body div.timeline-pubbox-container .post-category .form-control option:focus,
body div#homepage-pubbox-modal .post-category .form-control option:focus,
body div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control option:focus {
	background-color: var(--cl-primary-color);
	color: #ffffff;
}

body[data-bg=dark] div.timeline-pubbox-container .post-category .form-control,
body[data-bg=dark] div#homepage-pubbox-modal .post-category .form-control,
body[data-bg=dark] div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control {
	color-scheme: dark;
}

body div.timeline-pubbox-container .post-category .form-control:hover,
body div.timeline-pubbox-container .post-category .form-control:focus,
body div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control:hover,
body div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control:focus {
	border-color: var(--cl-primary-color);
	background-color: var(--cl-event-hover-bg);
}

body div.timeline-pubbox-container--modal form.form footer.cl-mc__dock {
	display: flex;
	flex-direction: column;
	gap: 0;
}

body div.timeline-pubbox-container--modal form.form div.cl-mc__dock-row--main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}

body div.timeline-pubbox-container--modal form.form footer.cl-mc__dock div.cl-mc__dock-row--main > div.timeline-pubbox__footer {
	flex: 1;
	min-width: 0;
	border-top: none;
	margin-top: 0;
	padding-top: 0;
}

@media (max-width: 575.98px) {
	body div.timeline-pubbox-container--modal form.form footer.cl-mc__dock div.cl-mc__dock-row--category div.cl-mc__category {
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
	}

	body div.timeline-pubbox-container .post-category .form-control,
	body div#add_new_post.modal.modal-pubbox .cl-mc__category .form-control {
		font-size: 12px;
		height: 32px;
	}
}
