/* Member cover: retain BuddyPress's image underneath the video. */
body.bp-user #cover-image-container { position: relative; }
body.bp-user #buddypress #header-cover-image,
body.bp-user #cover-image-container #header-cover-image { position: relative; overflow: hidden; }
body.bp-user #header-cover-image.bp-cv-digitex-clickable { cursor: zoom-in; }
body.bp-user #header-cover-image.bp-cv-digitex-clickable:focus-visible { outline: 3px solid #ff1744; outline-offset: -4px; }
body.bp-user #buddypress #header-cover-image .bp-cv-digitex-background,
body.bp-user #cover-image-container #header-cover-image .bp-cv-digitex-background {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center; opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
body.bp-user #buddypress #header-cover-image.bp-cv-digitex-is-playing .bp-cv-digitex-background,
body.bp-user #cover-image-container #header-cover-image.bp-cv-digitex-is-playing .bp-cv-digitex-background { opacity: 1; }

/* Only the owner sees this top-right shortcut. */
body.bp-user #cover-image-container .bp-cv-digitex-edit-cover {
  position: absolute; z-index: 40; top: 40px; right: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.8); box-shadow: 0 6px 22px rgba(0,0,0,.16);
  color: #101d37; text-decoration: none; font-weight: 700; font-size: 13px; line-height: 1.2;
  transition: background .15s ease, transform .15s ease;
}
body.bp-user #cover-image-container .bp-cv-digitex-edit-cover:hover,
body.bp-user #cover-image-container .bp-cv-digitex-edit-cover:focus-visible {
  background: #ff1744; color: white; transform: translateY(-1px); text-decoration: none;
}
body.bp-user .bp-cv-digitex-edit-cover > span:first-child { font-size: 18px; }

