/**
 * URL Encode & Decode tool — ShoutingNow theme.
 */

.sn-url.sn-ci-calc {
	max-width: 1200px;
	margin: 0 auto;
	padding-top: 0.5rem;
}

.sn-url {
	--sn-url-blue: #2b7ddb;
	--sn-url-blue-dark: #1f4f90;
	--sn-url-yellow: #f5c518;
	--sn-url-border: #dbe5f2;
}

.sn-url-mode-panel {
	margin-top: 0.25rem;
}

.sn-url-mode-panel[hidden] {
	display: none !important;
}

.sn-url-section__title {
	margin: 0 0 0.35rem;
	font-family: var(--font-heading, Sora, sans-serif);
	font-size: clamp(1.125rem, 1vw + 0.9rem, 1.375rem);
	font-weight: 700;
	color: var(--sn-url-blue-dark);
}

.sn-url-section__subtitle {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: #64748b;
}

.sn-url-divider {
	border: 0;
	border-top: 1px dashed var(--sn-url-border);
	margin: 1.75rem 0;
}

.sn-url-workspace {
	align-items: stretch;
}

@media (min-width: 1024px) {
	.sn-url .sn-ci-calc__layout.sn-url-workspace {
		flex-direction: row;
		align-items: stretch;
		gap: 1.5rem;
	}

	.sn-url .sn-ci-calc__inputs.sn-url-col-inputs {
		width: auto;
		max-width: none;
		flex: 1 1 50%;
		min-width: 0;
	}

	.sn-url .sn-ci-calc__results.sn-url-results {
		flex: 1 1 50%;
		display: flex;
		flex-direction: column;
		min-width: 0;
		min-height: 100%;
		align-self: stretch;
	}
}

.sn-url-col-inputs {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sn-url-input-field {
	margin-bottom: 0;
}

.sn-url-input-field .sn-wrt-textarea,
.sn-url-input {
	min-height: 9rem;
}

.sn-url-options-panel {
	margin-top: 0;
	border-left: 3px solid var(--sn-url-blue);
}

.sn-url-option:has( .sn-url-check ),
.sn-url-option:has( .sn-url-live-toggle ) {
	grid-template-columns: 1fr;
	align-items: start;
}

.sn-url-option:has( .sn-url-check ) .sn-url-option__desc,
.sn-url-option:has( .sn-url-live-toggle ) .sn-url-option__desc {
	padding-left: 1.45rem;
}

.sn-url-options-panel .sn-url-action-row {
	margin-top: 0.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--sn-ci-panel-border, #ced4da);
}

.sn-url-results {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.sn-url-results__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.sn-url-results__head .sn-ci-calc__result-title {
	margin-bottom: 0;
	flex: 1 1 auto;
	min-width: 0;
}

.sn-url-output-field {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	margin-bottom: 0;
	min-height: 0;
}

.sn-url-output-field .sn-wrt-textarea,
.sn-url-results .sn-url-output {
	flex: 1 1 auto;
	width: 100%;
	min-height: 14rem;
	height: 100%;
	resize: vertical;
}

@media (min-width: 1024px) {
	.sn-url-output-field .sn-wrt-textarea,
	.sn-url-results .sn-url-output {
		min-height: 20rem;
	}
}

.sn-url-results__label {
	display: none;
}

.sn-url-file-panel {
	margin-top: 0.25rem;
}

.sn-url-note,
.sn-url-warning {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0 0 1rem;
	padding: 0.65rem 0.75rem;
	border-radius: 0.5rem;
	font-size: 0.8125rem;
	line-height: 1.45;
}

.sn-url-note {
	background: #f8fafc;
	color: #475569;
	border: 1px solid #e2e8f0;
}

.sn-url-warning {
	background: #fffbeb;
	color: #92400e;
	border: 1px solid #fde68a;
}

.sn-url-note__icon,
.sn-url-warning__icon {
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	margin-top: 0.1rem;
}

.sn-url-options {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	border-left: none;
	background: transparent;
	border-radius: 0;
}

.sn-url-option {
	display: grid;
	grid-template-columns: minmax(0, 11rem) 1fr;
	gap: 0.5rem 1rem;
	align-items: center;
}

@media (min-width: 640px) {
	.sn-url-option {
		grid-template-columns: minmax(0, 13rem) 1fr;
	}
}

@media (min-width: 1024px) {
	.sn-url-options {
		grid-template-columns: 1fr;
	}

	.sn-url-option--wide {
		grid-column: 1 / -1;
	}
}

@media (max-width: 767px) {
	.sn-url-option {
		grid-template-columns: 1fr;
	}
}

.sn-url-option__desc {
	margin: 0;
	font-size: 0.8125rem;
	color: #64748b;
	line-height: 1.45;
}

.sn-url-check {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #0f172a;
	cursor: pointer;
}

.sn-url-check input {
	width: 1rem;
	height: 1rem;
	accent-color: var(--sn-url-blue);
}

.sn-url-live-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	width: 100%;
	min-height: 2.375rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--sn-ci-input-border, #ced4da);
	border-radius: 6px;
	background: #fff;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sn-url-live-toggle.is-on {
	background: var(--sn-url-blue-dark);
	border-color: var(--sn-url-blue-dark);
	color: #fff;
}

.sn-url-live-toggle__icon {
	width: 1rem;
	height: 1rem;
}

.sn-url-action-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	margin-top: 0.75rem;
	margin-bottom: 0;
}

