/*
 * Reveille Ads — Frontend CSS
 */

/* =============================================
   AD SLOT DISPLAY
   ============================================= */

.rad-slot {
	text-align: center;
	margin: 20px auto;
	max-width: 100%;
	overflow: hidden;
}

.rad-slot__label {
	display: block;
	font-family: 'Lato', 'Helvetica Neue', sans-serif;
	font-size: 10px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: .1em;
	margin-top: 4px;
	text-align: right;
}

.rad-slot__link {
	display: block;
	overflow: hidden;
}

.rad-slot__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0 auto;
	border-radius: 2px;
}

/* Device visibility */
.rad-slot--desktop { display: block; }
.rad-slot--mobile { display: none; }

@media (max-width: 768px) {
	.rad-slot--desktop { display: none; }
	.rad-slot--mobile { display: block; }
}

/* Slot sizes — width locked, height on link only */
.rad-slot--banner       { max-width: 1200px; }
.rad-slot--sidebar      { max-width: 300px; }
.rad-slot--in-article   { max-width: 720px; }
.rad-slot--mobile-banner   { max-width: 320px; }
.rad-slot--mobile-vertical { max-width: 300px; }

.rad-slot--banner .rad-slot__link       { max-height: 110px; }
.rad-slot--sidebar .rad-slot__link      { max-height: 250px; }
.rad-slot--in-article .rad-slot__link   { max-height: 90px; }
.rad-slot--mobile-banner .rad-slot__link   { max-height: 100px; }
.rad-slot--mobile-vertical .rad-slot__link { max-height: 600px; }

/* =============================================
   SKELETON SHIMMER
   ============================================= */

@keyframes rad-shimmer {
	0% { background-position: -400px 0; }
	100% { background-position: 400px 0; }
}

.rad-skel {
	background: linear-gradient(90deg, #eee 25%, #e0e0e0 37%, #eee 63%);
	background-size: 800px 100%;
	animation: rad-shimmer 1.8s ease infinite;
	border-radius: 4px;
}

.rad-skel--hl {
	height: 18px;
	margin-bottom: 8px;
}

.rad-skel--text {
	height: 12px;
	margin-bottom: 6px;
}

.rad-skel--img {
	height: 160px;
	width: 100%;
	margin: 16px 0;
	border-radius: 6px;
}

.rad-skel--card-img {
	height: 100px;
	width: 100%;
	border-radius: 4px;
}

.rad-skel-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.rad-skel-card {
	padding: 0;
}

/* =============================================
   SUBMISSION FORM
   ============================================= */

.rad-submit-page {
	max-width: 1100px;
	margin: 0 auto;
	padding: 40px 24px;
	font-family: 'Lato', 'Helvetica Neue', sans-serif;
}

.rad-submit-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: start;
}

.rad-form__title {
	font-family: 'Nimbus Roman', 'Georgia', serif;
	font-size: 1.8rem;
	font-weight: 500;
	margin-bottom: 6px;
	color: #121212;
}

.rad-form__subtitle {
	font-size: 14px;
	color: #727272;
	margin-bottom: 28px;
}

.rad-form__field {
	margin-bottom: 20px;
}

.rad-form__field label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #363636;
	margin-bottom: 6px;
}

.rad-optional {
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: #999;
	font-size: 12px;
}

.rad-form input[type="text"],
.rad-form input[type="url"],
.rad-form input[type="date"],
.rad-form select,
.rad-form textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #e2dfd7;
	border-radius: 8px;
	font-family: 'Lato', 'Helvetica Neue', sans-serif;
	font-size: 15px;
	color: #121212;
	background: #fff;
	transition: border-color .15s;
	box-sizing: border-box;
}

.rad-form input:focus,
.rad-form select:focus,
.rad-form textarea:focus {
	border-color: #121212;
	outline: none;
}

.rad-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* Upload zone */
.rad-form__upload {
	position: relative;
	border: 2px dashed #e2dfd7;
	border-radius: 12px;
	padding: 32px;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s, background .2s;
	min-height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rad-form__upload:hover,
.rad-form__upload.is-dragover {
	border-color: #121212;
	background: #fafafa;
}

.rad-form__upload input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}

.rad-form__upload-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: #999;
	font-size: 14px;
}

.rad-form__upload-placeholder svg {
	color: #ccc;
}

.rad-form__upload-preview {
	max-width: 100%;
	max-height: 200px;
	border-radius: 6px;
	object-fit: contain;
}

/* Agreement checkbox */
.rad-form__agree {
	margin-bottom: 20px;
}

.rad-form__checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: #363636;
	cursor: pointer;
	line-height: 1.4;
}

.rad-form__checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	cursor: pointer;
	margin: 0;
	position: relative;
	top: 2px;
}

.rad-form__checkbox-label a {
	color: #121212;
	text-decoration: underline;
}

/* Submit button */
.rad-form button.rad-form__submit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 32px;
	background: #121212;
	color: #fff;
	border: none;
	border-radius: 40px;
	font-family: 'Lato', 'Helvetica Neue', sans-serif;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}

.rad-form__submit:hover {
	background: #333;
}

.rad-form__submit:disabled {
	background: #999;
	cursor: not-allowed;
}

/* Message */
.rad-form__message {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
}

.rad-form__message.is-success {
	background: #d4edda;
	color: #155724;
}

.rad-form__message.is-error {
	background: #f8d7da;
	color: #721c24;
}

/* =============================================
   LIVE PREVIEW
   ============================================= */

.rad-preview-wrap {
	position: sticky;
	top: 100px;
}

.rad-preview__heading {
	font-family: 'Nimbus Roman', 'Georgia', serif;
	font-size: 1.2rem;
	font-weight: 500;
	margin-bottom: 4px;
	color: #121212;
}

