/* oCloud shell v20260723ap — theme + brand + mobile path bar + admin exit */
:root {
  --ocloud-primary: #E91E63;
  --ocloud-secondary: #42A5F5;
  --ocloud-secondary-dark: #1E88E5;
  --ocloud-secondary-12: rgba(66, 165, 245, 0.12);
}

body #root .MuiAppBar-colorPrimary,
body #root header.MuiAppBar-root {
  background-color: var(--ocloud-primary) !important;
}

body #root .MuiDrawer-paper .MuiListItem-root.Mui-selected,
body #root .MuiDrawer-root .MuiListItem-root.Mui-selected {
  background-color: var(--ocloud-secondary-12) !important;
}
body #root .MuiDrawer-paper .MuiListItem-root.Mui-selected .MuiListItemIcon-root,
body #root .MuiDrawer-paper .MuiListItem-root.Mui-selected .MuiSvgIcon-root,
body #root .MuiDrawer-paper .MuiListItem-root.Mui-selected .MuiListItemText-primary,
body #root .MuiDrawer-paper .Mui-selected .MuiSvgIcon-root {
  color: var(--ocloud-secondary) !important;
}

body #root .MuiButton-contained,
body #root .MuiButton-containedPrimary,
body #root .MuiButton-containedSecondary {
  background-color: var(--ocloud-secondary) !important;
  color: #fff !important;
}
body #root .MuiButton-contained:hover,
body #root .MuiButton-containedPrimary:hover {
  background-color: var(--ocloud-secondary-dark) !important;
}

/* Admin dashboard: about-card official logo → oCloud logo */
body #root img[src*="cloudreve"],
body #root img[alt*="Cloudreve"],
body #root img[alt*="cloudreve"] {
  content: url("/static/img/logo.png");
  object-fit: contain;
}

/* ICP host — outside #root */
#ocloud-beian-host {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 1200;
  margin: 0;
  padding: 4px 14px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  font-size: 12px;
  line-height: 1.2;
  pointer-events: auto;
}
html.ocloud-home #ocloud-beian-host {
  display: flex;
}
#ocloud-beian-host a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
}
#ocloud-beian-host img {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  html.ocloud-home #ocloud-beian-host {
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

/* ========== Mobile path bar (Cloudreve hides Navigator on xs) ========== */
#ocloud-mobile-path {
  display: none;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 4px 8px 4px 2px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 10;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

html.ocloud-mobile-files #ocloud-mobile-path {
  display: flex;
}

@media (min-width: 601px) {
  #ocloud-mobile-path {
    display: none !important;
  }
  #ocloud-admin-exit {
    display: none !important;
  }
}

#ocloud-mobile-path .ocloud-path-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #333;
  cursor: pointer;
}
#ocloud-mobile-path .ocloud-path-back:active {
  background: rgba(0, 0, 0, 0.06);
}
#ocloud-mobile-path .ocloud-path-back.is-disabled,
#ocloud-mobile-path .ocloud-path-back:disabled {
  opacity: 0.28;
  pointer-events: none;
}

#ocloud-mobile-path .ocloud-path-crumb {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

#ocloud-mobile-path .ocloud-path-home {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  max-width: 42%;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 14px;
  background: rgba(66, 165, 245, 0.12);
  color: var(--ocloud-secondary-dark, #1e88e5);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

#ocloud-mobile-path .ocloud-path-label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: #222;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
#ocloud-mobile-path .ocloud-path-label.is-root {
  color: #666;
  font-weight: 500;
}

/* Path jump sheet */
.ocloud-path-menu-mask {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}
.ocloud-path-menu-sheet {
  width: 100%;
  max-width: 520px;
  max-height: min(70vh, 480px);
  overflow: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  -webkit-overflow-scrolling: touch;
}
.ocloud-path-menu-title {
  padding: 10px 20px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.02em;
}
.ocloud-path-menu-item,
.ocloud-path-menu-cancel {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 20px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 16px;
  color: #222;
  cursor: pointer;
}
.ocloud-path-menu-item:active,
.ocloud-path-menu-cancel:active {
  background: rgba(0, 0, 0, 0.05);
}
.ocloud-path-menu-item.is-current {
  color: var(--ocloud-secondary-dark, #1e88e5);
  font-weight: 600;
}
.ocloud-path-menu-cancel {
  margin-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
  color: #666;
  font-weight: 500;
}

/* ========== Admin exit bar (mobile) ========== */
#ocloud-admin-exit {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 56px;
  z-index: 1250;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 6px 10px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  -webkit-tap-highlight-color: transparent;
}

html.ocloud-mobile-admin #ocloud-admin-exit {
  display: flex;
}

