| 1 |
/* -------------------------------------------------------------------------- |
| 2 |
Modal (wpsubs-modal) |
| 3 |
Centered dialog over a dimmed backdrop. Toggle visibility with the [hidden] |
| 4 |
attribute (or remove it to show). Behaviour (open/close) is wired per page. |
| 5 |
-------------------------------------------------------------------------- */ |
| 6 |
.wpsubs-modal { |
| 7 |
position: fixed; |
| 8 |
inset: 0; |
| 9 |
z-index: 100000; |
| 10 |
display: flex; |
| 11 |
align-items: center; |
| 12 |
justify-content: center; |
| 13 |
} |
| 14 |
|
| 15 |
.wpsubs-modal[hidden] { |
| 16 |
display: none; |
| 17 |
} |
| 18 |
|
| 19 |
/* Contained: the overlay stops at this plugin's screen instead of covering |
| 20 |
WordPress. Insets mirror #wpcontent's own margins so the admin bar and the |
| 21 |
admin menu stay usable behind a feature lock. */ |
| 22 |
.wpsubs-modal--contained { |
| 23 |
top: var(--wp-admin--admin-bar--height, 32px); |
| 24 |
left: 160px; |
| 25 |
} |
| 26 |
|
| 27 |
.folded .wpsubs-modal--contained { |
| 28 |
left: 36px; |
| 29 |
} |
| 30 |
|
| 31 |
@media screen and (max-width: 960px) { |
| 32 |
.auto-fold .wpsubs-modal--contained { |
| 33 |
left: 36px; |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
@media screen and (max-width: 782px) { |
| 38 |
.wpsubs-modal--contained, |
| 39 |
.auto-fold .wpsubs-modal--contained { |
| 40 |
left: 0; |
| 41 |
} |
| 42 |
} |
| 43 |
|
| 44 |
.wpsubs-modal__backdrop { |
| 45 |
position: absolute; |
| 46 |
inset: 0; |
| 47 |
background: rgba(17, 24, 39, 0.5); |
| 48 |
} |
| 49 |
|
| 50 |
.wpsubs-modal__dialog { |
| 51 |
position: relative; |
| 52 |
display: flex; |
| 53 |
flex-direction: column; |
| 54 |
width: min(640px, calc(100vw - 40px)); |
| 55 |
max-height: calc(100vh - 80px); |
| 56 |
background: var(--wpsubs-surface); |
| 57 |
border-radius: var(--wpsubs-radius); |
| 58 |
box-shadow: var(--wpsubs-shadow-md); |
| 59 |
} |
| 60 |
|
| 61 |
.wpsubs-modal__head { |
| 62 |
display: flex; |
| 63 |
align-items: center; |
| 64 |
justify-content: space-between; |
| 65 |
gap: 12px; |
| 66 |
padding: 14px 18px; |
| 67 |
border-bottom: 1px solid var(--wpsubs-border); |
| 68 |
} |
| 69 |
|
| 70 |
.wpsubs-modal__title { |
| 71 |
margin: 0 0 8px; |
| 72 |
padding: 0; |
| 73 |
font-size: 14px; |
| 74 |
font-weight: 600; |
| 75 |
color: var(--wpsubs-text); |
| 76 |
} |
| 77 |
|
| 78 |
.wpsubs-modal__close { |
| 79 |
background: none; |
| 80 |
border: none; |
| 81 |
padding: 0; |
| 82 |
font-size: 22px; |
| 83 |
line-height: 1; |
| 84 |
cursor: pointer; |
| 85 |
color: var(--wpsubs-text-muted); |
| 86 |
transition: color 0.12s; |
| 87 |
} |
| 88 |
|
| 89 |
.wpsubs-modal__close:hover { |
| 90 |
color: var(--wpsubs-text); |
| 91 |
} |
| 92 |
|
| 93 |
.wpsubs-modal__body { |
| 94 |
padding: 18px; |
| 95 |
overflow-y: auto; |
| 96 |
} |
| 97 |
|
| 98 |
.wpsubs-modal__footer { |
| 99 |
display: flex; |
| 100 |
align-items: center; |
| 101 |
justify-content: flex-end; |
| 102 |
gap: 8px; |
| 103 |
padding: 14px 18px; |
| 104 |
border-top: 1px solid var(--wpsubs-border); |
| 105 |
} |
| 106 |
|