/**
 * Shared Reading — Public Page Styles
 *
 * Styles for the [aior-shared-reading] shortcode.  Scoped under
 * .aior-shared-reading so nothing bleeds into the host theme.
 *
 * @package    AI_Oracle_Reader
 * @since      3.19.0
 */

/* ── Wrapper ── */
.aior-shared-reading {
	max-width: 800px;
	margin: 0 auto;
	padding: 24px 16px 48px;
	font-family: inherit;
	color: inherit;
}

/* ── Header ── */
.aior-shared-header {
	text-align: center;
	margin-bottom: 32px;
}

.aior-shared-badge {
	display: inline-block;
	background: #6c3fc5;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 4px 14px;
	border-radius: 20px;
	margin-bottom: 12px;
}

.aior-shared-title {
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.2;
}

.aior-shared-deck,
.aior-shared-date,
.aior-shared-views {
	font-size: 14px;
	color: #777;
	margin: 4px 0;
}

/* ── Section wrapper ── */
.aior-shared-section {
	background: #f9f7ff;
	border: 1px solid #e8e0f8;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
}

.aior-shared-section h2 {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 16px;
	color: #6c3fc5;
	letter-spacing: 0.02em;
}

/* ── Question ── */
.aior-question-text {
	font-size: 1.05rem;
	font-style: italic;
	line-height: 1.6;
	margin: 0;
}

/* ── Cards grid ── */
.aior-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 160px));
	gap: 16px;
	justify-content: center;
}

.aior-shared-card-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
}

.aior-shared-card-image {
	width: 100%;
	max-width: 120px;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.aior-shared-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aior-shared-card-item.aior-reversed .aior-card-reversed {
	transform: rotate(180deg);
}

.aior-card-position {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #9b72d4;
}

.aior-card-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.aior-reversed-label {
	display: block;
	font-size: 11px;
	font-weight: 400;
	color: #888;
	font-style: italic;
}

/* ── Interpretation ── */
.aior-interpretation-text {
	font-size: 1rem;
	line-height: 1.8;
}

.aior-interpretation-text p {
	margin: 0 0 1em;
}

.aior-interpretation-text p:last-child {
	margin-bottom: 0;
}

/* ── Reflection Questions ── */
.aior-reflection-list {
	margin: 0;
	padding: 0 0 0 20px;
}

.aior-reflection-list li {
	margin-bottom: 10px;
	line-height: 1.6;
}

/* ── Social Share ── */
.aior-shared-social h3 {
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #6c3fc5;
	margin: 0 0 14px;
}

.aior-social-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.aior-social-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
	border: none;
	line-height: 1;
}

.aior-social-btn:hover {
	opacity: 0.85;
	transform: translateY(-1px);
}

.aior-social-btn:active {
	transform: translateY(0);
}

.aior-social-twitter   { background: #000;    color: #fff; }
.aior-social-facebook  { background: #1877f2; color: #fff; }
.aior-social-pinterest { background: #e60023; color: #fff; }
.aior-social-email     { background: #555;    color: #fff; }
.aior-social-copy      { background: #6c3fc5; color: #fff; }

/* ── Attribution Footer ── */
.aior-shared-attribution {
	text-align: center;
	margin-top: 32px;
	font-size: 14px;
	color: #888;
}

.aior-attribution-rule {
	border: none;
	border-top: 1px solid #e8e0f8;
	margin: 0 0 16px;
}

.aior-shared-attribution a {
	color: #6c3fc5;
	text-decoration: none;
}

.aior-shared-attribution a:hover {
	text-decoration: underline;
}

/* ── Error state ── */
.aior-shared-error .aior-shared-header {
	padding: 48px 16px;
}

.aior-shared-error .aior-shared-header h1 {
	color: #c0392b;
	margin-bottom: 12px;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
	.aior-shared-section {
		background: #1a1128;
		border-color: #3d2a6e;
		color: #e0d6f7;
	}

	.aior-shared-deck,
	.aior-shared-date,
	.aior-shared-views {
		color: #aaa;
	}

	.aior-shared-card-image {
		box-shadow: 0 2px 8px rgba(0,0,0,0.5);
	}

	.aior-reversed-label {
		color: #aaa;
	}
}

/* ── Responsive ── */
@media (max-width: 480px) {
	.aior-cards-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.aior-social-buttons {
		flex-direction: column;
	}

	.aior-social-btn {
		justify-content: center;
	}
}

/* ── 3.26.4: cards fit the box; labels easier to read; whole card art ── */
.aior-shared-cards h2 {
	font-size: 1.5rem;
	text-align: center;
	margin-bottom: 20px;
}

.aior-cards-grid {
	grid-template-columns: repeat(var(--aior-cols, 5), minmax(0, 150px));
	gap: 22px 16px;
}

.aior-shared-card-item {
	min-width: 0;
}

.aior-shared-card-image {
	max-width: 150px;
	aspect-ratio: auto;
}

.aior-shared-card-image img {
	display: block;
	height: auto;
	object-fit: contain;
}

.aior-card-position {
	font-size: 13px;
	font-weight: 700;
	color: #5b21b6;
}

.aior-card-name {
	font-size: 16px;
	font-weight: 700;
}

.aior-reversed-label {
	font-size: 13px;
}

@media (max-width: 760px) {
	.aior-cards-grid.aior-cols-4,
	.aior-cards-grid.aior-cols-5 {
		grid-template-columns: repeat(3, minmax(0, 150px));
	}
}

@media (max-width: 480px) {
	.aior-cards-grid.aior-cols-3,
	.aior-cards-grid.aior-cols-4,
	.aior-cards-grid.aior-cols-5 {
		grid-template-columns: repeat(2, minmax(0, 150px));
	}
}

@media (prefers-color-scheme: dark) {
	.aior-card-position {
		color: #c4b5fd;
	}
}
