| 1 |
@import "../../../../../assets/dev/scss/variables"; |
| 2 |
|
| 3 |
@mixin column-width-sizes() { |
| 4 |
&-33 { |
| 5 |
--ehp-column-width: 32.2%; |
| 6 |
max-width: calc(var(--ehp-column-width) - calc(var(--ehp-form-column-gap) / 2)); |
| 7 |
} |
| 8 |
|
| 9 |
&-50 { |
| 10 |
--ehp-column-width: 50%; |
| 11 |
max-width: calc(var(--ehp-column-width) - var(--ehp-form-column-gap) / 2); |
| 12 |
} |
| 13 |
|
| 14 |
&-100 { |
| 15 |
--ehp-column-width: 100%; |
| 16 |
max-width: 100%; |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
.ehp-form { |
| 21 |
--ehp-column-width: 100%; |
| 22 |
--ehp-form-row-gap: 32px; |
| 23 |
--ehp-form-column-gap: 32px; |
| 24 |
--ehp-form-button-icon-spacing: 8px; |
| 25 |
--ehp-form-button-icon-position: row; |
| 26 |
--ehp-form-text-container-align: center; |
| 27 |
--ehp-form-heading-color: #000; |
| 28 |
--ehp-form-description-color: #000; |
| 29 |
--ehp-form-label-spacing: 0; |
| 30 |
--ehp-form-label-color: #000; |
| 31 |
--ehp-form-mark-color: #FF0000; |
| 32 |
--ehp-form-field-text-color: #000; |
| 33 |
--ehp-form-field-bg-color: #FFF; |
| 34 |
--ehp-form-field-border-color: #000; |
| 35 |
--ehp-form-field-border-width: 2px; |
| 36 |
--ehp-form-button-align: stretch; |
| 37 |
--ehp-form-button-icon-size: 16px; |
| 38 |
--ehp-form-button-icon-spacing: 10px; |
| 39 |
--ehp-form-button-text-color: #ffffff; |
| 40 |
--ehp-form-button-text-color-hover: #ffffff; |
| 41 |
--ehp-form-button-border-width: 1px; |
| 42 |
--ehp-form-button-border-color: #28292B; |
| 43 |
--ehp-form-button-border-radius: 0; |
| 44 |
--ehp-form-button-padding-block-end: 8px; |
| 45 |
--ehp-form-button-padding-block-start: 8px; |
| 46 |
--ehp-form-button-padding-inline-end: 16px; |
| 47 |
--ehp-form-button-padding-inline-start: 16px; |
| 48 |
--ehp-form-content-width: 640px; |
| 49 |
--ehp-form-box-padding-block-end: 60px; |
| 50 |
--ehp-form-box-padding-block-start: 60px; |
| 51 |
--ehp-form-box-padding-inline-end: 60px; |
| 52 |
--ehp-form-box-padding-inline-start: 60px; |
| 53 |
|
| 54 |
display: flex; |
| 55 |
flex-direction: column; |
| 56 |
align-items: center; |
| 57 |
padding-block-start: var(--ehp-form-box-padding-block-start); |
| 58 |
padding-block-end: var(--ehp-form-box-padding-block-end); |
| 59 |
padding-inline-start: var(--ehp-form-box-padding-inline-start); |
| 60 |
padding-inline-end: var(--ehp-form-box-padding-inline-end); |
| 61 |
|
| 62 |
& > * { |
| 63 |
max-width: var(--ehp-form-content-width); |
| 64 |
width: 100%; |
| 65 |
} |
| 66 |
|
| 67 |
&__wrapper { |
| 68 |
display: flex; |
| 69 |
flex-direction: row; |
| 70 |
flex-wrap: wrap; |
| 71 |
row-gap: var(--ehp-form-row-gap); |
| 72 |
column-gap: var(--ehp-form-column-gap); |
| 73 |
} |
| 74 |
|
| 75 |
&__field-group { |
| 76 |
display: flex; |
| 77 |
flex-direction: column; |
| 78 |
gap: var(--ehp-form-label-spacing); |
| 79 |
|
| 80 |
&.is-field-required.is-mark-required .ehp-form__field-label { |
| 81 |
&::after { |
| 82 |
content: "*"; |
| 83 |
color: var(--ehp-form-mark-color); |
| 84 |
display: inline-block; |
| 85 |
} |
| 86 |
} |
| 87 |
} |
| 88 |
|
| 89 |
&__field-group, |
| 90 |
&__submit-group { |
| 91 |
width: 100%; |
| 92 |
|
| 93 |
&.has-width { |
| 94 |
@include column-width-sizes(); |
| 95 |
|
| 96 |
&-md { |
| 97 |
@media screen and (max-width: $screen-tablet-max) { |
| 98 |
@include column-width-sizes(); |
| 99 |
} |
| 100 |
} |
| 101 |
|
| 102 |
&-sm { |
| 103 |
@media screen and (max-width: $screen-mobile-max) { |
| 104 |
@include column-width-sizes(); |
| 105 |
} |
| 106 |
} |
| 107 |
} |
| 108 |
} |
| 109 |
|
| 110 |
&__text-container { |
| 111 |
align-items: var(--ehp-form-text-container-align); |
| 112 |
display: flex; |
| 113 |
flex-direction: column; |
| 114 |
} |
| 115 |
|
| 116 |
&__heading { |
| 117 |
color: var(--ehp-form-heading-color); |
| 118 |
} |
| 119 |
|
| 120 |
&__description { |
| 121 |
color: var(--ehp-form-description-color); |
| 122 |
} |
| 123 |
|
| 124 |
&__field-label { |
| 125 |
color: var(--ehp-form-label-color); |
| 126 |
} |
| 127 |
|
| 128 |
&__field:not(.ehp-form__select), |
| 129 |
&__field[type="text"]="text""], |
| 130 |
&__field[type="email"]="email""], |
| 131 |
&__field[type="tel"]="tel""], |
| 132 |
&__textarea, |
| 133 |
&__select select { |
| 134 |
background-color: var(--ehp-form-field-bg-color); |
| 135 |
border: 0; |
| 136 |
border-radius: 0; |
| 137 |
color: var(--ehp-form-field-text-color); |
| 138 |
|
| 139 |
&::placeholder { |
| 140 |
color: var(--ehp-form-field-text-color); |
| 141 |
} |
| 142 |
|
| 143 |
.has-border & { |
| 144 |
border-color: var(--ehp-form-field-border-color); |
| 145 |
border-style: solid; |
| 146 |
border-width: var(--ehp-form-field-border-width); |
| 147 |
} |
| 148 |
|
| 149 |
.has-shape-sharp & { |
| 150 |
border-radius: $corners-shape-sharp; |
| 151 |
} |
| 152 |
|
| 153 |
.has-shape-rounded & { |
| 154 |
border-radius: $corners-shape-rounded; |
| 155 |
} |
| 156 |
|
| 157 |
.has-shape-round & { |
| 158 |
border-radius: $corners-shape-round; |
| 159 |
} |
| 160 |
|
| 161 |
.has-shape-default & { |
| 162 |
border-radius: $corners-shape-default; |
| 163 |
} |
| 164 |
} |
| 165 |
|
| 166 |
&__submit-group { |
| 167 |
align-items: flex-end; |
| 168 |
display: flex; |
| 169 |
justify-content: var(--ehp-form-button-align); |
| 170 |
} |
| 171 |
|
| 172 |
&__button[type="submit"]="submit""] { |
| 173 |
align-items: center; |
| 174 |
border: 0; |
| 175 |
color: var(--ehp-form-button-text-color); |
| 176 |
display: flex; |
| 177 |
flex-direction: var(--ehp-form-button-icon-position); |
| 178 |
flex-grow: 1; |
| 179 |
justify-content: center; |
| 180 |
gap: var(--ehp-form-button-icon-spacing); |
| 181 |
text-decoration: none; |
| 182 |
transition: $transition; |
| 183 |
|
| 184 |
&:hover, |
| 185 |
&:focus { |
| 186 |
color: var(--ehp-form-button-text-color-hover); |
| 187 |
transition: $transition; |
| 188 |
} |
| 189 |
|
| 190 |
&.has-border { |
| 191 |
border-color: var(--ehp-form-button-border-color); |
| 192 |
border-style: solid; |
| 193 |
border-width: var(--ehp-form-button-border-width); |
| 194 |
border-radius: var(--ehp-form-button-border-radius); |
| 195 |
} |
| 196 |
|
| 197 |
&.is-type { |
| 198 |
|
| 199 |
&-button { |
| 200 |
padding-block-end: var(--ehp-form-button-padding-block-end); |
| 201 |
padding-block-start: var(--ehp-form-button-padding-block-start); |
| 202 |
padding-inline-end: var(--ehp-form-button-padding-inline-end); |
| 203 |
padding-inline-start: var(--ehp-form-button-padding-inline-start); |
| 204 |
text-decoration: none; |
| 205 |
} |
| 206 |
|
| 207 |
&-link, |
| 208 |
&-link:not([href]):not([tabindex]) { |
| 209 |
background: none; |
| 210 |
|
| 211 |
&:hover, |
| 212 |
&:focus { |
| 213 |
background: none; |
| 214 |
} |
| 215 |
|
| 216 |
.ehp-form__button-text { |
| 217 |
text-decoration: underline; |
| 218 |
} |
| 219 |
} |
| 220 |
} |
| 221 |
|
| 222 |
&.has-shape { |
| 223 |
|
| 224 |
&-sharp { |
| 225 |
border-radius: $corners-shape-sharp; |
| 226 |
} |
| 227 |
|
| 228 |
&-rounded { |
| 229 |
border-radius: $corners-shape-rounded; |
| 230 |
} |
| 231 |
|
| 232 |
&-round { |
| 233 |
border-radius: $corners-shape-round; |
| 234 |
} |
| 235 |
|
| 236 |
&-default { |
| 237 |
border-radius: $corners-shape-default; |
| 238 |
} |
| 239 |
} |
| 240 |
} |
| 241 |
|
| 242 |
&__button-icon { |
| 243 |
color: inherit; // inherit the button color |
| 244 |
fill: currentColor; // inherit the button color |
| 245 |
font-size: 1em; // relative to the button font-size |
| 246 |
height: 1em; // relative to the button font-size |
| 247 |
width: 1em; // relative to the button font-size |
| 248 |
} |
| 249 |
|
| 250 |
&__select { |
| 251 |
position: relative; |
| 252 |
|
| 253 |
.select-caret-down-wrapper { |
| 254 |
position: absolute; |
| 255 |
top: 50%; |
| 256 |
transform: translateY(-50%); |
| 257 |
inset-inline-end: 10px; |
| 258 |
pointer-events: none; |
| 259 |
font-size: 11px; |
| 260 |
|
| 261 |
svg { |
| 262 |
display: unset; |
| 263 |
width: 1em; |
| 264 |
aspect-ratio: unset; |
| 265 |
fill: currentColor; |
| 266 |
} |
| 267 |
|
| 268 |
i { |
| 269 |
font-size: 19px; |
| 270 |
line-height: 2; |
| 271 |
} |
| 272 |
} |
| 273 |
|
| 274 |
select { |
| 275 |
appearance: none; |
| 276 |
|
| 277 |
&::-ms-expand { |
| 278 |
display: none; |
| 279 |
} |
| 280 |
} |
| 281 |
} |
| 282 |
} |
| 283 |
|