/* Image and video share an accessible click-to-enlarge viewer. */
.bp-cv-digitex-lightbox {
  box-sizing: border-box; position: fixed; inset: 0; padding: 0; margin: 0;
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  border: 0; outline: 0; background: transparent; color: #fff; overflow: hidden;
}
.bp-cv-digitex-lightbox::backdrop { background: rgba(3, 8, 21, .93); backdrop-filter: blur(9px); }
.bp-cv-digitex-lightbox-panel {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 48px 28px; box-sizing: border-box;
}
.bp-cv-digitex-lightbox-media {
  display: block; width: auto; max-width: min(92vw, 1200px); max-height: 85vh;
  height: auto; object-fit: contain; background: #070a0f; border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0,0,0,.45);
}
.bp-cv-digitex-lightbox video.bp-cv-digitex-lightbox-media { width: min(92vw, 1200px); }
.bp-cv-digitex-lightbox-close {
  position: absolute; top: 18px; right: 22px; z-index: 3;
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
  background: rgba(15,23,42,.8); color: #fff; font: 30px/1 Arial,sans-serif; cursor: pointer;
}
.bp-cv-digitex-lightbox-close:hover,
.bp-cv-digitex-lightbox-close:focus-visible { background: #ff1744; color: #fff; }

/* Cover editor overview. */
.bp-cv-digitex-editor-page .bp-cv-digitex-editor-intro {
  margin: 14px 0 26px; padding: 26px; border-radius: 18px;
  background: linear-gradient(135deg, #fff4f6 0%, #fff 70%);
  border: 1px solid #ffd6df; box-shadow: 0 8px 24px rgba(33,33,55,.035);
}
.bp-cv-kicker { display: block; color: #ef1742; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.bp-cv-digitex-editor-intro h3 { margin: 8px 0; color: #132344; font-size: clamp(19px,2vw,25px); line-height: 1.2; }
.bp-cv-digitex-editor-intro > p { margin: 10px 0 18px; color: #586983; line-height: 1.6; }
.bp-cv-digitex-specs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.bp-cv-digitex-spec {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: #fff; border: 1px solid #e8edf3; border-radius: 12px;
}
.bp-cv-spec-icon {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px;
  background: #fff0f3; color: #f31949; border-radius: 12px; font-size: 20px;
}
.bp-cv-digitex-spec strong { display: block; font-size: 13px; color: #14253f; }
.bp-cv-digitex-spec span:last-child { display: block; font-size: 11px; color: #64748b; margin-top: 4px; }
.bp-cv-digitex-editor-intro .bp-cv-digitex-tip {
  margin: 16px 0 0; padding: 11px 13px; border-radius: 9px;
  background: #fff; color: #65738b; font-size: 12px;
}

/* Improve the existing BuddyPress image drop zone without replacing its uploader. */
.bp-cv-digitex-editor-page #buddypress #drag-drop-area,
.bp-cv-digitex-editor-page #buddypress .drag-drop-area {
  border: 2px dashed #f4a5b7 !important; border-radius: 14px !important;
  background: #fff8fa !important; transition: border-color .18s, background .18s;
}
.bp-cv-digitex-editor-page #buddypress #drag-drop-area:hover,
.bp-cv-digitex-editor-page #buddypress .drag-drop-area:hover { border-color: #ff1744 !important; background: #fff1f4 !important; }
.bp-cv-digitex-editor-page #buddypress #bp-browse-button {
  background: #fff; border: 1px solid #ff1744; color: #ff1744;
  border-radius: 7px; font-weight: 700; padding: 9px 17px;
}
.bp-cv-digitex-editor-page #buddypress #bp-browse-button:hover { background: #ff1744; color: #fff; }

/* Separate video card on the same cover-image page. */
.bp-cv-digitex-upload {
  margin: 30px 0 12px; padding: 25px; background: #fff;
  border: 1px solid #e7ebf1; border-radius: 17px;
  box-shadow: 0 12px 34px rgba(20,39,70,.055); color: #182843;
}
.bp-cv-section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.bp-cv-section-icon {
  display: grid; place-items: center; flex: none; width: 45px; height: 45px;
  background: #fff0f3; color: #ff1744; border-radius: 12px; font-size: 19px;
}
.bp-cv-digitex-upload h3 { margin: 6px 0 5px; font-size: 21px; color: #142642; }
.bp-cv-section-heading p { margin: 0; line-height: 1.5; color: #62728c; font-size: 13px; }
.bp-cv-current-label { display: block; font-size: 12px; font-weight: 800; color: #34445d; margin-bottom: 9px; }
.bp-cv-digitex-preview { display: block; max-width: 100%; width: 100%; max-height: 340px; border-radius: 12px; background: #080f1c; object-fit: contain; }
.bp-cv-digitex-upload form { margin-top: 17px; }
.bp-cv-digitex-upload form + form { padding-top: 12px; border-top: 1px solid #edf0f4; }
.bp-cv-file-drop {
  position: relative; cursor: pointer; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  min-height: 185px; padding: 22px; text-align: center;
  border: 2px dashed #f4a5b7; border-radius: 14px; background: #fff8fa;
  transition: background .2s, border-color .2s;
}
.bp-cv-file-drop:hover, .bp-cv-file-drop.is-dragover, .bp-cv-file-drop:focus-within { background: #fff0f4; border-color: #ff1744; }
.bp-cv-drop-symbol { display: grid; place-items: center; width: 43px; height: 43px; background: #fff; color: #ff1744; border-radius: 50%; box-shadow: 0 3px 14px rgba(255,23,68,.12); font-size: 25px; }
.bp-cv-file-drop strong { color: #23334d; font-size: 14px; }
.bp-cv-drop-caption { color: #7b8aa3; font-size: 12px; }
.bp-cv-picked-file { color: #16803a; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.bp-cv-file-drop input[type=file] { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
.bp-cv-inline-error { margin: 9px 0; color: #bc1837; font-size: 12px; }
.bp-cv-digitex-upload .description { color: #72819a; line-height: 1.6; font-size: 12px; }
.bp-cv-digitex-button {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px;
  border: 1px solid #ff1744; border-radius: 7px; background: #ff1744; color: #fff;
  font-size: 12px; font-weight: 800; cursor: pointer; transition: background .16s;
}
.bp-cv-digitex-button:hover, .bp-cv-digitex-button:focus-visible { background: #d9113b; color: #fff; }
.bp-cv-digitex-button.is-secondary { background: #fff; color: #bb2345; border-color: #ffc4d1; }
.bp-cv-digitex-button.is-secondary:hover { background: #fff2f5; color: #9d1733; }
.bp-cv-digitex-notice { padding: 12px 14px; margin: 13px 0; border-left: 4px solid #dc2626; background: #fff4f5; border-radius: 7px; }
.bp-cv-digitex-notice.is-success { border-left-color: #16a34a; background: #f1fff5; }

@media (max-width: 720px) {
  body.bp-user #cover-image-container .bp-cv-digitex-edit-cover { top: 11px; right: 11px; padding: 9px 11px; }
  body.bp-user .bp-cv-digitex-edit-cover > span:last-child { display: none; }
  .bp-cv-digitex-specs { grid-template-columns: 1fr; }
  .bp-cv-digitex-editor-page .bp-cv-digitex-editor-intro, .bp-cv-digitex-upload { padding: 17px; }
  .bp-cv-digitex-lightbox-panel { padding: 54px 10px; }
  .bp-cv-digitex-lightbox-media { max-width: 96vw; max-height: 78vh; }
  .bp-cv-digitex-lightbox video.bp-cv-digitex-lightbox-media { width: 96vw; }
  .bp-cv-digitex-lightbox-close { top: 9px; right: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-cv-digitex-background { display: none !important; }
  .bp-cv-digitex-edit-cover, .bp-cv-file-drop { transition: none !important; }
}