.sn-url-action-row .sn-url-download {
	margin-top: 0;
	text-decoration: none;
	border-color: #e8ba17;
	color: #1a1a1a;
}

.sn-url-action-row .sn-url-download:hover {
	border-color: #c99700;
	color: #1a1a1a;
	background: #fffbeb;
}

.sn-url-action-row .sn-url-download[hidden] {
	display: none;
}

.sn-url-action-row .sn-ci-calc__btn-calc {
	width: auto;
	min-width: 9rem;
	flex-shrink: 0;
}

.sn-url-action__hint {
	margin: 0;
	font-size: 0.8125rem;
	color: #64748b;
	line-height: 1.45;
}

.sn-url-output--encode {
	background: #f0fdf4;
	border-color: #bbf7d0;
}

.sn-url-output--decode {
	background: #faf5ff;
	border-color: #e9d5ff;
}

.sn-url-copy {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-shrink: 0;
}

.sn-url-copy--head {
	border: 1px solid var(--sn-ci-panel-border, #ced4da);
	border-radius: 0.375rem;
	background: #fff;
	padding: 0.375rem 0.65rem;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--color-text, #0f172a);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.sn-url-copy--head:hover,
.sn-url-copy--head:focus-visible {
	border-color: var(--sn-url-blue);
	color: var(--sn-url-blue);
	outline: none;
}

.sn-url-copy__icon {
	width: 1rem;
	height: 1rem;
}

.sn-url-file-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 7rem;
	margin-bottom: 1rem;
	padding: 1.25rem;
	border: 2px dashed #cbd5e1;
	border-radius: 0.625rem;
	background: #f8fafc;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sn-url-file-drop:hover,
.sn-url-file-drop:focus-within {
	border-color: var(--sn-url-blue);
	background: #f6faff;
}

.sn-url-file-drop__icon {
	width: 2rem;
	height: 2rem;
	color: var(--sn-url-blue);
}

.sn-url-file-drop__label {
	font-size: 0.9375rem;
	font-weight: 600;
	color: #334155;
}

.sn-url-file-drop__name {
	font-size: 0.8125rem;
	color: #64748b;
}

.sn-url-status {
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	color: #475569;
}

.sn-url-review {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--sn-url-border);
}

/* Custom grouped select — sn-ci-calc trigger + glass menu */
.sn-url-select {
	position: relative;
	width: 100%;
}

.sn-url-select__native {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sn-url-select__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.375rem 2.25rem 0.375rem 0.75rem;
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--color-text, #0f172a);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 16px 12px;
	border: 1px solid var(--sn-ci-input-border, #ccc);
	border-radius: 6px;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sn-url-select__trigger:hover:not(:disabled) {
	border-color: #b0b0b0;
}

.sn-url-select__trigger:focus-visible {
	border-color: #a0aec0;
	outline: 2px solid #e2e8f0;
}

.sn-url-select__trigger:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.sn-url-select__value {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sn-url-select__chevron {
	display: none;
}

.sn-url-select__menu {
	position: absolute;
	z-index: 40;
	top: calc(100% + 0.35rem);
	left: 0;
	right: 0;
	max-height: 18rem;
	overflow: auto;
	padding: 0.35rem;
	border: 1px solid rgba(255, 255, 255, 0.65);
	border-radius: 0.75rem;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.sn-url-select__group {
	margin: 0.35rem 0.5rem 0.25rem;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #94a3b8;
}

.sn-url-select__option {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.45rem 0.55rem;
	border: none;
	border-radius: 0.45rem;
	background: transparent;
	font: inherit;
	font-size: 0.875rem;
	text-align: left;
	color: #0f172a;
	cursor: pointer;
}

.sn-url-select__option:hover,
.sn-url-select__option:focus-visible {
	background: rgba(43, 125, 219, 0.1);
	outline: none;
}

.sn-url-select__option.is-selected {
	font-weight: 600;
	color: var(--sn-url-blue-dark);
}

.sn-url-select__check,
.sn-url-select__check-placeholder {
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
}

.sn-url-select[data-url-select-disabled] .sn-url-select__trigger {
	opacity: 0.55;
	cursor: not-allowed;
}

.sn-url-select--compact .sn-url-select__menu {
	max-height: 8rem;
}
