/* These are CSS tweaks that (probably) need to be integrated back into the master CSS */
:root {
	--border-neutral: #e0e0e0;
	--text-medium: #717171;
	--text-neutral-dark: #e1e3e4;
	--fill-neutral-light: #F0F2F3;
	--fill-black: #1D1D23;
	--text-strong: #1D1D23;
	--text-primary: #5257F7;
	--bs-danger-rgb: 204, 0, 0;
}

.inverse .alert-success {
	background: #017b00;
	color: #fff;
}

.inverse .alert-info {
	background: #f2f9fb;
}

.success-msg h1::before {
	background: url("../../images/content/single-planet.svg") no-repeat;
	background-size: contain;
}

input.form-check-input[type=checkbox] {
	width: 24px;
	height: 24px;
}
input.form-check-input[type=checkbox] + label.form-check-label {
	padding-left: 12px;
	vertical-align: sub;
}
.form-switch input.form-check-input[type=checkbox] {
	width: 40px;
}

.form-floating > label {
	color: var(--text-medium);
}

/*
Fixed navbar tends to cover content, especially at smaller screen sizes.
Changed this from position: fixed -> position: sticky as a temporary fix.
.navbar.fixed-top {
	position: sticky;
}
*/


/* Fixes close button for flash messages sitting outside the message border */
.alert-dismissible .btn-close {
	padding: .6125rem;
}

.flash {
	animation: fadeIn forwards 1s;
}

@keyframes fadeIn {
	0%   { opacity: 0; }
	100% { opacity: 1; }
}

body.landing .flash {
	position: absolute;
	top: 70px;
	left: 50%;
	transform: translateX(-50%);
}

body:not(.dashboard) .flash {
	max-width: 600px;
	margin: 20px auto 0;
}


/*****************************************
/ Password visibility toggle for forms.
/*****************************************/

input + .password-visibility-toggle {
	display: block;
	width: 58px;
	height: 58px;
	cursor: pointer;
	position: absolute;
	top: 0;
	right: 0;
}

@media screen and (max-width: 575px) {
	input + .password-visibility-toggle {
		width: 37px;
		height: 37px;
	}
}

input + .password-visibility-toggle svg {
	width: 24px;
	height: 24px;
	display: none;
	position: relative;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

input[type=password] + .password-visibility-toggle svg#icon-eye-hidden {
	display: block;
}
input[type=text] + .password-visibility-toggle svg#icon-eye {
	display: block;
}

input.has-password-visibility.form-control.is-invalid,
input.has-password-visibility.form-control.is-valid,
input.has-password-visibility.form-control:invalid,
input.has-password-visibility.form-control:valid {
	background-image: none;
}

input.has-password-visibility.form-control.is-invalid + .password-visibility-toggle {
	color: var(--bs-danger);
}

input.has-password-visibility.form-control.is-valid + .password-visibility-toggle {
	color: var(--bs-success);
}

/* Page loading animation */
.page-loading {
	height: 100%;
	overflow: hidden;
}
.page-loading:after {
	content: '';
	position: absolute;
	width:100%;
	height: 100%;
	background-color: rgba(255,255,255,0.4);
	z-index: 1600;
}

#loading-svg {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 112px;
	height: 44px;
	transform: translate(-50%, -100%);
}

.page-loading #loading-svg {
	display: block;
	z-index: 2000;
}

#page-loading circle {
	fill: #555759;
	stroke: #2b2b2c;
	stroke-width: 3px;
	transform: translateY(30%);
	animation: loadBounce 1s infinite;
	animation-delay: calc(var(--order) * 200ms);
}

.foot-links {
	margin: 24px 0;
}
.foot-links a {
	color: var(--text-neutral-dark);
}

.btn-lg {
	font-size: 18px;
	padding-top: 12px;
	padding-bottom: 12px;
}

.btn-outline {
	border-width: 2px;
	color: var(--text-strong);
}

.fill-neutral-light {
	background-color: var(--fill-neutral-light);
}

@keyframes loadBounce {
	30% { transform: translateY(0) }
	50% { transform: translateY(5%) scaleY(1.1) }
	60% { transform: translateY(30%); }
	80% { transform: translateY(45%) scaleY(0.8); }
	100% { transform: translateY(30%); }
}

#dashboard-navigation .user-display dt {
	max-width: 172px;
	text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* [href=~=x] didn't seem to work for social profile links */
.profile-grid a.twitter:before {
	background-image: url("/images/ui/socialmedia/icon-twitter-dark.svg");
}
.profile-grid a.instagram:before {
	background-image: url("/images/ui/socialmedia/icon-instagram-dark.svg");
}
.profile-grid a.youtube:before {
	background-image: url("/images/ui/socialmedia/icon-youtube-dark.svg");
}

/* Black for nav-pills (used on Dashboard > Pledges) */
.nav-pills .nav-link {
	color: var(--text-strong);
}
.nav-pills .nav-link.active {
	background-color: var(--fill-black);
}

/* Cards */
.card-footer {
	background-color: white;
	padding: 16px;
}

.rounded-4 {
    border-radius: 0.5rem !important;
}

.card.rounded-4 .card-footer:last-child {
	border-radius: 0 0 0.5rem 0.5rem;
}

/* Social icons */
.social-list a:before {
	background-image: url("../images/ui/socialmedia/icon-facebook-dark.svg");
}
.social-list a[href^="https://twitter.com/"]:before {
	background-image: url("../images/ui/socialmedia/icon-twitter-dark.svg");
}
.social-list a[href^="https://discord.gg/"]:before {
	background-image: url("../images/ui/socialmedia/icon-discord.svg");
}
.social-list a[href^="https://t.me/"]:before {
	background-image: url("../images/ui/socialmedia/icon-telegram.svg");
}
.social-list a[href$=".substack.com"]:before {
	background-image: url("../images/ui/socialmedia/icon-substack-dark.svg");
}
.social-list a[href^="https://www.youtube.com"]:before {
	background-image: url("../images/ui/socialmedia/icon-youtube-dark.svg");
}

/* Colored rings around subscriber photos */
.profile-head .profile-photo.gold-subscriber {
	border-color: gold;
}

.profile-head .profile-photo.silver-subscriber {
	border-color: silver;
}

.profile-head .profile-photo.bronze-subscriber {
	border-color: #cd7f32;
}

/* Mobile layout for profile */
@media screen and (max-width:767px) {
	.profile-head .card-body {
		align-items: center;
	}
	.profile-head .spliter {
		align-items: center!important;
		text-align: center;
	}
}

/* for 'beta' tag */
.navbar-brand {
	display: inline-block;
}
header.nonav {
	align-items: center;
}
header.nonav .navbar-brand {
	margin-right: 10px;
}