/* ==========================================================================
   Image Resizer Tool — Frontend Styles
   ========================================================================== */

.irt-wrap {
	max-width: 700px;
	margin: 0 auto;
	padding: 40px 20px 80px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: #212529;
	box-sizing: border-box;
}
.irt-wrap *,
.irt-wrap *::before,
.irt-wrap *::after {
	box-sizing: border-box;
}

/* Header */
.irt-header {
	text-align: center;
	margin-bottom: 30px;
}
.irt-icon {
	font-size: 44px;
	display: block;
	margin-bottom: 10px;
}
.irt-header h1 {
	font-size: 32px;
	font-weight: 800;
	margin: 0 0 10px;
	color: #111;
	line-height: 1.2;
}
.irt-header p {
	color: #5f6368;
	font-size: 15.5px;
	line-height: 1.6;
	max-width: 560px;
	margin: 0 auto;
}

/* Alerts (success / error) */
.irt-alert {
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14.5px;
	margin-bottom: 20px;
	text-align: center;
	font-weight: 600;
	animation: irt-fade-in 0.2s ease;
}
.irt-alert-success {
	background: #e6f7ee;
	color: #1a7f4e;
	border: 1px solid #b8e8cf;
}
.irt-alert-error {
	background: #fdecea;
	color: #c0392b;
	border: 1px solid #f5c2be;
}

@keyframes irt-fade-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Result box */
.irt-result-box {
	background: #f6f7f9;
	border: 1px solid #e7e9ec;
	border-radius: 12px;
	padding: 20px;
	text-align: center;
	margin-bottom: 25px;
	animation: irt-fade-in 0.25s ease;
}
.irt-result-info {
	display: flex;
	justify-content: center;
	gap: 24px;
	margin-bottom: 14px;
	font-size: 14.5px;
	flex-wrap: wrap;
}

/* Dropzone */
.irt-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border: 2.5px dashed #2b6cb0;
	border-radius: 16px;
	padding: 40px 20px;
	text-align: center;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
	background: #f5f9ff;
}
.irt-dropzone:hover {
	background: #eaf2ff;
	border-color: #1e4e8c;
}
.irt-dropzone.dragover {
	background: #eaf2ff;
	border-color: #1e4e8c;
}
.irt-dropzone input[type="file"] {
	display: none;
}
.irt-dropzone-icon {
	font-size: 34px;
	color: #2b6cb0;
	font-weight: 800;
	margin-bottom: 10px;
}
.irt-dropzone-text {
	font-size: 16.5px;
	font-weight: 700;
	color: #333;
	margin-bottom: 6px;
	word-break: break-all;
}
.irt-dropzone-sub {
	font-size: 13px;
	color: #8a8f98;
}
.irt-dropzone.has-file {
	border-style: solid;
}

/* Mode tabs */
.irt-mode-tabs {
	display: flex;
	gap: 10px;
	margin: 22px 0 16px;
}
.irt-tab {
	flex: 1;
	text-align: center;
	border: 1px solid #d7dae0;
	border-radius: 10px;
	padding: 11px 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	color: #444;
	transition: all 0.15s ease;
}
.irt-tab input {
	margin-right: 6px;
}
.irt-tab.active {
	border-color: #2b6cb0;
	background: #f5f9ff;
	color: #1e4e8c;
}

/* Fields */
.irt-fields {
	background: #fbfbfc;
	border: 1px solid #eceef1;
	border-radius: 12px;
	padding: 18px;
	margin-bottom: 18px;
}
.irt-field-row {
	display: flex;
	gap: 14px;
	margin-bottom: 12px;
}
.irt-field {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.irt-field label {
	font-size: 13px;
	font-weight: 600;
	color: #555;
}
.irt-field input,
.irt-field select {
	padding: 10px 12px;
	border: 1px solid #d7dae0;
	border-radius: 8px;
	font-size: 14px;
	width: 100%;
	background: #fff;
}
.irt-field input:focus,
.irt-field select:focus {
	outline: none;
	border-color: #2b6cb0;
	box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}
.irt-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	color: #555;
}
.irt-note {
	font-size: 12.5px;
	color: #8a8f98;
	margin: 6px 0 0;
	line-height: 1.5;
}

/* Buttons */
.irt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #2b6cb0;
	color: #fff !important;
	border: none;
	padding: 13px 34px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 10px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s ease;
}
.irt-btn:hover {
	background: #1e4e8c;
}
.irt-btn-submit {
	width: 100%;
}
.irt-btn:disabled {
	background: #a9c3e0;
	cursor: not-allowed;
}

/* Loading state */
.irt-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: irt-spin 0.7s linear infinite;
}
.irt-btn-submit.is-loading .irt-spinner {
	display: inline-block;
}
.irt-btn-submit.is-loading .irt-btn-label::after {
	content: attr(data-loading-text);
}
.irt-btn-submit.is-loading .irt-btn-label {
	font-size: 0;
}
.irt-btn-submit.is-loading .irt-btn-label::after {
	font-size: 16px;
}

@keyframes irt-spin {
	to { transform: rotate(360deg); }
}

.irt-form.is-loading .irt-dropzone,
.irt-form.is-loading .irt-mode-tabs,
.irt-form.is-loading .irt-fields {
	opacity: 0.55;
	pointer-events: none;
}

/* ==========================================================================
   Mobile responsiveness
   ========================================================================== */
@media (max-width: 600px) {
	.irt-wrap {
		padding: 24px 14px 60px;
	}
	.irt-header h1 {
		font-size: 26px;
	}
	.irt-header p {
		font-size: 14px;
	}
	.irt-dropzone {
		padding: 28px 14px;
	}
	.irt-mode-tabs {
		flex-direction: column;
	}
	.irt-field-row {
		flex-direction: column;
		gap: 12px;
	}
	.irt-result-info {
		flex-direction: column;
		gap: 6px;
	}
	.irt-btn {
		padding: 13px 20px;
	}
}

@media (max-width: 380px) {
	.irt-dropzone-icon {
		font-size: 28px;
	}
	.irt-dropzone-text {
		font-size: 14.5px;
	}
}
