.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  background-color: #f8f9fb;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 0.75rem 2.75rem 0.75rem 0.9rem;
  min-height: 44px;
  line-height: 1.3;
  color: #1f2937;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23676f78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.form-select:focus {
  border-color: var(--main-btn);
  box-shadow: 0 0 0 3px rgba(116, 60, 253, 0.15);
  background-color: #fff;
}

.form-select:disabled {
  background-color: #f1f3f5;
  color: #9aa0a6;
}

.form-select[multiple],
.form-select[size] {
  background-image: none;
  padding: 0.6rem 0.9rem;
  min-height: 120px;
  overflow-y: auto;
}

.form-select::-ms-expand {
  display: none;
}

body.night-mode .form-select {
  background-color: #1f2326;
  border-color: #343a40;
  color: #e5e7eb;
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

body.night-mode .form-select:focus {
  border-color: var(--main-btn);
  box-shadow: 0 0 0 3px rgba(116, 60, 253, 0.25);
  background-color: #14181b;
}

[dir="rtl"] .form-select {
  padding-right: 0.9rem;
  padding-left: 2.75rem;
  background-position: left 14px center;
}

[dir="rtl"] .form-select[multiple],
[dir="rtl"] .form-select[size] {
  padding-left: 0.9rem;
}

.course-prereq-group.tagify-enabled .prereq-preview {
  display: none;
}

.tagify {
  --tag-bg: rgba(116, 60, 253, 0.12);
  --tag-hover: rgba(116, 60, 253, 0.2);
  --tag-text-color: #2f2f2f;
  --tags-focus-border-color: var(--main-btn);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background-color: #f8f9fb;
  min-height: 44px;
  padding: 6px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.tagify__input {
  min-height: 30px;
}

body.night-mode .tagify {
  background-color: #1f2326;
  border-color: #343a40;
  color: #e5e7eb;
  box-shadow: none;
}

body.night-mode .tagify__tag-text {
  color: #e5e7eb;
}

.publisher-upload-card {
  --publisher-upload-accent: #0d6efd;
  margin: 10px 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fff;
}

.publisher-upload-card.is-complete {
  --publisher-upload-accent: #17a772;
  border-color: rgba(23, 167, 114, 0.16);
  background: #f9fefb;
}

.publisher-upload-card.is-error {
  --publisher-upload-accent: #dc3545;
  border-color: rgba(220, 53, 69, 0.18);
}

.publisher-upload-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.publisher-upload-card-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #0f172a;
}

.publisher-upload-card-percent {
  min-width: 52px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--publisher-upload-accent);
}

.publisher-upload-progress {
  height: 12px;
  margin-top: 10px;
  border-radius: 999px;
  background: #e9eef5;
  overflow: hidden;
}

.publisher-upload-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d8cff 0%, #66b3ff 100%);
  transition: width 0.25s ease;
}

.publisher-upload-card.is-complete .publisher-upload-progress-bar {
  background: linear-gradient(90deg, #17a772 0%, #6ee7b7 100%);
}

.publisher-upload-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 13px;
  color: #334155;
}

.publisher-upload-card-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.publisher-upload-card-meta-size {
  flex: 0 0 auto;
  color: #64748b;
}

