File size: 2,351 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
125
126
127
128
129
130
131
132
133
@import "@wordpress/base-styles/breakpoints";
@import "@wordpress/base-styles/mixins";

.dialog__backdrop,
.dialog__backdrop.card {
	background-color: color-mix(in srgb, var(--color-neutral-0) 80%, transparent);
	align-items: center;
	bottom: 0;
	left: 0;
	display: flex;
	justify-content: center;
	position: fixed;
	right: 0;
	top: var(--masterbar-height);
	transition: background-color 0.2s ease-in;
	z-index: z-index("root", ".dialog__backdrop"); // try to ensure that dialogs are on top of everything else

	// covers the masterbar as well
	&.is-full-screen {
		top: 0;
	}
}

.dialog__backdrop.is-hidden {
	background-color: transparent;
}

.dialog.card {
	position: relative;
	display: flex;
	flex-direction: column;
	max-width: 90%;
	max-height: 90%;
	margin: auto 0; // IE needs a horizontal margin values to properly center flex item
	padding: 0;
	opacity: 1;
	transition: opacity 0.2s ease-in;
}

.dialog__content {
	padding: 16px;
	overflow-y: auto;

	@include break-mobile {
		padding: 24px;
	}

	&:last-child {
		bottom: 0;
	}

	h1 {
		color: var(--color-neutral-70);
		font-size: 1.375em;
		font-weight: 600;
		margin-bottom: 0.5em;
	}

	p:last-child {
		margin-bottom: 0;
	}
}

.dialog__action-buttons {
	position: relative;
	border-top: 1px solid var(--color-neutral-0);
	padding: 16px;
	margin: 0;
	text-align: right;
	flex-shrink: 0;
	background-color: rgba(255, 255, 255, 1);
	@include break-mobile {
		padding-left: 24px;
		padding-right: 24px;
	}

	@media (max-width: $break-mobile) {
		display: flex;
		flex-direction: column-reverse;
	}

	&::before {
		content: "";
		display: block;
		position: absolute;
		bottom: 100%;
		left: 16px;
		right: 16px;
		height: 24px;
		background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
		margin-bottom: 1px;
	}
}

.dialog__action-buttons .button {
	margin-left: 10px;
	min-width: 80px;
	text-align: center;

	.is-left-aligned {
		margin-left: 0;
		margin-right: 10px;
	}

	@media (max-width: $break-mobile) {
		margin: 2px 0;
	}
}

.dialog__action-buttons .is-left-aligned {
	float: left;
}

.dialog__action-buttons-close {
	padding: 15px 15px 5px 5px;
	position: absolute;
	z-index: 1;
	right: 0;
	cursor: pointer;

	&:hover svg {
		opacity: 0.5;
	}
}

.ReactModal__Body--open {
	overflow: hidden;
}

.ReactModal__Html--open {
	overflow: visible;
}