/* Image Converter Suite — front-end styles */

.ics-tool {
	max-width: 780px;
	margin: 0 auto 40px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.ics-tool * {
	box-sizing: border-box;
}

.ics-header {
	text-align: center;
	margin-bottom: 20px;
}
.ics-title {
	font-size: 28px;
	margin: 0 0 8px;
}
.ics-description {
	font-size: 15px;
	color: #555;
	margin: 0 0 8px;
}
.ics-privacy {
	font-size: 13px;
	color: #2e7d32;
	background: #eef7ee;
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	margin: 0;
}

.ics-stats-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 13px;
	color: #666;
	margin: 12px 0 4px;
}
.ics-stat {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
}
.ics-stat-conversions,
.ics-stat-users,
.ics-stat-likes {
	font-weight: 700;
	color: #1a1a1a;
}
.ics-stat-sep {
	color: #ccc;
}
.ics-like-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f1f3f5;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	padding: 4px 12px;
	font-size: 13px;
	cursor: pointer;
	color: #444;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.ics-like-btn:hover {
	background: #e9ecef;
}
.ics-like-btn:active {
	transform: scale(0.97);
}
.ics-like-btn.ics-liked {
	background: #e7f5ff;
	border-color: #a5d8ff;
	color: #1971c2;
}
.ics-like-icon {
	font-size: 14px;
}

.ics-dropzone {
	border: 2px dashed #b8c2cc;
	border-radius: 12px;
	background: #fafbfc;
	padding: 40px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
	position: relative;
}
.ics-dropzone.ics-dragover {
	border-color: #4c6ef5;
	background: #eef1ff;
}
.ics-upload-icon {
	color: #4c6ef5;
	margin-bottom: 8px;
}
.ics-dropzone-text {
	font-size: 16px;
	font-weight: 600;
	margin: 6px 0 2px;
	color: #1a1a1a;
}
.ics-dropzone-sub {
	font-size: 13px;
	color: #888;
	margin: 0;
}
.ics-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}

.ics-quality-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
	font-size: 14px;
	color: #333;
}
.ics-quality-slider {
	flex: 1;
}

.ics-quality-hint {
	font-size: 12px;
	color: #888;
	margin: -8px 0 16px;
}

.ics-actions {
	display: flex;
	gap: 10px;
	margin: 18px 0;
	flex-wrap: wrap;
}
.ics-btn {
	border: none;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.05s ease;
}
.ics-btn:active {
	transform: scale(0.98);
}
.ics-btn-primary {
	background: #4c6ef5;
	color: #fff;
}
.ics-btn-primary:hover {
	background: #3b5bdb;
}
.ics-btn-secondary {
	background: #2f9e44;
	color: #fff;
}
.ics-btn-secondary:hover {
	background: #268a3a;
}
.ics-btn-ghost {
	background: transparent;
	color: #666;
	border: 1px solid #ccc;
}
.ics-btn-ghost:hover {
	background: #f1f1f1;
}
.ics-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ics-file-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ics-file-item {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 12px 14px;
	background: #fff;
}
.ics-file-thumb {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	background: #f1f1f1;
	flex-shrink: 0;
}
.ics-file-preview {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	background: #f1f1f1;
	flex-shrink: 0;
	border: 2px solid #2f9e44;
}
.ics-file-arrow {
	color: #2f9e44;
	font-size: 16px;
	flex-shrink: 0;
}
.ics-file-info {
	flex: 1;
	min-width: 0;
}
.ics-file-name {
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ics-file-meta {
	font-size: 12px;
	color: #888;
	margin-top: 2px;
}
.ics-file-meta .ics-size-new {
	color: #2f9e44;
	font-weight: 600;
}
.ics-file-meta .ics-reduction {
	color: #2f9e44;
}
.ics-file-status {
	font-size: 12px;
	padding: 3px 10px;
	border-radius: 20px;
	background: #f1f3f5;
	color: #666;
	flex-shrink: 0;
}
.ics-file-status.ics-status-done {
	background: #ebfbee;
	color: #2f9e44;
}
.ics-file-status.ics-status-error {
	background: #fff5f5;
	color: #e03131;
}
.ics-file-download {
	font-size: 13px;
	font-weight: 600;
	color: #4c6ef5;
	text-decoration: none;
	flex-shrink: 0;
	white-space: nowrap;
}
.ics-file-remove {
	background: none;
	border: none;
	color: #adb5bd;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 0 4px;
	flex-shrink: 0;
}
.ics-file-remove:hover {
	color: #e03131;
}

/* ---- Resize ---- */
.ics-resize-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
	flex-wrap: wrap;
}
.ics-resize-row label {
	font-size: 14px;
	color: #333;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ics-resize-row input[type="number"] {
	width: 90px;
	padding: 8px 10px;
	border: 1px solid #d5d9de;
	border-radius: 6px;
	font-size: 14px;
}
.ics-resize-lock-wrap {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 18px;
}

