File size: 2,175 Bytes
6aae67a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/**
 * ========= VARIABILI =========
 *
 * @format
 */

@dialog-bg: #2d2d2d;
@dialog-text: #f5f5f5;
@overlay-bg: rgba(0, 0, 0, 0.7);
@confirm-color: #4caf50;
@cancel-color: #f44336;
@border-radius: 12px;
@transition-speed: 0.3s;

/* ========= DIALOGHI ========= */
.confirm-dialog,
.alert-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  visibility: hidden;
  background: @dialog-bg;
  padding: 2rem;
  border-radius: @border-radius;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  min-width: 320px;
  max-width: 90%;
  transition: all @transition-speed cubic-bezier(0.4, 0, 0.2, 1);

  &.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
  }

  h4 {
    margin: 0 0 2rem;
    color: @dialog-text;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
  }

  .buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
  }

  button {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;

    &:focus {
      outline: 2px solid rgba(255, 255, 255, 0.5);
      outline-offset: 2px;
    }

    &.ok {
      background: @confirm-color;
      color: white;

      &:hover {
        background: darken(@confirm-color, 8%);
      }
    }

    &.cancel {
      background: @cancel-color;
      color: white;

      &:hover {
        background: darken(@cancel-color, 8%);
      }
    }
  }
}

/* ========= DIFFERENZIAZIONE DIALOGHI ========= */
.confirm-dialog {
  border: 2px solid @confirm-color;
}

.alert-dialog {
  border: 2px solid #2196f3;

  .ok {
    background: #2196f3;

    &:hover {
      background: darken(#2196f3, 8%);
    }
  }
}

/* ========= OVERLAY ========= */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: @overlay-bg;
  opacity: 0;
  visibility: hidden;
  z-index: 10000;
  transition: opacity @transition-speed ease;

  &.show {
    opacity: 1;
    visibility: visible;
  }
}