/* UBS Deutschland — Floating Newsletter Widget, Cookie Modal, Video Player & Domicile Modal */

/* Floating Bottom-Left Newsletter Widget */
.floating-newsletter {
  position: fixed;
  bottom: 0;
  left: 16px;
  z-index: 90;
  width: min(328px, calc(100vw - 32px));
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  box-shadow: var(--shadow-float);
}

.floating-newsletter-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: var(--bg-surface);
  border: none;
  border-bottom: 1px solid var(--border-hairline);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.floating-newsletter-toggle:hover {
  background: var(--bg-footer);
}

.floating-newsletter-toggle svg {
  transition: transform var(--transition-fast);
  color: var(--brand-red);
}

.floating-newsletter.is-collapsed .floating-newsletter-toggle {
  border-bottom-color: transparent;
}

.floating-newsletter.is-collapsed .floating-newsletter-toggle svg {
  transform: rotate(180deg);
}

.floating-newsletter-body {
  padding: 1rem 1.1rem 1.25rem;
}

.floating-newsletter.is-collapsed .floating-newsletter-body {
  display: none;
}

.floating-newsletter-body p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Modal System */
.ubs-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 1000;
  background: rgba(28, 28, 28, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.ubs-modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-page);
  border-top: 4px solid var(--brand-red);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.25);
  padding: 1.35rem;
}

@media (min-width: 768px) {
  .ubs-modal {
    padding: 2rem;
  }
}

.ubs-modal--wide {
  max-width: 860px;
}

.cookie-option input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.ubs-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ubs-modal-close {
  background: none;
  border: 1px solid var(--border-subtle);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ubs-modal-close:hover {
  border-color: var(--text-primary);
  background: var(--bg-surface);
}

.cookie-option {
  border: 1px solid var(--border-hairline);
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface-alt);
}

.cookie-option-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.cookie-option-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Video Modal Player */
.video-player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #141414;
  overflow: hidden;
  margin-bottom: 1rem;
}

.video-player-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.video-captions-overlay {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 14px;
  padding: 0.55rem 0.9rem;
  background: rgba(16, 16, 16, 0.84);
  color: var(--text-inverted);
  font-size: 0.9375rem;
  text-align: center;
}

.video-player-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.video-progress-bar {
  flex: 1;
  min-width: 160px;
  height: 6px;
  background: var(--border-subtle);
  cursor: pointer;
  position: relative;
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-red);
  transition: width 150ms linear;
}
