@use "../../../css/material" as *; @use "sass:color"; .call-window { $transition: cubic-bezier(0.4, 0, 0.2, 1); position: fixed; z-index: 1000; display: flex; flex-direction: column; user-select: none; // Base transition for all properties transition: all 0.4s $transition; // Disable all transitions while dragging for immediate feedback &.dragging { transition: none !important; } // Maximized mode (fullscreen) &.maximized { top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; background-color: rgba($color-dark-surface, 0.98); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); border: none; border-radius: 0; cursor: default; &.visible { opacity: 1; transform: translateY(0); } &.hidden { opacity: 0; transform: translateY(-100%); // Slide up when ending in fullscreen pointer-events: none; } .call-content { padding: 32px; gap: 24px; .video-tiles-grid { gap: 24px; min-height: 400px; } .screen-share-tile { min-height: 60vh; } } .call-header { .window-controls { .window-control-btn { color: $color-dark-on-surface-variant; &:hover { color: $color-dark-on-surface; background: rgba($color-dark-on-surface, 0.08); } } } } } // Minimized mode (PiP) &.minimized { width: 400px; height: 300px; background-color: rgba($color-dark-surface, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 2px solid rgba($color-dark-outline, 0.4); border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); cursor: grab; &.visible { opacity: 1; transform: scale(1); } &.hidden { opacity: 0 !important; transform: scale(0.7) !important; // Scale down and fade when ending in PiP pointer-events: none; transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important; } &.dragging { cursor: grabbing; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); } .call-header { padding: 12px; min-height: auto; .call-header-info { .username { font-size: 14px; } .status { font-size: 12px; } } .window-controls { .window-control-btn { color: $color-dark-primary; &:hover { color: color.adjust($color-dark-primary, $lightness: 10%); background: rgba($color-dark-primary, 0.1); } } } } .call-content { padding: 8px; gap: 8px; .video-tiles-grid { gap: 8px; min-height: 120px; } .video-tile { .tile-label { font-size: 10px; padding: 2px 6px; } .video-placeholder { .placeholder-avatar { width: 40px; height: 40px; } .placeholder-username { font-size: 12px; } } } .screen-share-tile { min-height: 150px; } } .call-controls { padding: 8px; gap: 8px; mdui-button-icon { --mdui-comp-icon-button-size: 36px; } } } // Dynamic gradients based on call state &.gradient-calling { border-color: rgba(255, 193, 7, 0.5); &::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, rgba(255, 193, 7, 0.12) 0%, rgba(255, 152, 0, 0.12) 50%, rgba(255, 193, 7, 0.12) 100%); border-radius: inherit; animation: pulse-gradient 2s ease-in-out infinite; pointer-events: none; } } &.gradient-connecting { border-color: rgba(33, 150, 243, 0.5); &::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, rgba(33, 150, 243, 0.12) 0%, rgba(63, 81, 181, 0.12) 50%, rgba(33, 150, 243, 0.12) 100%); border-radius: inherit; animation: connecting-gradient 1.5s ease-in-out infinite; pointer-events: none; } } &.gradient-active { border-color: rgba(76, 175, 80, 0.5); &::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(56, 142, 60, 0.12) 50%, rgba(76, 175, 80, 0.12) 100%); border-radius: inherit; animation: active-gradient 3s ease-in-out infinite; pointer-events: none; } } &.gradient-default { border-color: rgba(158, 158, 158, 0.3); } } .call-header { padding: 20px; border-bottom: 1px solid $color-dark-outline-variant; position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; .window-controls { display: flex; gap: 8px; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); .window-control-btn { transition: all 0.2s ease; } } .call-header-info { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; .username { margin: 0; font-size: 20px; font-weight: 600; color: $color-dark-on-surface; } .status { margin: 0; font-size: 14px; color: $color-dark-on-surface-variant; font-weight: 500; } .encryption-emojis { display: flex; justify-content: center; gap: 10px; margin-top: 8px; .encryption-emoji { font-size: 24px; display: inline-block; animation: emoji-pulse 2s ease-in-out infinite; &:nth-child(1) { animation-delay: 0s; } &:nth-child(2) { animation-delay: 0.2s; } &:nth-child(3) { animation-delay: 0.4s; } &:nth-child(4) { animation-delay: 0.6s; } } } } } .call-content { padding: 24px; display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 1; flex: 1; overflow-y: auto; .video-tiles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; min-height: 300px; } .video-tile { position: relative; background: rgba($color-dark-surface-variant, 0.5); border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; border: 1px solid rgba($color-dark-outline, 0.3); transition: all 0.3s ease; &:hover { border-color: rgba($color-dark-outline, 0.5); transform: scale(1.02); } .video-element { width: 100%; height: 100%; object-fit: cover; } .video-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; width: 100%; height: 100%; background: rgba($color-dark-surface-variant, 0.6); .placeholder-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); } .placeholder-username { font-size: 18px; font-weight: 600; color: $color-dark-on-surface; } } .tile-label { position: absolute; bottom: 12px; left: 12px; padding: 6px 12px; background: rgba(0, 0, 0, 0.75); color: white; font-size: 13px; font-weight: 600; border-radius: 8px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } &.local-video { .video-element { transform: scaleX(-1); // Mirror local video } } } .screen-share-tile { aspect-ratio: 16 / 9; min-height: 480px; grid-column: 1 / -1; border: 2px solid rgba($color-dark-primary, 0.6); .video-element { object-fit: contain; background: rgba(0, 0, 0, 0.9); } .tile-label { font-size: 14px; padding: 8px 16px; background: rgba($color-dark-primary, 0.9); color: $color-dark-on-primary; } } } .call-controls { padding: 20px; display: flex; justify-content: center; gap: 16px; border-top: 1px solid $color-dark-outline-variant; position: relative; z-index: 1; flex-shrink: 0; mdui-button-icon { transition: all 0.2s ease; &[icon="call_end"] { background: rgba(244, 67, 54, 0.2); color: rgb(244, 67, 54); &:hover { background: rgba(244, 67, 54, 0.35); transform: scale(1.1); } } &[icon="videocam"], &[icon="videocam_off"], &[icon="screen_share"], &[icon="stop_screen_share"], &[icon="mic"], &[icon="mic_off"] { &:hover { background: rgba($color-dark-primary, 0.15); transform: scale(1.1); } } } } .remote-audio { position: fixed; bottom: 0px; right: 0px; width: 0; height: 0; opacity: 0; visibility: hidden; } // Animations @keyframes pulse-gradient { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.7; } } @keyframes connecting-gradient { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } } @keyframes active-gradient { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.4; } } @keyframes emoji-pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.15); opacity: 1; } }