File size: 2,293 Bytes
7d51e81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
:root{
  --max-fixed-width: 600px;
}

.tutvideo-outer{
  width: 100%;
  display: flex;
  justify-content: center; /* center horizontally */
  align-items: center;
  padding: 12px;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Wrapper: controls the visible width of the video */
.tutvideo-wrapper{
  width: 100%;
  max-height: 80vh; /* prevent overflow on very tall videos */
  display: block;
  margin: 0 auto; /* ensure centered */
  position: relative;
  min-height: 300px;
}

/* Video Loader */
.tutvideo-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 8px;
  z-index: 5;
}

.tutvideo-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: tutvideo-spin 1s linear infinite;
}

@keyframes tutvideo-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Video hidden while loading */
.tutvideo-wrapper video.tutvideo-hidden {
  opacity: 0;
}

/* Clean, neat video: no border, no shadow, no rounding */
.tutvideo-wrapper video{
  width: 100%;
  height: auto; /* keep native aspect */
  display: block;
  object-fit: contain; /* show entire frame */
  background: transparent;
  transition: opacity 0.3s ease;

  /* make non-interactive */
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  outline: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* If viewport width is >= 700px, fix video wrapper width to 600px */
@media (min-width: 700px){
  .tutvideo-wrapper{
    width: var(--max-fixed-width);
    max-width: var(--max-fixed-width);
    min-height: 340px;
  }
}

/* If viewport width is less than 620px, set video width to 90% of screen */
@media (max-width: 619px){
  .tutvideo-wrapper{
    width: 90%;
    max-width: 90%;
    min-height: 200px;
  }
}

/* Small extra touch: don't allow focus outline on the container */
.tutvideo-outer:focus{
  outline: none;
}