/* Clase Stories */
.clase-stories,
.clase-stories *,
.clase-story-modal,
.clase-story-modal *,
.clase-story-viewer,
.clase-story-viewer * {
	box-sizing: border-box;
}

.clase-stories {
	margin: 0 0 16px;
	padding: 14px 0 12px;
	background: #FFF;
	border: 1px solid #E3E9F2;
	border-radius: 18px;
	box-shadow: 0 6px 20px rgba(11, 40, 74, .045);
}

.clase-stories-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 0 18px 12px;
}

.clase-stories-title {
	color: #0B284A;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .01em;
}

.clase-stories-hint {
	color: #8A94A6;
	font-size: 11px;
}

.clase-stories-track {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0 18px 4px;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}

.clase-stories-track::-webkit-scrollbar {
	display: none;
}

.clase-story-item {
	position: relative;
	flex: 0 0 auto;
	width: 76px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #25324A;
	font-family: inherit;
	text-align: center;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.clase-story-item:focus-visible {
	outline: 2px solid #5A89D0;
	outline-offset: 4px;
	border-radius: 12px;
}

.clase-story-ring {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin: 0 auto 6px;
	padding: 3px;
	border-radius: 50%;
	background: linear-gradient(145deg, #0B284A 0%, #5A89D0 58%, #8FB4E8 100%);
}

.clase-story-item.is-seen .clase-story-ring {
	background: #D6DDE9;
}

.clase-story-avatar {
	display: block;
	width: 62px;
	height: 62px;
	overflow: hidden;
	border: 2px solid #FFF;
	border-radius: 50%;
	background: #EEF2F8;
}

.clase-story-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.clase-story-name {
	display: block;
	max-width: 76px;
	overflow: hidden;
	color: #4A5770;
	font-size: 11px;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.clase-story-add .clase-story-ring {
	background: #F1F5FA;
	border: 1px dashed #B7C5D9;
}

.clase-story-add .clase-story-avatar {
	opacity: .88;
}

.clase-story-plus {
	position: absolute;
	right: -1px;
	bottom: -1px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 23px;
	height: 23px;
	border: 2px solid #FFF;
	border-radius: 50%;
	background: #0B284A;
	color: #FFF;
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
}

.clase-story-add .clase-story-plus {
	background: #5A89D0;
}

.clase-stories-empty {
	flex: 0 0 auto;
	align-self: center;
	padding: 0 6px 8px;
	color: #9AA3B2;
	font-size: 11px;
	white-space: nowrap;
}

/* Upload modal */
.clase-story-modal,
.clase-story-viewer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.clase-story-modal[hidden],
.clase-story-viewer[hidden] {
	display: none !important;
}

.clase-story-modal-backdrop,
.clase-story-viewer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 15, 32, .78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.clase-story-modal-card {
	position: relative;
	z-index: 1;
	width: min(440px, 100%);
	max-height: 92vh;
	overflow-y: auto;
	padding: 20px;
	border-radius: 20px;
	background: #FFF;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
}

.clase-story-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.clase-story-modal-head strong {
	color: #0B284A;
	font-size: 17px;
}

.clase-story-x {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #EEF2F8;
	color: #0B284A;
	font-family: inherit;
	font-size: 23px;
	line-height: 1;
	cursor: pointer;
}

.clase-story-x:hover {
	background: #E2E9F3;
}

.clase-story-x-light {
	background: rgba(255, 255, 255, .18);
	color: #FFF;
}

.clase-story-x-light:hover {
	background: rgba(255, 255, 255, .3);
}

.clase-story-drop {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	overflow: hidden;
	padding: 16px;
	border: 1.5px dashed #B9C7DB;
	border-radius: 14px;
	background: #F8FAFD;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
}

.clase-story-drop:hover,
.clase-story-drop.is-dragover {
	border-color: #5A89D0;
	background: #EEF4FC;
}

.clase-story-drop-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	color: #6B7A91;
	text-align: center;
}

.clase-story-drop-empty strong {
	color: #25324A;
	font-size: 14px;
}

.clase-story-drop-empty span:last-child {
	color: #8A94A6;
	font-size: 11px;
}

.clase-story-drop-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-bottom: 4px;
	border-radius: 50%;
	background: #0B284A;
	color: #FFF;
	font-size: 28px;
	line-height: 1;
}

.clase-story-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.clase-story-preview[hidden] {
	display: none;
}

.clase-story-preview img,
.clase-story-preview video {
	display: block;
	max-width: 100%;
	max-height: 320px;
	border-radius: 10px;
}

#clase-story-caption {
	width: 100%;
	height: 42px;
	margin-top: 14px;
	padding: 0 13px;
	border: 1px solid #DDE5F0;
	border-radius: 10px;
	background: #FFF;
	color: #25324A;
	font-family: inherit;
	font-size: 13px;
	outline: 0;
}

