| 1 |
/** |
| 2 |
* Protected Content Styles |
| 3 |
* |
| 4 |
* Styles for editor preview, fallback messages, and password forms. |
| 5 |
* |
| 6 |
* @package King_Addons |
| 7 |
*/ |
| 8 |
|
| 9 |
/* ============================================ |
| 10 |
EDITOR PREVIEW STYLES |
| 11 |
============================================ */ |
| 12 |
|
| 13 |
.king-addons-protected-preview { |
| 14 |
position: relative; |
| 15 |
} |
| 16 |
|
| 17 |
/* Dashed border around protected elements in editor */ |
| 18 |
.king-addons-protected-preview::before { |
| 19 |
content: ''; |
| 20 |
position: absolute; |
| 21 |
top: 0; |
| 22 |
left: 0; |
| 23 |
right: 0; |
| 24 |
bottom: 0; |
| 25 |
border: 2px dashed rgba(99, 102, 241, 0.5); |
| 26 |
border-radius: 4px; |
| 27 |
pointer-events: none; |
| 28 |
z-index: 1; |
| 29 |
} |
| 30 |
|
| 31 |
/* Badge Container */ |
| 32 |
.king-addons-protected-badge { |
| 33 |
position: absolute; |
| 34 |
top: 8px; |
| 35 |
left: 8px; |
| 36 |
z-index: 9999; |
| 37 |
display: flex; |
| 38 |
align-items: center; |
| 39 |
gap: 4px; |
| 40 |
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); |
| 41 |
color: #ffffff; |
| 42 |
border-radius: 20px; |
| 43 |
padding: 6px 12px; |
| 44 |
font-size: 11px; |
| 45 |
font-weight: 600; |
| 46 |
line-height: 1; |
| 47 |
box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4); |
| 48 |
cursor: pointer; |
| 49 |
transition: all 0.2s ease; |
| 50 |
} |
| 51 |
|
| 52 |
.king-addons-protected-badge:hover { |
| 53 |
transform: translateY(-2px); |
| 54 |
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5); |
| 55 |
} |
| 56 |
|
| 57 |
.king-addons-protected-badge-icon { |
| 58 |
font-size: 12px; |
| 59 |
} |
| 60 |
|
| 61 |
.king-addons-protected-badge-label { |
| 62 |
letter-spacing: 0.5px; |
| 63 |
} |
| 64 |
|
| 65 |
/* Tooltip */ |
| 66 |
.king-addons-protected-tooltip { |
| 67 |
position: absolute; |
| 68 |
top: calc(100% + 8px); |
| 69 |
left: 0; |
| 70 |
background: #1e1e2e; |
| 71 |
color: #cdd6f4; |
| 72 |
border-radius: 8px; |
| 73 |
padding: 12px 16px; |
| 74 |
font-size: 12px; |
| 75 |
font-weight: 400; |
| 76 |
line-height: 1.5; |
| 77 |
min-width: 200px; |
| 78 |
max-width: 300px; |
| 79 |
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); |
| 80 |
opacity: 0; |
| 81 |
visibility: hidden; |
| 82 |
transform: translateY(-4px); |
| 83 |
transition: all 0.2s ease; |
| 84 |
pointer-events: none; |
| 85 |
z-index: 10000; |
| 86 |
} |
| 87 |
|
| 88 |
.king-addons-protected-badge:hover .king-addons-protected-tooltip { |
| 89 |
opacity: 1; |
| 90 |
visibility: visible; |
| 91 |
transform: translateY(0); |
| 92 |
} |
| 93 |
|
| 94 |
.king-addons-protected-tooltip::before { |
| 95 |
content: ''; |
| 96 |
position: absolute; |
| 97 |
top: -6px; |
| 98 |
left: 16px; |
| 99 |
border-width: 0 6px 6px 6px; |
| 100 |
border-style: solid; |
| 101 |
border-color: transparent transparent #1e1e2e transparent; |
| 102 |
} |
| 103 |
|
| 104 |
.king-addons-protected-tooltip strong { |
| 105 |
display: block; |
| 106 |
color: #a5b4fc; |
| 107 |
margin-bottom: 8px; |
| 108 |
font-size: 11px; |
| 109 |
text-transform: uppercase; |
| 110 |
letter-spacing: 0.5px; |
| 111 |
} |
| 112 |
|
| 113 |
.king-addons-protected-tooltip-content { |
| 114 |
word-break: break-word; |
| 115 |
} |
| 116 |
|
| 117 |
/* ============================================ |
| 118 |
FALLBACK MESSAGE STYLES |
| 119 |
============================================ */ |
| 120 |
|
| 121 |
.king-addons-protected-fallback { |
| 122 |
padding: 20px 24px; |
| 123 |
border: 1px solid #e5e7eb; |
| 124 |
border-radius: 12px; |
| 125 |
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); |
| 126 |
color: #1e293b; |
| 127 |
box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06); |
| 128 |
text-align: center; |
| 129 |
} |
| 130 |
|
| 131 |
.king-addons-protected-fallback p { |
| 132 |
margin: 0; |
| 133 |
} |
| 134 |
|
| 135 |
/* ============================================ |
| 136 |
PASSWORD FORM STYLES |
| 137 |
============================================ */ |
| 138 |
|
| 139 |
.king-addons-protected-password-form { |
| 140 |
max-width: 400px; |
| 141 |
margin: 0 auto; |
| 142 |
} |
| 143 |
|
| 144 |
.king-addons-protected-password-message { |
| 145 |
margin-bottom: 16px; |
| 146 |
font-size: 14px; |
| 147 |
color: #475569; |
| 148 |
} |
| 149 |
|
| 150 |
.king-addons-password-form { |
| 151 |
width: 100%; |
| 152 |
} |
| 153 |
|
| 154 |
.king-addons-password-input-wrap { |
| 155 |
display: flex; |
| 156 |
gap: 8px; |
| 157 |
align-items: stretch; |
| 158 |
} |
| 159 |
|
| 160 |
.king-addons-password-input { |
| 161 |
flex: 1; |
| 162 |
padding: 12px 16px; |
| 163 |
border: 2px solid #e2e8f0; |
| 164 |
border-radius: 8px; |
| 165 |
font-size: 14px; |
| 166 |
color: #1e293b; |
| 167 |
background: #ffffff; |
| 168 |
transition: all 0.2s ease; |
| 169 |
} |
| 170 |
|
| 171 |
.king-addons-password-input:focus { |
| 172 |
outline: none; |
| 173 |
border-color: #6366f1; |
| 174 |
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); |
| 175 |
} |
| 176 |
|
| 177 |
.king-addons-password-input::placeholder { |
| 178 |
color: #94a3b8; |
| 179 |
} |
| 180 |
|
| 181 |
.king-addons-password-submit { |
| 182 |
padding: 12px 24px; |
| 183 |
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); |
| 184 |
color: #ffffff; |
| 185 |
border: none; |
| 186 |
border-radius: 8px; |
| 187 |
font-size: 14px; |
| 188 |
font-weight: 600; |
| 189 |
cursor: pointer; |
| 190 |
transition: all 0.2s ease; |
| 191 |
white-space: nowrap; |
| 192 |
} |
| 193 |
|
| 194 |
.king-addons-password-submit:hover { |
| 195 |
transform: translateY(-1px); |
| 196 |
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); |
| 197 |
} |
| 198 |
|
| 199 |
.king-addons-password-submit:active { |
| 200 |
transform: translateY(0); |
| 201 |
} |
| 202 |
|
| 203 |
.king-addons-password-submit:disabled { |
| 204 |
opacity: 0.7; |
| 205 |
cursor: not-allowed; |
| 206 |
transform: none; |
| 207 |
} |
| 208 |
|
| 209 |
.king-addons-password-error { |
| 210 |
margin-top: 12px; |
| 211 |
padding: 10px 14px; |
| 212 |
background: #fef2f2; |
| 213 |
border: 1px solid #fecaca; |
| 214 |
border-radius: 8px; |
| 215 |
color: #dc2626; |
| 216 |
font-size: 13px; |
| 217 |
} |
| 218 |
|
| 219 |
/* ============================================ |
| 220 |
TEMPLATE FALLBACK STYLES |
| 221 |
============================================ */ |
| 222 |
|
| 223 |
.king-addons-protected-template-fallback { |
| 224 |
padding: 0; |
| 225 |
border: none; |
| 226 |
background: transparent; |
| 227 |
box-shadow: none; |
| 228 |
} |
| 229 |
|
| 230 |
/* ============================================ |
| 231 |
FORM FALLBACK STYLES |
| 232 |
============================================ */ |
| 233 |
|
| 234 |
.king-addons-protected-form-fallback { |
| 235 |
text-align: left; |
| 236 |
} |
| 237 |
|
| 238 |
/* ============================================ |
| 239 |
HIDDEN ELEMENT |
| 240 |
============================================ */ |
| 241 |
|
| 242 |
.king-addons-protected-hidden { |
| 243 |
display: none !important; |
| 244 |
} |
| 245 |
|
| 246 |
/* ============================================ |
| 247 |
RESPONSIVE |
| 248 |
============================================ */ |
| 249 |
|
| 250 |
@media (max-width: 480px) { |
| 251 |
.king-addons-password-input-wrap { |
| 252 |
flex-direction: column; |
| 253 |
} |
| 254 |
|
| 255 |
.king-addons-password-submit { |
| 256 |
width: 100%; |
| 257 |
} |
| 258 |
|
| 259 |
.king-addons-protected-badge { |
| 260 |
padding: 4px 8px; |
| 261 |
font-size: 10px; |
| 262 |
} |
| 263 |
|
| 264 |
.king-addons-protected-tooltip { |
| 265 |
min-width: 150px; |
| 266 |
} |
| 267 |
} |
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|