| 1 |
/** |
| 2 |
* Collapse & Expand Text Feature Styles |
| 3 |
* King Addons for Elementor |
| 4 |
*/ |
| 5 |
|
| 6 |
/* Base styles for collapse/expand functionality */ |
| 7 |
.kng-collapse-expand-yes { |
| 8 |
position: relative; |
| 9 |
} |
| 10 |
|
| 11 |
/* Content wrapper styles */ |
| 12 |
.kng-collapse-expand-content { |
| 13 |
position: relative; |
| 14 |
overflow: hidden; |
| 15 |
transition: max-height 0.3s ease; |
| 16 |
} |
| 17 |
|
| 18 |
.kng-collapse-expand-content.collapsed { |
| 19 |
max-height: 80px; /* Default collapsed height */ |
| 20 |
} |
| 21 |
|
| 22 |
.kng-collapse-expand-content.expanded { |
| 23 |
max-height: none; |
| 24 |
} |
| 25 |
|
| 26 |
/* Fade effect for collapsed content */ |
| 27 |
/* .kng-collapse-expand-content.collapsed::after { |
| 28 |
content: ""; |
| 29 |
position: absolute; |
| 30 |
left: 0; |
| 31 |
right: 0; |
| 32 |
bottom: 0; |
| 33 |
height: 1.6em; |
| 34 |
background: linear-gradient(transparent, var(--e-global-color-background, #ffffff)); |
| 35 |
pointer-events: none; |
| 36 |
} */ |
| 37 |
|
| 38 |
/* Button wrapper styles */ |
| 39 |
.kng-collapse-expand-button-wrapper { |
| 40 |
margin-top: 10px; |
| 41 |
text-align: right; /* Default position */ |
| 42 |
} |
| 43 |
|
| 44 |
/* Button styles */ |
| 45 |
.kng-collapse-expand-button { |
| 46 |
background: none; |
| 47 |
border: none; |
| 48 |
cursor: pointer; |
| 49 |
color: #007cba; |
| 50 |
text-decoration: underline; |
| 51 |
font-family: inherit; |
| 52 |
font-size: 14px; |
| 53 |
padding: 5px 0; |
| 54 |
transition: color 0.3s ease; |
| 55 |
outline: none; |
| 56 |
} |
| 57 |
|
| 58 |
.kng-collapse-expand-button:hover { |
| 59 |
color: #005a87; |
| 60 |
} |
| 61 |
|
| 62 |
.kng-collapse-expand-button:focus { |
| 63 |
outline: none !important; |
| 64 |
outline-offset: 0px !important; |
| 65 |
} |
| 66 |
|
| 67 |
.kng-collapse-expand-button:active { |
| 68 |
transform: translateY(1px); |
| 69 |
} |
| 70 |
|
| 71 |
/* Animation enhancements */ |
| 72 |
.kng-collapse-expand-content { |
| 73 |
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1); |
| 74 |
} |
| 75 |
|
| 76 |
/* Accessibility improvements */ |
| 77 |
@media (prefers-reduced-motion: reduce) { |
| 78 |
.kng-collapse-expand-content { |
| 79 |
transition: none; |
| 80 |
} |
| 81 |
|
| 82 |
.kng-collapse-expand-button { |
| 83 |
transition: none; |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
/* Dark theme support */ |
| 88 |
/* @media (prefers-color-scheme: dark) { |
| 89 |
.kng-collapse-expand-content.collapsed::after { |
| 90 |
background: linear-gradient(transparent, var(--e-global-color-background, #1a1a1a)); |
| 91 |
} |
| 92 |
} */ |
| 93 |
|
| 94 |
/* Responsive adjustments */ |
| 95 |
@media (max-width: 768px) { |
| 96 |
.kng-collapse-expand-button { |
| 97 |
font-size: 13px; |
| 98 |
padding: 8px 0; |
| 99 |
} |
| 100 |
|
| 101 |
.kng-collapse-expand-button-wrapper { |
| 102 |
margin-top: 8px; |
| 103 |
} |
| 104 |
} |
| 105 |
|
| 106 |
/* Integration with Elementor text widgets */ |
| 107 |
.elementor-widget-text .kng-collapse-expand-content, |
| 108 |
.elementor-widget-heading .kng-collapse-expand-content { |
| 109 |
line-height: inherit; |
| 110 |
} |
| 111 |
|
| 112 |
/* Integration with King Addons Styled Text Builder */ |
| 113 |
.elementor-widget-king-addons-styled-text-builder .kng-collapse-expand-content { |
| 114 |
line-height: inherit; |
| 115 |
} |
| 116 |
|
| 117 |
.elementor-widget-king-addons-styled-text-builder .king-addons-styled-text-builder-items { |
| 118 |
margin-bottom: 0; |
| 119 |
} |
| 120 |
|
| 121 |
/* Print styles */ |
| 122 |
@media print { |
| 123 |
.kng-collapse-expand-content { |
| 124 |
max-height: none !important; |
| 125 |
overflow: visible !important; |
| 126 |
} |
| 127 |
|
| 128 |
.kng-collapse-expand-content::after, |
| 129 |
.kng-collapse-expand-button-wrapper { |
| 130 |
display: none !important; |
| 131 |
} |
| 132 |
} |