/*****************************************************************
* Diff Wizard - Flatboots friendly CSS
* Mantém o padrão visual do Flatboots sem sobrescrever o tema global
*****************************************************************/

/* =========================================================
   Botão do wizard no editor
   ========================================================= */
.btn-wizard-magic {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	gap: 6px;
	margin: 0 3px 0 6px;
	width: auto;
	min-width: 0;
	height: 36px;
	float: left;
	clear: none;
}

#imgurAnchor .btn-wizard-magic,
.posting-btns .btn-wizard-magic {
	display: inline-flex;
	align-items: center;
}

.btn-wizard-magic .fa {
	line-height: 1;
}

.btn-wizard-magic .icon {
	margin-right: 0;
}

.btn-wizard-magic span {
	line-height: 1.2;
}

/* =========================================================
   Overlay e modal
   ========================================================= */
.dw-modal-overlay {
	display: none;
	position: fixed;
	z-index: 100000;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.dw-modal-container {
	width: 100%;
	max-width: 1080px;
	max-height: 92vh;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.20);
	color: #555555;
}

.dw-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: #f9f9f9;
	border-bottom: 1px solid #e5e5e5;
	border-top: 4px solid #0088cc;
}

.dw-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.dw-title h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #555555;
	line-height: 1.2;
}

.dw-title .icon,
.dw-title .fa {
	color: #0088cc;
}

.dw-close-btn {
	padding: 6px 8px;
	border: 1px solid transparent;
	background: transparent;
	color: #777777;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.dw-close-btn:hover,
.dw-close-btn:focus {
	background: #f1f1f1;
	border-color: #dddddd;
	color: #005580;
	outline: none;
}

/* =========================================================
   Conteúdo
   ========================================================= */
.dw-step-content {
	padding: 16px;
}

.dw-input-group {
	margin-bottom: 16px;
}

.dw-input-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: #555555;
}

.dw-input-group .inputbox {
	width: 100%;
	box-sizing: border-box;
}

.dw-editor-grid {
	display: flex;
	gap: 16px;
}

.dw-editor-box {
	flex: 1;
	min-width: 0;
}

.dw-editor-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.dw-label-tag {
	display: inline-block;
	padding: 4px 9px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	border-radius: 3px;
	border: 1px solid transparent;
}

.tag-orig {
	background: #fff4f4;
	border-color: #f0caca;
	color: #a94442;
}

.tag-mod {
	background: #f4fbf4;
	border-color: #cfe8cf;
	color: #3c763d;
}

.dw-btn-upload {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid #d5d5d5;
	border-radius: 4px;
	background: #ffffff;
	color: #0088cc;
	cursor: pointer;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.dw-btn-upload:hover,
.dw-btn-upload:focus {
	background: #f5fbfe;
	border-color: #0088cc;
	color: #005580;
	outline: none;
}

#diff-wizard-modal textarea {
	width: 100%;
	min-height: 340px;
	box-sizing: border-box;
	resize: vertical;
	font-family: Consolas, "Courier New", monospace;
	font-size: 12px;
	line-height: 1.45;
	color: #333333;
	background: #ffffff;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	padding: 10px;
}

#diff-wizard-modal textarea:focus,
#diff-wizard-modal .inputbox:focus {
	border-color: #0088cc;
	box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.10);
	outline: none;
}

/* =========================================================
   Preview do diff
   ========================================================= */
.dw-preview-area {
	border: 1px solid #dcdcdc;
	border-radius: 4px;
	overflow: hidden;
	background: #ffffff;
}

.dw-diff-view {
	margin: 0;
	padding: 14px;
	max-height: 430px;
	overflow: auto;
	background: #fcfcfc;
	color: #333333;
	font-family: Consolas, "Courier New", monospace;
	font-size: 12px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}

.dw-diff-view span {
	display: block;
}

.dw-diff-added {
	background: #eef9ee;
	color: #2f6f2f;
	padding-left: 8px;
	border-left: 3px solid #62b462;
}

.dw-diff-removed {
	background: #fff0f0;
	color: #a94442;
	padding-left: 8px;
	border-left: 3px solid #d9534f;
}

.dw-diff-header {
	background: #eef7fc;
	color: #005580;
	padding-left: 8px;
	border-left: 3px solid #0088cc;
	font-weight: 700;
}

/* =========================================================
   Rodapé do modal
   ========================================================= */
.dw-modal-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #e5e5e5;
}

.dw-space-between {
	justify-content: space-between;
}

.dw-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

.dw-btn-copy.copied,
.btn-copy-diff.copied {
	opacity: 0.95;
}

/* =========================================================
   Botão copiar no diff renderizado
   ========================================================= */
.gh-diff-box .gh-diff-header,
.gh-diff-box > div:first-child {
	position: relative;
}

.btn-copy-diff {
	float: right;
	margin-left: 10px;
	padding: 4px 8px;
	border: 1px solid #bcdff1;
	border-radius: 4px;
	background: #f5fbfe;
	color: #0088cc;
	font-size: 11px;
	line-height: 1.2;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-copy-diff:hover,
.btn-copy-diff:focus {
	background: #eaf6fc;
	border-color: #0088cc;
	color: #005580;
	outline: none;
}

.btn-copy-diff .icon,
.btn-copy-diff .fa {
	margin-right: 4px;
}

/* =========================================================
   Bloco diff renderizado no post
   ========================================================= */
.gh-diff-box {
	margin: 10px 0;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	overflow: hidden;
	background: #ffffff;
}

.gh-diff-header {
	padding: 10px 12px;
	background: #f9f9f9;
	border-bottom: 1px solid #e5e5e5;
	border-top: 3px solid #0088cc;
	color: #555555;
	font-weight: 600;
	line-height: 1.4;
}

.gh-diff-box .diff-content,
.gh-diff-box .diff-engine {
	padding: 12px;
	background: #fcfcfc;
	color: #333333;
	font-family: Consolas, "Courier New", monospace;
	font-size: 12px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
	overflow-x: auto;
}

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 900px) {
	.dw-editor-grid {
		flex-direction: column;
	}

	.dw-modal-container {
		max-height: 96vh;
	}

	#diff-wizard-modal textarea {
		min-height: 220px;
	}
}

@media (max-width: 600px) {
	.dw-modal-overlay {
		padding: 10px;
	}

	.dw-modal-footer,
	.dw-space-between,
	.dw-group {
		flex-direction: column;
		align-items: stretch;
	}
}