/* CC Astrophotos — profile gallery: state badges, banner and metadata dialog. */

.cc-astrophotos-state-holder {
	position: relative;
}

.cc-astrophotos-state {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	max-width: calc(100% - 16px);
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	color: #1d2327;
	background: #fcf0d4;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

button.cc-astrophotos-state {
	cursor: pointer;
}

.cc-astrophotos-state--draft {
	color: #fff;
	background: #b45309;
}

.cc-astrophotos-state--rejected {
	background: #fadcdc;
}

.cc-astrophotos-state:focus-visible,
.cc-astrophotos-button:focus-visible,
.cc-astrophotos-banner__action:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.cc-astrophotos-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 16px;
	padding: 12px 16px;
	color: #1d2327;
	background: #fcf0d4;
	border-left: 4px solid #b45309;
	border-radius: 2px;
}

.cc-astrophotos-banner--success {
	background: #d5f0dc;
	border-left-color: #007017;
}

.cc-astrophotos-banner__action,
.cc-astrophotos-button {
	padding: 8px 16px;
	font-size: 14px;
	line-height: 1.4;
	color: #0b1f3a;
	background: #fff;
	border: 1px solid #0b1f3a;
	border-radius: 4px;
	cursor: pointer;
}

.cc-astrophotos-button--primary {
	color: #fff;
	background: #0b1f3a;
}

.cc-astrophotos-button[disabled] {
	opacity: 0.6;
	cursor: default;
}

.cc-astrophotos-dialog {
	width: min(720px, calc(100vw - 24px));
	max-height: calc(100vh - 48px);
	padding: 20px;
	color: #1d2327;
	background: #fff;
	border: 0;
	border-radius: 6px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	box-sizing: border-box;
	overflow-y: auto;
}

.cc-astrophotos-dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.cc-astrophotos-dialog h2 {
	margin: 0 0 8px;
	font-size: 20px;
}

.cc-astrophotos-dialog__intro,
.cc-astrophotos-dialog__progress {
	margin: 0 0 12px;
}

.cc-astrophotos-dialog__progress {
	font-weight: 600;
}

.cc-astrophotos-dialog__progress:empty,
.cc-astrophotos-dialog__error:empty {
	display: none;
}

.cc-astrophotos-dialog__error {
	margin: 12px 0 0;
	color: #b32d2e;
}

.cc-astrophotos-dialog__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.cc-astrophotos-form {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 16px;
	align-items: start;
}

.cc-astrophotos-form__image {
	display: block;
	width: 100%;
	height: auto;
	background: #101418;
	border-radius: 4px;
}

.cc-astrophotos-form__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 12px;
}

.cc-astrophotos-form__field {
	margin: 0 0 10px;
}

.cc-astrophotos-form__field:first-child,
.cc-astrophotos-form__field:last-child {
	grid-column: 1 / -1;
}

.cc-astrophotos-form__field label {
	display: block;
	margin-bottom: 2px;
	font-size: 13px;
	font-weight: 600;
}

.cc-astrophotos-form__field input,
.cc-astrophotos-form__field select,
.cc-astrophotos-form__field textarea {
	width: 100%;
	padding: 6px 8px;
	font-size: 14px;
	color: #1d2327;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	box-sizing: border-box;
}

@media (max-width: 600px) {
	.cc-astrophotos-form,
	.cc-astrophotos-form__fields {
		grid-template-columns: 1fr;
	}

	.cc-astrophotos-form__image {
		max-width: 200px;
	}
}
