/* Image containers */
.rush-image-container {
	position: relative;
	max-width: 100%;
	display: block;
	width: fit-content;
	margin: 10px 0;
}

.rush-image-container[data-rush-align="left"] {
	float: left;
	margin-right: 15px;
	margin-left: 0;
}

.rush-image-container[data-rush-align="center"] {
	float: none;
	margin-left: auto;
	margin-right: auto;
}

.rush-image-container[data-rush-align="right"] {
	float: right;
	margin-left: 15px;
	margin-right: 0;
}

.rush-editable-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: none;
}

/* Clear floats after rush-content */
.rush-content::after {
	content: '';
	display: table;
	clear: both;
}

/* Base content styles */
.rush-content,
.rush-editor-content {
	line-height: 1.6;
	color: #333;
}

/* Headings */
.rush-content h1,
.rush-editor-content h1 {
	font-size: 2em;
	font-weight: bold;
	margin: 0.67em 0;
}

.rush-content h2,
.rush-editor-content h2 {
	font-size: 1.5em;
	font-weight: bold;
	margin: 0.75em 0;
}

.rush-content h3,
.rush-editor-content h3 {
	font-size: 1.17em;
	font-weight: bold;
	margin: 0.83em 0;
}

.rush-content h4,
.rush-editor-content h4 {
	font-size: 1em;
	font-weight: bold;
	margin: 1.12em 0;
}

.rush-content h5,
.rush-editor-content h5 {
	font-size: 0.83em;
	font-weight: bold;
	margin: 1.5em 0;
}

.rush-content h6,
.rush-editor-content h6 {
	font-size: 0.75em;
	font-weight: bold;
	margin: 1.67em 0;
}

/* Paragraphs */
.rush-content p,
.rush-editor-content p {
	margin: 1em 0;
}

/* Lists */
.rush-content ul,
.rush-content ol,
.rush-editor-content ul,
.rush-editor-content ol {
	margin: 1em 0;
	padding-left: 40px;
	overflow: hidden; /* Prevent bullets from overlapping floated images */
}

.rush-content ul,
.rush-editor-content ul {
	list-style-type: disc;
	list-style-position: outside;
}

.rush-content ol,
.rush-editor-content ol {
	list-style-type: decimal;
	list-style-position: outside;
}

.rush-content li,
.rush-editor-content li {
	margin: 0.5em 0;
}

/* Blockquotes */
.rush-content blockquote,
.rush-editor-content blockquote {
	border-left: 4px solid #ccc;
	margin: 1em 0;
	padding-left: 16px;
	color: #666;
	font-style: italic;
	overflow: hidden; /* Prevent text from wrapping into floated images */
}

/* Code */
.rush-content code,
.rush-editor-content code {
	background-color: #f5f5f5;
	padding: 2px 6px;
	border-radius: 3px;
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.9em;
}

.rush-content pre,
.rush-editor-content pre {
	background-color: #f5f5f5;
	padding: 12px;
	border-radius: 4px;
	overflow: auto;
	margin: 1em 0;
}

.rush-content pre code,
.rush-editor-content pre code {
	padding: 0;
	background: none;
	font-size: 1em;
}

/* Tables */
.rush-content table,
.rush-editor-content table {
	border-collapse: collapse;
	width: 100%;
	margin: 1em 0;
}

.rush-content table td,
.rush-content table th,
.rush-editor-content table td,
.rush-editor-content table th {
	border: 1px solid #ddd;
	padding: 8px;
}

.rush-content table th,
.rush-editor-content table th {
	background-color: #f5f5f5;
	font-weight: bold;
	text-align: left;
}

.rush-content table tr:hover,
.rush-editor-content table tr:hover {
	background-color: #f9f9f9;
}

/* Horizontal rule */
.rush-content hr,
.rush-editor-content hr {
	border: none;
	border-top: 2px solid #ddd;
	margin: 1.5em 0;
}

/* Links */
.rush-content a,
.rush-editor-content a {
	color: #0066cc;
	text-decoration: underline;
}

.rush-content a:hover,
.rush-editor-content a:hover {
	color: #0052a3;
}

/* Legacy CKEditor figure elements */
figure.image {
	display: block;
	margin: 10px 0;
	max-width: 100%;
}

figure.image img {
	display: block;
	max-width: 100%;
	height: auto;
}

figure.image.image-style-align-left,
figure.image.image-style-side {
	float: left;
	margin-right: 15px;
	margin-left: 0;
}

figure.image.image-style-align-center {
	margin-left: auto;
	margin-right: auto;
}

figure.image.image-style-align-right {
	float: right;
	margin-left: 15px;
	margin-right: 0;
}

figure.image_resized {
	display: block;
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
}

figure.image_resized img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* Responsive styles */
@media (max-width: 768px) {
	.rush-image-container[data-rush-align="left"],
	.rush-image-container[data-rush-align="right"] {
		float: none;
		margin-left: auto;
		margin-right: auto;
	}

	.rush-editable-image {
		max-width: 100%;
	}

	figure.image.image-style-align-left,
	figure.image.image-style-align-right {
		float: none;
		margin-left: auto;
		margin-right: auto;
	}
}
