11// Style CSS personnalisé pour le widget
22const widgetStyle = `
33#chatmdWidget {
4- width: 80px;
5- height: 80px;
4+ --widget-size: 75px;
5+ --widget-size-mobile: 50px;
6+ width: var(--widget-size);
7+ height: var(--widget-size);
68 cursor: pointer;
79 position: fixed;
8- border-radius:50%;
9- bottom:40px;
10- right:40px;
11- font-family:sans-serif;
12- z-index:10000;
10+ border-radius: 50%;
11+ bottom: 40px;
12+ right: 40px;
13+ font-family: sans-serif;
14+ z-index: 10000;
1315}
1416
1517#chatmdWidget div:nth-of-type(1) {
16- position:absolute;
18+ position: absolute;
1719 display: flex;
1820 flex-direction: column;
1921 align-items: center;
2022 justify-content: center;
2123 background-color: #f4f4f4;
2224 padding: 10px;
23- border-radius:50%;
24- z-index:1;
25+ border-radius: 50%;
26+ z-index: 1;
2527 width: inherit;
2628 height: inherit;
27- border:1px solid #b0b0b0;
29+ border: 1px solid #b0b0b0;
2830}
2931
3032#chatmdWidget img {
31- width:80%;
33+ width: 80%;
3234}
3335
3436#chatmdWidget div:nth-of-type(2) {
3537 position: fixed;
36- right:30px;
37- bottom:130px ;
38+ right: 30px;
39+ bottom: calc(50px + var(--widget-size)) ;
3840 display: none;
3941 width: 400px;
40- height: min(600px,70vh);
42+ height: min(600px, 70vh);
4143 border-radius: 10px;
4244 border: 1px solid lightgrey;
43- padding: 0.25em;
45+ padding: 0.25em;
4446}
4547#chatmdWidget div:nth-of-type(2) iframe {
4648 padding: 0px;
47- height:inherit;
49+ height: inherit;
4850}
4951
50- @media screen and (max-width: 500px) {
52+ @media screen and ((orientation: portrait) and (max-width: 800px)),
53+ screen and ((orientation: landscape) and (max-height: 800px)) {
5154 #chatmdWidget {
5255 bottom: 30px;
5356 right: 30px;
54- width: 60px ;
55- height: 60px ;
57+ width: var(--widget-size-mobile) ;
58+ height: var(--widget-size-mobile) ;
5659 }
5760 #chatmdWidget div:nth-of-type(1) {
58- width: 60px ;
59- height: 60px ;
61+ width: var(--widget-size-mobile) ;
62+ height: var(--widget-size-mobile) ;
6063 }
6164 #chatmdWidget img {
62- width:90%;
65+ width: 90%;
6366 }
6467 #chatmdWidget div:nth-of-type(2) {
6568 right: 0px;
@@ -72,7 +75,7 @@ const widgetStyle = `
7275 #chatmdWidget div:nth-of-type(2) iframe {
7376 width: 100%;
7477 height: 100%;
75- padding:0px;
78+ padding: 0px;
7679 }
7780}
7881` ;
0 commit comments