/* --- Updatly Glassmorphism Widget Styles --- */

/* Default (Light) Theme Variables */
.updatly {
  --updatly-bg: rgba(255, 255, 255, 0.6);
  --updatly-text-color: #222;
  --updatly-text-secondary-color: #333;
  --updatly-accent-color: #007aff;
  --updatly-border-color: rgba(0, 0, 0, 0.1);
  --updatly-shadow-color: rgba(0, 0, 0, 0.1);
  --updatly-backdrop-blur: 10px;
  --updatly-border-radius-sm: .4rem;
  --updatly-border-radius-md: 12px;
  --updatly-padding-sm: .6rem 1.2rem;
  --updatly-padding-md: 2rem;
  --updatly-scrollbar-color: rgba(0, 0, 0, 0.3);
}

/* Dark Theme Overrides */
.updatly.dark {
  --updatly-bg: rgba(0, 0, 0, 0.35);
  --updatly-text-color: #fff;
  --updatly-text-secondary-color: #ddd;
  --updatly-accent-color: #ccc;
  --updatly-border-color: rgba(255, 255, 255, 0.18);
  --updatly-shadow-color: rgba(0, 0, 0, 0.37);
  --updatly-scrollbar-color: rgba(255, 255, 255, 0.3);
}

.updatly * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  font-family: inherit;
}

.updatly.bg-body { background: var(--updatly-bg); }

/* Base Glass Effect for both Button and Sidebar */
.updatly.uembed_button,
.updatly.uembed_sidebar {
  background: var(--updatly-bg);
  backdrop-filter: blur(var(--updatly-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--updatly-backdrop-blur));
  border: 1px solid var(--updatly-border-color);
  box-shadow: 0 8px 32px 0 var(--updatly-shadow-color);
  color: var(--updatly-text-color);
  text-shadow: 0 1px 3px var(--updatly-shadow-color);
}

.updatly.uembed_button {
  position: fixed;
  bottom: 2.4rem;
  right: 2.4rem;
  cursor: pointer;
  padding: var(--updatly-padding-sm);
  border-radius: var(--updatly-border-radius-sm);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  z-index: 1001;
  transition: width 0.2s ease;
}

.updatly.uembed_button:hover {
  filter: brightness(95%);
}

.updatly.uembed_sidebar {
  position: fixed;
  top: 2rem;
  bottom: 2rem;
  right: -24rem;
  width: 20rem;
  border-radius: var(--updatly-border-radius-md);
  overflow: hidden;
  z-index: 1000;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  padding: var(--updatly-padding-md) var(--updatly-padding-md) 1rem var(--updatly-padding-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.updatly.uembed_sidebar.open {
  right: 2rem;
}

.updatly .uembed_sidebar_header h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.updatly .uembed_sidebar_content {
  overflow-y: auto;
  flex-grow: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--updatly-scrollbar-color) transparent;
}

.updatly .uembed_sidebar_content::-webkit-scrollbar {
  width: 6px;
}

.updatly .uembed_sidebar_content::-webkit-scrollbar-track {
  background: transparent;
}

.updatly .uembed_sidebar_content::-webkit-scrollbar-thumb {
  background-color: var(--updatly-scrollbar-color);
  border-radius: 3px;
}

.updatly .uembed_sidebar_footer {
  margin-top: 1rem;
  flex-shrink: 0;
}

.updatly .uembed_sidebar_footer a {
  font-size: 0.8rem;
  color: var(--updatly-accent-color);
  text-decoration: none;
}

.updatly .uembed_sidebar_footer a:hover {
  text-decoration: underline;
}

.updatly .uembed_heading {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: .2rem;
}

.updatly ul {
  list-style: none;
}

.updatly li {
  margin-bottom: 1.2rem;
}

.updatly li .uembed_item_title {
  font-weight: 500;
  margin-bottom: .2rem;
}

.updatly li .uembed_content {
  margin: .4rem 0;
  padding-left: .8rem;
  border-left: 2px solid var(--updatly-border-color);
  font-size: 0.9rem;
  color: var(--updatly-text-secondary-color);
}