#clase-story-caption:focus {
	border-color: #5A89D0;
	box-shadow: 0 0 0 3px rgba(90, 137, 208, .14);
}

.clase-story-note {
	margin: 9px 2px 0;
	color: #8A94A6;
	font-size: 11px;
}

.clase-story-error {
	margin-top: 12px;
	padding: 9px 11px;
	border-radius: 9px;
	background: #FFF1F1;
	color: #A33131;
	font-size: 12px;
	line-height: 1.35;
}

.clase-story-error[hidden] {
	display: none;
}

.clase-story-upload-progress {
	height: 4px;
	margin-top: 12px;
	overflow: hidden;
	border-radius: 999px;
	background: #E8EEF7;
}

.clase-story-upload-progress[hidden] {
	display: none;
}

.clase-story-upload-progress span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: #5A89D0;
	transition: width .2s ease;
}

.clase-story-submit {
	width: 100%;
	height: 44px;
	margin-top: 14px;
	border: 1px solid #0B284A;
	border-radius: 11px;
	background: #0B284A;
	color: #FFF;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease, opacity .2s ease;
}

.clase-story-submit:hover:not(:disabled) {
	background: #173D6A;
}

.clase-story-submit:disabled {
	opacity: .45;
	cursor: default;
}

/* Viewer */
.clase-story-viewer {
	padding: 0;
}

.clase-story-viewer-card {
	position: relative;
	z-index: 1;
	width: min(420px, 100vw);
	height: min(780px, 94vh);
	overflow: hidden;
	border-radius: 20px;
	background: #050B16;
	box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.clase-story-progress-bars {
	position: absolute;
	top: 9px;
	left: 10px;
	right: 10px;
	z-index: 7;
	display: flex;
	gap: 3px;
	pointer-events: none;
}

.clase-story-bar {
	flex: 1;
	height: 2.5px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(255, 255, 255, .34);
}

.clase-story-bar i {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: #FFF;
}

.clase-story-viewer-head {
	position: absolute;
	top: 20px;
	left: 0;
	right: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 10px 12px;
	background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}

.clase-story-viewer-avatar {
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	border: 1.5px solid rgba(255, 255, 255, .85);
	border-radius: 50%;
	object-fit: cover;
}

.clase-story-viewer-who {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 1px;
	color: #FFF;
}

.clase-story-viewer-who strong {
	overflow: hidden;
	font-size: 13px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.clase-story-viewer-who span {
	color: rgba(255, 255, 255, .72);
	font-size: 10.5px;
}

.clase-story-viewer-head .clase-story-x {
	margin-left: auto;
	background: rgba(255, 255, 255, .16);
	color: #FFF;
}

.clase-story-viewer-media {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #050B16;
}

.clase-story-viewer-media img,
.clase-story-viewer-media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.clase-story-nav {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 4;
	width: 30%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.clase-story-prev {
	left: 0;
}

.clase-story-next {
	right: 0;
}

.clase-story-viewer-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 5;
	padding: 52px 18px 24px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .78));
	color: #FFF;
	font-size: 13.5px;
	line-height: 1.45;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
	white-space: pre-wrap;
	word-wrap: break-word;
}

.clase-story-viewer-caption[hidden] {
	display: none;
}

.clase-story-viewer-caption.has-delete {
	padding-right: 118px;
}

.clase-story-delete {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 8;
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, .38);
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	color: #FFF;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 500;
	cursor: pointer;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.clase-story-delete:hover {
	background: rgba(255, 255, 255, .28);
}

.clase-story-delete[hidden] {
	display: none;
}

.clase-stories-open {
	overflow: hidden;
}

@media only screen and (max-width: 768px) {
	.clase-stories {
		margin: 0 0 12px;
		padding: 12px 0 10px;
		border-radius: 14px;
	}

	.clase-stories-head {
		padding: 0 13px 10px;
	}

	.clase-stories-track {
		gap: 12px;
		padding: 0 13px 3px;
	}

	.clase-story-item {
		width: 70px;
	}

	.clase-story-ring {
		width: 62px;
		height: 62px;
	}

	.clase-story-avatar {
		width: 56px;
		height: 56px;
	}

	.clase-story-name {
		max-width: 70px;
		font-size: 10.5px;
	}

	.clase-story-modal {
		padding: 12px;
	}

	.clase-story-modal-card {
		max-height: 94vh;
		padding: 16px;
		border-radius: 16px;
	}

	.clase-story-drop {
		min-height: 180px;
	}

	.clase-story-viewer-card {
		width: 100vw;
		height: 100dvh;
		max-height: 100dvh;
		border-radius: 0;
	}

	.clase-story-viewer-head {
		padding-top: calc(10px + env(safe-area-inset-top, 0px));
	}

	.clase-story-viewer-caption {
		padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	}

	.clase-story-delete {
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	}
}