.publisher-upload-card-status {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

body.night-mode .publisher-upload-card {
  background: #161c22;
  border-color: rgba(148, 163, 184, 0.14);
}

body.night-mode .publisher-upload-card-heading {
  color: #f8fafc;
}

body.night-mode .publisher-upload-card-meta,
body.night-mode .publisher-upload-card-name {
  color: #cbd5e1;
}

body.night-mode .publisher-upload-card-meta-size,
body.night-mode .publisher-upload-card-status {
  color: #94a3b8;
}

body.night-mode .publisher-upload-progress {
  background: rgba(148, 163, 184, 0.16);
}

@media (max-width: 575.98px) {
  .publisher-upload-card-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .publisher-upload-card-percent {
    min-width: 42px;
    font-size: 12px;
  }
}

.story-composer-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.story-composer-eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.story-composer-intro {
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.story-composer-intro h5 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.story-composer-intro p {
  margin: 0 0 10px;
  color: #475569;
}

.story-composer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
  color: #475569;
}

.story-composer-summary strong {
  color: #0f172a;
}

.story-composer-admin {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
}

.story-composer-message {
  min-height: 108px;
}

.story-composer-media-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.story-composer-media-card {
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
}

.story-composer-media-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.story-composer-media-head h6 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.story-composer-media-head p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.story-composer-picker {
  margin-bottom: 12px;
}

.story-composer-video-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.story-composer-attachments {
  display: none;
}

.story-composer-attachments ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.story-composer-picker .x-uploader {
  display: block;
  width: 100%;
  margin: 0;
  position: relative;
}

.story-composer-picker .x-uploader input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.story-composer-upload-trigger {
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 16px;
  background: #fcfdff;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.story-composer-upload-trigger:hover,
.story-composer-upload-trigger:focus {
  border-color: var(--main-btn);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.story-composer-record-btn {
  min-height: 88px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.story-composer-upload-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  border-radius: 12px;
  background: #eef4ff;
}

.story-composer-upload-trigger i {
  font-size: 18px;
  color: var(--main-btn);
}

.story-composer-upload-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.story-composer-upload-copy strong {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.story-composer-upload-copy span {
  font-size: 12px;
  color: #64748b;
}

.story-composer .attachments li.item,
.story-composer .attachments li.loading {
  position: relative;
  width: calc(50% - 6px);
  min-width: calc(50% - 6px);
  min-height: 120px;
  overflow: hidden;
  border-radius: 14px;
  background: #f8fafc;
}

.story-composer .attachments li.loading {
  display: flex;
  align-items: center;
  padding: 16px;
}

.story-composer .attachments li.item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.story-composer .attachments li.item .name {
  padding: 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}

.story-composer .attachments li.item .close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  opacity: 1;
}

.story-composer-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
}

.story-composer-note i {
  color: var(--main-btn);
}

.story-composer-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.story-composer-recorder {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #f8fafc;
}

.story-composer-recorder-preview {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
  aspect-ratio: 9 / 16;
  max-height: 320px;
}

.story-composer-recorder-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-composer-recorder-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-weight: 700;
}

.story-composer-recorder-controls,
.story-composer-recorder-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.story-composer-recorder-status {
  color: #334155;
  font-size: 13px;
}

.story-composer-recorder-timer {
  font-weight: 700;
  color: #ef4444;
}

body.night-mode .story-composer-header,
body.night-mode .story-composer-footer {
  border-color: rgba(148, 163, 184, 0.14);
}

body.night-mode .story-composer-eyebrow,
body.night-mode .story-composer-media-head p,
body.night-mode .story-composer-note {
  color: #94a3b8;
}

body.night-mode .story-composer-intro {
  border-color: rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, #1c242c 0%, #111827 100%);
}

body.night-mode .story-composer-intro h5,
body.night-mode .story-composer-summary strong,
body.night-mode .story-composer-media-head h6,
body.night-mode .story-composer-upload-trigger,
body.night-mode .story-composer-upload-copy strong {
  color: #f8fafc;
}

body.night-mode .story-composer-admin,
body.night-mode .story-composer-media-card {
  background: #161c22;
  border-color: rgba(148, 163, 184, 0.14);
}

body.night-mode .story-composer-note,
body.night-mode .story-composer .attachments li.item,
body.night-mode .story-composer .attachments li.loading {
  background: #111827;
}

body.night-mode .story-composer-upload-trigger {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.2);
}

body.night-mode .story-composer-recorder {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.14);
}

body.night-mode .story-composer-recorder-status {
  color: #cbd5e1;
}

body.night-mode .story-composer-upload-icon {
  background: rgba(96, 165, 250, 0.12);
}

body.night-mode .story-composer .attachments li.item .name {
  color: #cbd5e1;
}

@media (max-width: 575.98px) {
  .story-composer-video-actions {
    grid-template-columns: 1fr;
  }

  .story-composer .attachments li.item,
  .story-composer .attachments li.loading {
    width: 100%;
    min-width: 100%;
  }
}

body .ele_home_stories .stories.carousel .story > .item-link {
  margin-top: -31px;
  z-index: 1;
  line-height: 1;
  display: block;
  text-decoration: none;
}

body .ele_home_stories .stories.carousel .story > .item-link > .item-preview {
  display: block;
  opacity: 1;
  border-radius: 50%;
  padding: 3px;
  background: var(--main-link);
  width: 46px;
  height: 46px !important;
  margin: 0 auto;
  overflow: hidden;
}

body .ele_home_stories .stories.carousel .story > .item-link > .item-preview > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--body-bg);
}

body.night-mode .ele_home_stories .stories.carousel .story > .item-link > .item-preview > img {
  border-color: var(--body-bg-color-dark);
}

body .ele_home_stories .stories.carousel .story > .item-link > .info {
  margin: 2px 0 0;
  padding: 5px 0 0;
  z-index: 1;
  font-weight: 500;
  text-align: center;
  background: var(--body-bg);
}

body.night-mode .ele_home_stories .stories.carousel .story > .item-link > .info {
  background: var(--body-bg-color-dark);
}

body .ele_home_stories .stories.carousel .story > .item-link > .info strong {
  display: block;
  font-weight: 500;
  color: #212529;
}

body.night-mode .ele_home_stories .stories.carousel .story > .item-link > .info strong {
  color: #e8e8e8;
}

body .ele_home_stories .stories.carousel .story > .item-link > .info .time {
  display: block;
}