/* Room for fixed exit bar under AppBar */
html.ocloud-mobile-admin body {
  padding-top: 44px;
}

@media (min-width: 600px) {
  #ocloud-admin-exit {
    top: 64px;
  }
}

#ocloud-admin-exit .ocloud-admin-exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 8px 12px 8px 6px;
  border: 0;
  border-radius: 20px;
  background: rgba(66, 165, 245, 0.14);
  color: var(--ocloud-secondary-dark, #1e88e5);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
#ocloud-admin-exit .ocloud-admin-exit-btn:active {
  background: rgba(66, 165, 245, 0.28);
}
#ocloud-admin-exit .ocloud-admin-exit-btn svg {
  flex: 0 0 auto;
  display: block;
}
#ocloud-admin-exit .ocloud-admin-exit-hint {
  color: #999;
  font-size: 12px;
  font-weight: 500;
  padding-right: 4px;
  white-space: nowrap;
}

/* ============================================================
 * Live Photo (实况照片) Enhancements
 * ============================================================ */

/* Badge on File List & Grid Cards */
.ocloud-live-badge-card {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  transition: all 0.2s ease;
}

.ocloud-live-badge-card .ocloud-live-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  position: relative;
  box-sizing: border-box;
}

.ocloud-live-badge-card .ocloud-live-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
}

/* Live Photo Viewer Modal Overlay */
.ocloud-live-viewer-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.ocloud-live-viewer-wrapper.is-playing {
  transform: scale(0.985);
}

.ocloud-live-viewer-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 99;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
}

.ocloud-live-viewer-badge:hover {
  background: rgba(0, 0, 0, 0.75);
}

.ocloud-live-viewer-badge.is-active {
  background: rgba(233, 30, 99, 0.88);
  box-shadow: 0 0 12px rgba(233, 30, 99, 0.6);
}

.ocloud-live-ring {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.8px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.ocloud-live-ring::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
}

.ocloud-live-viewer-badge.is-active .ocloud-live-ring {
  animation: ocloud-live-pulse 1.2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes ocloud-live-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.ocloud-live-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 5;
  border-radius: inherit;
}

.ocloud-live-viewer-wrapper.is-playing .ocloud-live-video-overlay {
  opacity: 1;
}

.ocloud-live-sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 2px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.ocloud-live-sound-toggle:hover {
  opacity: 1;
}

/* Dedicated Upload Live Photo Button */
.ocloud-live-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 6px;
  padding: 6px 14px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #e91e63, #ff4081);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.35);
  transition: all 0.2s ease;
  z-index: 10;
  vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
}
.ocloud-live-upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.5);
}
.ocloud-live-upload-btn:active {
  transform: translateY(0);
}

/* Hide paired MOV video cards instantly to prevent flicker */
body #root .MuiGrid-item[data-ocloud-live-mov="1"],
body #root tr.MuiTableRow-root[data-ocloud-live-mov="1"] {
  display: none !important;
}

/* Custom 1:1 Apple Live Photo Lightbox Modal */
.ocloud-live-lightbox-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  animation: ocloud-fade-in 0.2s ease;
}

@keyframes ocloud-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ocloud-live-lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #ffffff;
  z-index: 100000;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
}

.ocloud-live-lightbox-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.ocloud-live-lightbox-close {
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.ocloud-live-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.ocloud-live-lightbox-body {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Container holding the photo + video overlay - Tightly bound to media aspect ratio */
.ocloud-live-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 82vh;
  height: 80vh;
  width: auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  background: transparent;
}


.ocloud-live-container.is-pressed {
  transform: scale(0.982);
}

/* Static image layer */
.ocloud-live-container img.ocloud-live-img {
  display: block;
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: inherit;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* Video layer overlaid over image without controls */
.ocloud-live-container video.ocloud-live-vid {
  display: block;
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: inherit;
  opacity: 1;
}



.ocloud-live-container.is-pressed video.ocloud-live-vid {
  opacity: 1;
}

/* Apple Live Photo Badge Overlay */
.ocloud-live-badge-top {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background 0.25s, box-shadow 0.25s;
}

.ocloud-live-container.is-pressed .ocloud-live-badge-top {
  background: rgba(233, 30, 99, 0.88);
  box-shadow: 0 0 14px rgba(233, 30, 99, 0.6);
}

.ocloud-live-badge-top .ocloud-live-ring {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.8px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.ocloud-live-badge-top .ocloud-live-ring::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
}

.ocloud-live-container.is-pressed .ocloud-live-badge-top .ocloud-live-ring {
  animation: ocloud-live-pulse 1.2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}




