/* Insta Story Share — front-end styles.
   Uses theme CSS variables with hard-coded fallbacks so it blends with any
   theme: the Twenty Twelve Child palette (--tt-accent, --tt-button-text,
   --tt-text, --tt-site-bg, --tt-border, --tt-muted) wins where it exists, then
   the Minimalist variables (--bg, --text, --border, ...), then the defaults.
   --iss-gradient is the Instagram fallback when no theme accent is defined. */

:root {
	--iss-gradient: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.iss-wrap {
	margin: 24px 0 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.428571429rem;
}

/* Chip styled after the theme's .post-share-link row (border, transparent
   background, icon + label, accent fill on hover). */
.iss-button {
	display: inline-flex;
	align-items: center;
	gap: 0.428571429rem;
	box-sizing: border-box;
	min-height: 2.285714286rem;
	margin: 0;
	padding: 0.357142857rem 0.5rem;
	border: 1px solid var(--tt-border, var(--border, #cccccc));
	border-radius: 3px;
	background: transparent;
	background-image: none;
	box-shadow: none;
	color: var(--tt-text, var(--text, #464646));
	font-family: inherit;
	font-size: 0.928571429rem;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.iss-button:hover,
.iss-button:focus {
	background: var(--tt-accent, var(--iss-gradient));
	background-image: none;
	border-color: var(--tt-accent, var(--border, #cccccc));
	color: var(--tt-button-text, #ffffff);
}

.iss-icon {
	display: block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.iss-button-text {
	font-size: 0.928571429rem;
}

.iss-button:focus-visible,
.iss-actions button:focus-visible,
.iss-close:focus-visible {
	outline: 2px solid var(--tt-text, var(--text, #333));
	outline-offset: 2px;
}

.iss-modal {
	border: none;
	border-radius: 14px;
	padding: 20px;
	background: var(--tt-site-bg, var(--bg, #fff));
	color: var(--tt-text, var(--text, #333));
	max-width: min(420px, 92vw);
	width: 100%;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.iss-modal::backdrop {
	background: rgba(0, 0, 0, 0.55);
}

.iss-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}

.iss-modal-header h2 {
	font-size: 1rem;
	margin: 0;
	font-family: inherit;
}

.iss-close {
	background: none;
	border: none;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	color: var(--tt-muted, var(--text-light, #999));
}

.iss-preview {
	aspect-ratio: 9 / 16;
	border-radius: 10px;
	overflow: hidden;
	background: var(--tt-border, var(--border, #eee));
}

.iss-preview canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.iss-actions {
	display: flex;
	gap: 10px;
	margin-top: 14px;
}

.iss-actions button {
	flex: 1;
	padding: 11px 12px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
}

.iss-download {
	background: var(--tt-border, var(--border-light, #ddd));
	color: var(--tt-text, var(--text, #333));
}

.iss-share {
	background: var(--tt-accent, var(--iss-gradient));
	color: var(--tt-button-text, #fff);
}

.iss-hint {
	min-height: 1.2em;
	font-size: 0.8rem;
	color: var(--tt-muted, var(--text-light, #999));
	margin: 10px 0 0;
}

@media (prefers-reduced-motion: reduce) {
	.iss-button {
		transition: none;
	}
}
