/* Awais Instagram Downloader — front-end styles.
   Selectors are written with extra specificity on purpose so theme / Elementor
   button and input styles (e.g. Hello Elementor's pink borders) don't leak in. */

.awig,
.awig-guide {
	--awig-accent: #fd830a;
	--awig-accent-ink: #161823; /* text on accent; set per color by the plugin for readable contrast */
	--awig-ink: #161823;
	--awig-muted: #6b6f7b;
	--awig-line: #e6e7eb;
	--awig-soft: #f4f5f7;
	--awig-surface: #ffffff;
	--awig-radius: 14px;
	box-sizing: border-box;
	max-width: 780px;
	margin: 0 auto;
	color: var(--awig-ink);
	font-family: inherit;
	line-height: 1.5;
	text-align: left;
}

.awig *,
.awig *::before,
.awig *::after,
.awig-guide *,
.awig-guide *::before,
.awig-guide *::after {
	box-sizing: border-box;
}

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

/* ---------- Hero ---------- */
.awig__hero {
	text-align: center;
	margin: 0 0 22px;
}

.awig .awig__title {
	margin: 0 0 10px;
	padding: 0;
	color: var(--awig-ink);
	font-size: clamp(1.75rem, 4.5vw, 2.6rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.awig .awig__subtitle {
	margin: 0 auto;
	max-width: 600px;
	color: var(--awig-muted);
	font-size: 1.05rem;
}

/* ---------- Form ---------- */
.awig .awig__form {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 8px;
	background: var(--awig-surface);
	border: 1px solid var(--awig-line);
	border-radius: calc(var(--awig-radius) + 6px);
	box-shadow: 0 14px 40px -18px rgba(22, 24, 35, 0.28);
}

.awig__field {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
}

.awig__field-icon {
	position: absolute;
	left: 16px;
	width: 20px;
	height: 20px;
	color: var(--awig-muted);
	pointer-events: none;
}

.awig input.awig__input {
	display: block;
	width: 100%;
	height: 58px;
	margin: 0;
	padding: 0 104px 0 46px;
	border: 2px solid transparent;
	border-radius: var(--awig-radius);
	background: var(--awig-soft);
	color: var(--awig-ink);
	font-family: inherit;
	font-size: 16px; /* 16px stops iOS from zooming in */
	line-height: 1;
	outline: none;
	box-shadow: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.awig input.awig__input::placeholder {
	color: #9a9ca6;
	opacity: 1;
}

.awig input.awig__input:focus {
	border-color: var(--awig-accent);
	background: #fff;
	box-shadow: none;
}

.awig button.awig__paste,
.awig button.awig__clear {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--awig-line);
	border-radius: 10px;
	background: #fff;
	color: var(--awig-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.awig button.awig__clear {
	width: 38px;
	padding: 0;
	justify-content: center;
	border-color: transparent;
	background: transparent;
	color: var(--awig-muted);
}

.awig button.awig__paste svg,
.awig button.awig__clear svg {
	width: 18px;
	height: 18px;
	flex: none;
}

.awig button.awig__paste:hover,
.awig button.awig__paste:focus,
.awig button.awig__clear:hover,
.awig button.awig__clear:focus {
	background: var(--awig-soft);
	color: var(--awig-ink);
	border-color: var(--awig-line);
}

.awig button.awig__paste[hidden],
.awig button.awig__clear[hidden] {
	display: none;
}

.awig button.awig__submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex: none;
	min-width: 156px;
	height: 58px;
	margin: 0;
	padding: 0 26px;
	border: 0;
	border-radius: var(--awig-radius);
	background: var(--awig-accent);
	color: var(--awig-accent-ink);
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.awig button.awig__submit:hover,
.awig button.awig__submit:focus {
	background: var(--awig-accent);
	color: var(--awig-accent-ink);
	filter: brightness(1.06);
}

.awig button.awig__submit:active {
	transform: translateY(1px);
}

.awig button.awig__submit[disabled] {
	cursor: progress;
	opacity: 0.9;
}

.awig button:focus-visible,
.awig a:focus-visible,
.awig-guide summary:focus-visible {
	outline: 3px solid var(--awig-accent);
	outline-offset: 2px;
}

.awig__spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid currentColor;
	border-right-color: transparent;
	opacity: 0.85;
	border-radius: 50%;
	animation: awig-spin 0.7s linear infinite;
}

.awig.is-loading .awig__spinner {
	display: inline-block;
}

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

/* ---------- Status ---------- */
.awig__status:empty {
	display: none;
}

.awig__status {
	margin: 14px 0 0;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 15px;
	text-align: center;
	color: var(--awig-muted);
}

.awig__status.is-error {
	background: #fff1f2;
	border: 1px solid #fecdd3;
	color: #9f1239;
}

.awig__status.is-loading {
	background: var(--awig-soft);
}

/* ---------- Result card ---------- */
.awig__result {
	margin-top: 18px;
	animation: awig-in 0.25s ease-out;
}

.awig__result[hidden] {
	display: none;
}

@keyframes awig-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.awig__card {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	grid-template-areas:
		"thumb info"
		"thumb downloads";
	grid-template-rows: auto 1fr;
	gap: 14px 22px;
	padding: 18px;
	background: var(--awig-surface);
	border: 1px solid var(--awig-line);
	border-radius: calc(var(--awig-radius) + 6px);
	box-shadow: 0 14px 40px -22px rgba(22, 24, 35, 0.3);
}

.awig__thumb {
	grid-area: thumb;
	position: relative;
	align-self: start;
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: 420px;
	overflow: hidden;
	border-radius: 12px;
	background: linear-gradient(135deg, #fd830a2e, #1618230f), var(--awig-soft);
}

.awig__thumb.is-portrait {
	aspect-ratio: 9 / 16;
	width: 62%;
	justify-self: center;
}

.awig__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border: 0;
	border-radius: 0;
	max-width: none;
}

.awig__badge {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}

.awig__info {
	grid-area: info;
	min-width: 0;
}

.awig__author {
	margin: 2px 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: var(--awig-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.awig__author span {
	font-weight: 500;
	color: var(--awig-muted);
}

.awig .awig__caption {
	margin: 0;
	color: var(--awig-muted);
	font-size: 14px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.awig__downloads {
	grid-area: downloads;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-self: end;
}

.awig a.awig__btn {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 10px 16px;
	border: 1.5px solid transparent;
	border-radius: 12px;
	background: var(--awig-ink);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.awig a.awig__btn:hover,
.awig a.awig__btn:focus {
	color: #fff;
	text-decoration: none;
	filter: brightness(1.15);
}

.awig a.awig__btn:active {
	transform: translateY(1px);
}

.awig a.awig__btn.is-primary,
.awig a.awig__btn.is-primary:hover,
.awig a.awig__btn.is-primary:focus {
	background: var(--awig-accent);
	color: var(--awig-accent-ink);
}

.awig a.awig__btn.is-light,
.awig a.awig__btn.is-light:hover,
.awig a.awig__btn.is-light:focus {
	background: #fff;
	color: var(--awig-ink);
	border-color: var(--awig-line);
	filter: none;
}

.awig a.awig__btn.is-light:hover {
	background: var(--awig-soft);
}

.awig__btn svg {
	width: 20px;
	height: 20px;
	flex: none;
}

.awig__btn-label {
	flex: none;
	white-space: nowrap;
}

.awig__btn-meta {
	min-width: 0;
	margin-left: auto;
	font-size: 13px;
	font-weight: 500;
	opacity: 0.85;
	text-align: right;
}

/* Photo slideshows */
.awig__photos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	gap: 10px;
}

.awig a.awig__photo {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 10px;
	background: var(--awig-soft);
	color: #fff;
	text-decoration: none;
}

.awig a.awig__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
	max-width: none;
}

.awig a.awig__photo span {
	position: absolute;
	left: 6px;
	right: 6px;
	bottom: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 6px 4px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.72);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.awig a.awig__photo.is-video::before {
	content: "";
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.awig a.awig__photo span svg {
	width: 14px;
	height: 14px;
}

.awig a.awig__photo:hover span,
.awig a.awig__photo:focus span {
	background: var(--awig-accent);
	color: var(--awig-accent-ink);
}

.awig button.awig__again {
	display: block;
	margin: 14px auto 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--awig-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}

.awig button.awig__again:hover,
.awig button.awig__again:focus {
	background: var(--awig-soft);
	color: var(--awig-ink);
}

.awig .awig__note {
	margin: 16px auto 0;
	max-width: 620px;
	color: var(--awig-muted);
	font-size: 13px;
	text-align: center;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.awig .awig__form {
		flex-direction: column;
	}

	.awig button.awig__submit {
		width: 100%;
	}

	.awig__card {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"thumb"
			"info"
			"downloads";
		grid-template-rows: auto auto auto;
		padding: 14px;
	}

	.awig__thumb.is-portrait {
		width: 34%;
	}

	/* Carousels: the slides below already show every image, so keep the cover small. */
	.awig__card.is-gallery .awig__thumb {
		width: 40%;
		justify-self: center;
	}

	.awig__btn-meta {
		font-size: 12px;
	}

	.awig__card.is-images {
		grid-template-areas:
			"thumb info"
			"downloads downloads";
	}
}

@media (prefers-reduced-motion: reduce) {
	.awig *,
	.awig *::before,
	.awig *::after {
		animation-duration: 0.01ms !important;
		transition: none !important;
	}
}

/* ---------- Guide: how-to, features, FAQ ---------- */
.awig-guide {
	max-width: 980px;
	margin-top: 48px;
}

.awig-guide__section + .awig-guide__section {
	margin-top: 52px;
}

.awig-guide .awig-guide__title {
	margin: 0 0 22px;
	color: var(--awig-ink);
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-align: center;
}

.awig-guide .awig-guide__steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.awig-guide__step,
.awig-guide__feature {
	margin: 0;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--awig-line);
	border-radius: 16px;
}

.awig-guide__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: var(--awig-accent);
	color: var(--awig-accent-ink);
	font-weight: 800;
}

.awig-guide .awig-guide__step-title,
.awig-guide .awig-guide__feature-title {
	margin: 0 0 6px;
	color: var(--awig-ink);
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.3;
}

.awig-guide__step p,
.awig-guide__feature p,
.awig-guide__qa p {
	margin: 0;
	color: var(--awig-muted);
	font-size: 15px;
}

.awig-guide__features {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.awig-guide__feature {
	border-top: 3px solid var(--awig-accent);
}

.awig-guide__faq {
	max-width: 780px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.awig-guide__qa {
	background: #fff;
	border: 1px solid var(--awig-line);
	border-radius: 14px;
	overflow: hidden;
}

.awig-guide__qa summary {
	position: relative;
	padding: 16px 48px 16px 18px;
	color: var(--awig-ink);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.awig-guide__qa summary::-webkit-details-marker {
	display: none;
}

.awig-guide__qa summary::after {
	content: "+";
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 22px;
	font-weight: 500;
	color: var(--awig-accent);
}

.awig-guide__qa[open] summary::after {
	content: "\2212";
}

.awig-guide__qa p {
	padding: 0 18px 18px;
}

@media (max-width: 760px) {
	.awig-guide .awig-guide__steps,
	.awig-guide__features {
		grid-template-columns: 1fr;
	}
}