/* ---- Transform (rotate / flip) ---- */
.ics-transform-row {
	display: flex;
	gap: 10px;
	margin: 16px 0;
	flex-wrap: wrap;
}
.ics-btn.ics-active {
	background: #4c6ef5;
	color: #fff;
	border-color: #4c6ef5;
}

/* ---- Watermark ---- */
.ics-watermark-controls {
	margin: 16px 0;
	padding: 16px;
	background: #fafbfc;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}
.ics-wm-text-label {
	display: block;
	font-size: 14px;
	color: #333;
	margin-bottom: 12px;
}
.ics-wm-text {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 8px 10px;
	border: 1px solid #d5d9de;
	border-radius: 6px;
	font-size: 14px;
}
.ics-wm-row {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 10px;
	font-size: 14px;
	color: #333;
	align-items: center;
}
.ics-wm-row select {
	margin-left: 6px;
	padding: 6px 8px;
	border-radius: 6px;
	border: 1px solid #d5d9de;
}
.ics-wm-slider-label {
	display: flex;
	align-items: center;
	gap: 8px;
}
.ics-wm-slider-label input[type="range"] {
	width: 120px;
}

/* ---- Cropper ---- */
.ics-crop-wrap {
	position: relative;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 10px;
	background: #111;
	line-height: 0;
}
.ics-crop-image {
	display: block;
	max-width: 100%;
	max-height: 65vh;
	width: 100%;
	height: auto;
	user-select: none;
	-webkit-user-drag: none;
}
.ics-crop-box {
	position: absolute;
	border: 2px solid #4c6ef5;
	box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5);
	cursor: move;
	touch-action: none;
}
.ics-crop-handle {
	position: absolute;
	width: 16px;
	height: 16px;
	background: #4c6ef5;
	border: 2px solid #fff;
	border-radius: 50%;
	touch-action: none;
}
.ics-crop-handle[data-handle="nw"] { top: -9px; left: -9px; cursor: nwse-resize; }
.ics-crop-handle[data-handle="ne"] { top: -9px; right: -9px; cursor: nesw-resize; }
.ics-crop-handle[data-handle="sw"] { bottom: -9px; left: -9px; cursor: nesw-resize; }
.ics-crop-handle[data-handle="se"] { bottom: -9px; right: -9px; cursor: nwse-resize; }
.ics-crop-result {
	text-align: center;
	font-size: 13px;
	color: #666;
	margin-top: 10px;
}

/* ---- Icon / favicon generator ---- */
.ics-icon-preview {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	margin: 16px 0;
}
.ics-icon-preview img {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: repeating-conic-gradient(#f1f3f5 0% 25%, #fff 0% 50%) 50% / 12px 12px;
}

@media (max-width: 480px) {
	.ics-title {
		font-size: 22px;
	}
	.ics-file-item {
		flex-wrap: wrap;
	}
	.ics-crop-image {
		max-height: 50vh;
	}
}