.rad-preview__hint {
	font-size: 13px;
	color: #999;
	margin-bottom: 16px;
}

.rad-preview {
	background: #fff;
	border: 1px solid #e2dfd7;
	border-radius: 12px;
	overflow: hidden;
}

/* Context panels */
.rad-pv-ctx { display: none; }
.rad-pv-ctx--default { display: block; }

.rad-pv__pad { padding: 20px; }

/* Masthead skeleton */
.rad-pv__masthead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	border-bottom: 1px solid #e2dfd7;
	position: relative;
}

/* Logo in preview masthead */
.rad-pv__logo {
	height: 20px;
	width: auto;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.rad-pv__logo--sm {
	height: 18px;
}

/* Nav bar skeleton */
.rad-pv__nav {
	display: flex;
	justify-content: center;
	gap: 14px;
	padding: 8px 16px;
	border-bottom: 1px solid #e2dfd7;
}

/* Rules */
.rad-pv__rule {
	height: 2px;
	background: #121212;
	margin: 12px 0;
}

.rad-pv__rule-light {
	height: 1px;
	background: #e2dfd7;
}

/* Ad label text */
.rad-pv__adlabel {
	font-family: 'Source Sans 3', 'Lato', sans-serif;
	font-size: 10px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: .08em;
	text-align: center;
	margin: 10px 0 4px;
}

/* Section label */
.rad-pv__slbl {
	font-family: 'Source Sans 3', 'Lato', sans-serif;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #999;
	border-top: 3px double #121212;
	padding-top: 6px;
	margin-bottom: 10px;
}

/* Byline skeleton */
.rad-pv__byline {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 10px 0;
}

/* Standard 3-col grid */
.rad-pv__grid-std {
	display: grid;
	grid-template-columns: 2fr 2.5fr 1.5fr;
	gap: 14px;
	padding: 14px 16px;
}

.rad-pv__grid-left,
.rad-pv__grid-right {
	display: flex;
	flex-direction: column;
}

.rad-pv__grid-center {
	display: flex;
}

/* Features row */
.rad-pv__frow {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 12px;
}

.rad-pv__frow-txt {
	display: flex;
	flex-direction: column;
}

.rad-pv__frow-img {
	display: flex;
}

/* Sidebar layout */
.rad-pv__sidebar-layout {
	display: grid;
	grid-template-columns: 1.8fr 1fr;
	gap: 16px;
}

.rad-pv__sidebar-main {
	display: flex;
	flex-direction: column;
	border-right: 1px solid #e2dfd7;
	padding-right: 16px;
}

.rad-pv__sidebar-side {
	display: flex;
	flex-direction: column;
}

/* Mobile frame */
.rad-pv__mobile-frame {
	max-width: 340px;
	margin: 0 auto;
	border: 2px solid #ddd;
	border-radius: 20px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

/* Ad slot (shared) */
.rad-preview__ad-slot {
	border: 2px dashed #d4d0c8;
	border-radius: 6px;
	padding: 16px;
	text-align: center;
	margin: 8px auto;
	max-width: 100%;
	min-height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(200,195,185,.08);
	transition: all .3s ease;
	overflow: hidden;
	box-sizing: border-box;
}

.rad-preview__ad-slot.has-image {
	padding: 0;
	border: 1px solid #e2dfd7;
	background: #fff;
}

.rad-preview__ad-label {
	font-family: 'Source Sans 3', 'Lato', sans-serif;
	font-size: 12px;
	color: #bbb;
	font-style: italic;
}

.rad-preview__ad-slot.has-image .rad-preview__ad-label {
	display: none;
}

.rad-preview__ad-slot img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: 100%;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
}

/* =============================================
   MY ADS
   ============================================= */

.rad-my-ads {
	margin-top: 48px;
	border-top: 1px solid #e2dfd7;
	padding-top: 32px;
}

.rad-my-ads__title {
	font-family: 'Nimbus Roman', 'Georgia', serif;
	font-size: 1.3rem;
	font-weight: 500;
	margin-bottom: 20px;
	color: #121212;
}

.rad-my-ads__empty {
	font-size: 14px;
	color: #999;
	font-style: italic;
}

/* Card grid */
.rad-my-ads__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.rad-my-ads__card {
	background: #fff;
	border: 1px solid #e2dfd7;
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow .2s ease;
}

.rad-my-ads__card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.rad-my-ads__card-img {
	background: #f5f4f0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 140px;
	overflow: hidden;
}

.rad-my-ads__card-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 12px;
}

.rad-my-ads__card-noimg {
	font-size: 13px;
	color: #bbb;
	font-style: italic;
}

.rad-my-ads__card-body {
	padding: 14px 16px;
}

.rad-my-ads__card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}

.rad-my-ads__card-title {
	font-family: 'Lato', 'Helvetica Neue', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #121212;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.rad-my-ads__card-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'Lato', 'Helvetica Neue', sans-serif;
	font-size: 12px;
	color: #999;
}

/* Status badges */
.rad-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-family: 'Lato', 'Helvetica Neue', sans-serif;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	white-space: nowrap;
	flex-shrink: 0;
}

.rad-status--pending {
	background: #fef9e7;
	color: #9a7b1a;
}

.rad-status--approved {
	background: #e8f5e9;
	color: #2e7d32;
}

.rad-status--rejected {
	background: #fce4ec;
	color: #c62828;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
	.rad-submit-layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.rad-preview-wrap {
		position: static;
	}

	.rad-form__row {
		grid-template-columns: 1fr;
	}

	.rad-skel-cards {
		grid-template-columns: 1fr;
	}

	.rad-my-ads__grid {
		grid-template-columns: 1fr;
	}
}
