mirror of
https://gh.wpcy.net/https://github.com/CaptainCore/Helm.git
synced 2026-04-26 10:53:27 +08:00
1185 lines
No EOL
26 KiB
CSS
1185 lines
No EOL
26 KiB
CSS
/* ==========================================================================
|
|
TABLE OF CONTENTS
|
|
1. Configuration (Variables & Tokens)
|
|
2. WP Admin Layout Reset (Hiding Sidebars/Admin Bar)
|
|
3. Component: The Island (Unified Dock)
|
|
4. Component: The Popout (Main Menu)
|
|
5. Component: Cards & Grids
|
|
6. Component: Context Menu
|
|
7. Component: Toast & Help
|
|
8. Integrations (Gutenberg, Woo, Builders)
|
|
9. Utilities & Animations
|
|
========================================================================== */
|
|
|
|
/* ==========================================================================
|
|
1. CONFIGURATION
|
|
========================================================================== */
|
|
:root {
|
|
/* --- Colors: Light Mode Defaults --- */
|
|
--cch-bg-overlay: rgba(255, 255, 255, 0.85);
|
|
--cch-bg-popout: #f0f0f1;
|
|
--cch-bg-card: #ffffff;
|
|
--cch-bg-sub: #ffffff;
|
|
--cch-bg-hover: #f6f7f7;
|
|
|
|
--cch-text-main: #1d2327;
|
|
--cch-text-sub: #50575e;
|
|
--cch-text-meta: #8c8f94;
|
|
|
|
--cch-border: #dcdcde;
|
|
--cch-border-focus: #2271b1;
|
|
--cch-accent: #2271b1;
|
|
|
|
--cch-shadow-popout: 0 10px 40px rgba(0, 0, 0, 0.1);
|
|
--cch-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
|
|
/* --- Z-Index Stack --- */
|
|
--cch-z-island: 500001;
|
|
--cch-z-popout: 500002;
|
|
--cch-z-toast: 500003;
|
|
|
|
/* --- Typography --- */
|
|
--cch-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
}
|
|
|
|
/* --- Colors: Dark Mode Overrides --- */
|
|
body.cch-dark-mode {
|
|
--cch-bg-overlay: rgba(0, 0, 0, 0.75);
|
|
--cch-bg-popout: #181818;
|
|
--cch-bg-card: #222222;
|
|
--cch-bg-sub: #222222;
|
|
--cch-bg-hover: #2a2a2a;
|
|
|
|
--cch-text-main: #f0f0f1;
|
|
--cch-text-sub: #a7aaad;
|
|
--cch-text-meta: #646970;
|
|
|
|
--cch-border: #3c3c3c;
|
|
--cch-border-focus: #72aee6;
|
|
--cch-accent: #72aee6;
|
|
|
|
--cch-shadow-popout: 0 20px 50px rgba(0, 0, 0, 0.6);
|
|
--cch-shadow-card: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
/* ==========================================================================
|
|
2. WP ADMIN LAYOUT RESET
|
|
========================================================================== */
|
|
|
|
/* 2.1. Hide Core Elements */
|
|
html {
|
|
--wp-admin--admin-bar--height: 0px !important;
|
|
}
|
|
|
|
body.cch-island-mode.admin-bar,
|
|
body.cch-hide-admin-menu.admin-bar {
|
|
--admin-bar: 0px !important;
|
|
}
|
|
|
|
body.cch-hide-admin-menu #wpbody-content {
|
|
padding-bottom: 10px !important;
|
|
}
|
|
|
|
body.cch-hide-admin-menu #adminmenuback,
|
|
body.cch-hide-admin-menu #adminmenuwrap,
|
|
body.cch-hide-admin-menu #adminmenu,
|
|
body.cch-hide-admin-menu #wpfooter {
|
|
display: none !important;
|
|
}
|
|
|
|
/* 2.2. Centering Logic (The "Canvas") */
|
|
body.cch-hide-admin-menu:not(.block-editor-page):not(.gutenberg-editor-page) #wpcontent {
|
|
margin: 20px auto 124px auto !important;
|
|
max-width: 1200px;
|
|
padding: 0 20px;
|
|
|
|
/* Hardcoded Light Mode Background (Ignores Helm Dark Mode) */
|
|
background: #ffffff;
|
|
border-radius: 20px;
|
|
|
|
/* Hardcoded Light Mode Border (Ignores Helm Dark Mode) */
|
|
border: 1px solid #dcdcde;
|
|
|
|
/* Theme-Aware Shadow:
|
|
1. Soft depth shadow (neutral).
|
|
2. Subtle ring using the WP Admin Theme Accent color (--cch-color-2).
|
|
*/
|
|
box-shadow:
|
|
0 20px 25px -5px rgba(0, 0, 0, 0.05),
|
|
0 8px 10px -6px rgba(0, 0, 0, 0.01),
|
|
0 0 0 1px color-mix(in srgb, var(--cch-color-2, #2271b1) 15%, transparent);
|
|
}
|
|
|
|
body.woocommerce-admin-page.cch-hide-admin-menu #wpwrap {
|
|
padding-bottom: 10px;
|
|
}
|
|
|
|
body.woocommerce-admin-page.cch-hide-admin-menu:not(.block-editor-page):not(.gutenberg-editor-page):not(.woocommerce-admin-full-screen) #wpcontent {
|
|
margin-top: 80px !important;
|
|
}
|
|
|
|
body.woocommerce-admin-page.cch-hide-admin-menu #wpbody {
|
|
margin-top: 1px !important;
|
|
}
|
|
|
|
/* Full Width Exceptions */
|
|
body.cch-hide-admin-menu.woocommerce-admin-page #wpcontent,
|
|
body.cch-hide-admin-menu.woocommerce-page #wpcontent,
|
|
body.cch-hide-admin-menu[class*="smtp_page_gravitysmtp-"] #wpcontent {
|
|
max-width: 100%;
|
|
padding-left: 0;
|
|
margin-left: 0 !important;
|
|
border: none;
|
|
background: transparent;
|
|
box-shadow: none;
|
|
}
|
|
|
|
body.cch-hide-admin-menu .media-frame.mode-grid .attachments-browser .no-media {
|
|
padding-bottom: 50px;
|
|
}
|
|
|
|
body.cch-hide-admin-menu.smtp_page_gravitysmtp-activity-log #wpwrap,
|
|
body.cch-hide-admin-menu.smtp_page_gravitysmtp-settings #wpwrap,
|
|
body.cch-hide-admin-menu.smtp_page_gravitysmtp-suppression #wpwrap,
|
|
body.cch-hide-admin-menu.smtp_page_gravitysmtp-tools #wpwrap,
|
|
body.cch-hide-admin-menu.toplevel_page_gravitysmtp-dashboard #wpwrap {
|
|
background: initial;
|
|
}
|
|
|
|
body.cch-hide-admin-menu .gravitysmtp-admin .gravitysmtp-app:not([data-js=gravitysmtp-setup-wizard-root]) {
|
|
position: relative;
|
|
}
|
|
|
|
body.cch-hide-admin-menu.toplevel_page_gf_edit_forms .gform-form-toolbar {
|
|
width:100%;
|
|
}
|
|
|
|
body.cch-hide-admin-menu.toplevel_page_gf_edit_forms .gforms_edit_form {
|
|
top: 0px !important;
|
|
left: 0px;
|
|
}
|
|
body.cch-hide-admin-menu .gform_editor {
|
|
padding-block: 0px 7px 55px 7px;
|
|
}
|
|
|
|
body.cch-hide-admin-menu .acf-admin-toolbar,
|
|
body.cch-hide-admin-menu .acf-headerbar {
|
|
margin-right: -20px;
|
|
}
|
|
|
|
@media (min-width: 783px) {
|
|
body.cch-hide-admin-menu.toplevel_page_gf_edit_forms .editor-sidebar {
|
|
top: 64px;
|
|
}
|
|
}
|
|
|
|
/* 2.3. Mobile Adjustments */
|
|
@media screen and (max-width: 600px) {
|
|
body.cch-hide-admin-menu #wpbody {
|
|
padding-top: 0px !important;
|
|
}
|
|
}
|
|
|
|
/* ==========================================================================
|
|
3. COMPONENT: THE ISLAND (Unified Dock)
|
|
========================================================================== */
|
|
|
|
#cch-island-container {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: var(--cch-z-island);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 6px;
|
|
transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
font-family: var(--cch-font);
|
|
}
|
|
|
|
#cch-island-container.cch-ui-hidden {
|
|
transform: translateX(-50%) translateY(200%) !important;
|
|
}
|
|
|
|
/* 3.1. Main Dock Capsule */
|
|
#cch-island-main {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 2px;
|
|
padding: 2px;
|
|
background: rgba(20, 20, 20, 0.90) !important;
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
border-radius: 999px;
|
|
box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2);
|
|
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
}
|
|
|
|
#cch-island-main:hover {
|
|
background: rgba(20, 20, 20, 1) !important;
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 8px 30px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
/* 3.2. Dock Buttons */
|
|
#cch-island-toggle,
|
|
.cch-island-action,
|
|
#cch-island-qm {
|
|
background: transparent !important;
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
color: #e0e0e0 !important;
|
|
height: 24px;
|
|
border-radius: 999px;
|
|
/* Toggle gets pill shape, others get circle via width below */
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.cch-island-action,
|
|
#cch-island-qm {
|
|
width: 24px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
#cch-island-toggle:hover,
|
|
.cch-island-action:hover,
|
|
#cch-island-qm:hover {
|
|
background: rgba(255, 255, 255, 0.15) !important;
|
|
color: #fff !important;
|
|
}
|
|
|
|
.cch-island-icon,
|
|
.cch-island-action .dashicons {
|
|
font-size: 16px;
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
/* 3.3. Toggle Button & Loading State */
|
|
#cch-island-toggle {
|
|
width: 24px;
|
|
}
|
|
|
|
#cch-island-toggle.cch-loading {
|
|
width: auto;
|
|
background: rgba(255, 255, 255, 0.15) !important;
|
|
padding: 0 14px 0 6px;
|
|
}
|
|
|
|
#cch-island-toggle.cch-loading .cch-island-icon {
|
|
display: none;
|
|
}
|
|
|
|
#cch-island-toggle.cch-loading~.cch-island-action,
|
|
#cch-island-toggle.cch-loading~#cch-island-qm {
|
|
display: none;
|
|
}
|
|
|
|
.cch-island-label {
|
|
display: inline-block;
|
|
max-width: 0;
|
|
opacity: 0;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
transform: translateX(-10px);
|
|
color: #fff;
|
|
}
|
|
|
|
#cch-island-toggle.cch-loading .cch-island-label {
|
|
max-width: 500px;
|
|
opacity: 1;
|
|
margin-left: 2px;
|
|
margin-right: 10px;
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.cch-island-loader {
|
|
display: none;
|
|
animation: cch-spin 0.8s linear infinite;
|
|
font-size: 14px;
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
#cch-island-toggle.cch-loading .cch-island-loader {
|
|
display: block !important;
|
|
}
|
|
|
|
/* 3.4. Hide Button (Under Dock) */
|
|
#cch-ui-hide-btn {
|
|
width: 24px;
|
|
height: 24px;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
border: none;
|
|
border-radius: 50%;
|
|
color: rgba(255, 255, 255, 0.6);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
opacity: 0;
|
|
transform: translateY(-5px);
|
|
transition: all 0.2s ease;
|
|
pointer-events: none;
|
|
}
|
|
|
|
#cch-island-container:hover #cch-ui-hide-btn {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
pointer-events: auto;
|
|
}
|
|
|
|
#cch-ui-hide-btn:hover {
|
|
background: rgba(0, 0, 0, 0.6);
|
|
color: #fff;
|
|
}
|
|
|
|
/* 3.5. Mobile Dock */
|
|
@media screen and (max-width: 600px) {
|
|
#cch-island-container {
|
|
bottom: 12px;
|
|
}
|
|
|
|
#cch-island-main {
|
|
padding: 2px;
|
|
gap: 1px;
|
|
}
|
|
}
|
|
|
|
/* ==========================================================================
|
|
4. COMPONENT: THE POPOUT (Main Menu)
|
|
========================================================================== */
|
|
|
|
#cch-popout {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
z-index: var(--cch-z-popout);
|
|
background: var(--cch-bg-overlay);
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.15s ease;
|
|
font-family: var(--cch-font);
|
|
}
|
|
|
|
#cch-popout * {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
#cch-popout[aria-hidden="false"] {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.cch-popout-inner {
|
|
width: 95%;
|
|
max-width: 1300px;
|
|
height: 95vh;
|
|
background: var(--cch-bg-popout);
|
|
border-radius: 12px;
|
|
box-shadow: var(--cch-shadow-popout);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
border: 1px solid var(--cch-border);
|
|
position: relative;
|
|
}
|
|
|
|
/* 4.1. Header & Search */
|
|
.cch-popout-header {
|
|
padding: 20px 32px;
|
|
border-bottom: 1px solid var(--cch-border);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: var(--cch-bg-popout);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#cch-popout-title {
|
|
margin: 0;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: var(--cch-text-main);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
#cch-popout-search {
|
|
flex: 1;
|
|
font-size: 16px;
|
|
padding: 12px 16px;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--cch-border);
|
|
background: transparent;
|
|
color: var(--cch-text-main);
|
|
outline: none;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
#cch-popout-search:focus {
|
|
border-color: var(--cch-border-focus);
|
|
background: var(--cch-bg-card);
|
|
}
|
|
|
|
#cch-popout-search::placeholder {
|
|
color: var(--cch-text-meta);
|
|
}
|
|
|
|
/* 4.2. Header Buttons (View Toggle / Icons) */
|
|
.cch-view-toggle {
|
|
display: flex;
|
|
background: transparent;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--cch-border);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.cch-view-toggle button {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background: var(--cch-bg-hover);
|
|
border: none;
|
|
border-right: 1px solid var(--cch-border);
|
|
color: var(--cch-text-sub);
|
|
padding: 8px 12px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.cch-view-toggle button:hover {
|
|
background: var(--cch-bg-card);
|
|
color: var(--cch-text-main);
|
|
}
|
|
|
|
.cch-view-toggle button svg {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.cch-view-toggle button:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
.cch-view-toggle button.is-selected {
|
|
background: var(--cch-bg-hover);
|
|
color: var(--cch-text-main);
|
|
}
|
|
|
|
.cch-btn-icon {
|
|
background: var(--cch-bg-hover);
|
|
border: 1px solid var(--cch-border);
|
|
color: var(--cch-text-sub);
|
|
width: 40px;
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.cch-btn-icon:hover {
|
|
background: var(--cch-bg-card);
|
|
color: var(--cch-text-main);
|
|
border-color: var(--cch-border-focus);
|
|
}
|
|
|
|
.cch-btn-icon.cch-close:hover {
|
|
background: var(--cch-bg-card);
|
|
}
|
|
|
|
.cch-btn-icon.cch-help {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.cch-btn-icon.cch-close .dashicons {
|
|
font-size: 20px;
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
|
|
/* 4.3. Content Areas */
|
|
.cch-sections {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 32px;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--cch-border) transparent;
|
|
}
|
|
|
|
.cch-sections::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.cch-sections::-webkit-scrollbar-thumb {
|
|
background-color: var(--cch-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.cch-section {
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.cch-section.cch-hidden {
|
|
display: none;
|
|
}
|
|
|
|
.cch-section h3 {
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
color: var(--cch-text-meta);
|
|
margin: 0 0 16px 4px;
|
|
}
|
|
|
|
/* 4.4. Mobile Popout */
|
|
@media screen and (max-width: 600px) {
|
|
.cch-popout-inner {
|
|
width: 100%;
|
|
height: 100vh;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.cch-popout-header {
|
|
padding: 12px 16px;
|
|
gap: 16px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
#cch-popout-title {
|
|
display: none;
|
|
}
|
|
|
|
.cch-view-toggle button {
|
|
padding: 8px;
|
|
}
|
|
|
|
.cch-view-toggle button span {
|
|
display: none;
|
|
}
|
|
|
|
#cch-popout-search {
|
|
order: -1;
|
|
flex-basis: 100%;
|
|
padding: 10px 14px;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.cch-sections {
|
|
padding: 16px;
|
|
}
|
|
|
|
.cch-section {
|
|
margin-bottom: 24px;
|
|
}
|
|
}
|
|
|
|
/* ==========================================================================
|
|
5. COMPONENT: CARDS & GRIDS
|
|
========================================================================== */
|
|
|
|
/* 5.1. General Card Styles */
|
|
.cch-card {
|
|
background: var(--cch-bg-card);
|
|
border: 1px solid var(--cch-border);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
|
|
text-decoration: none;
|
|
cursor: default;
|
|
break-inside: avoid;
|
|
margin-bottom: 20px;
|
|
/* For expanded view fallbacks */
|
|
}
|
|
|
|
.cch-card:hover {
|
|
border-color: var(--cch-border-focus);
|
|
}
|
|
|
|
/* Selected/Active State */
|
|
.cch-card.cch-active {
|
|
border-color: var(--cch-border-focus);
|
|
box-shadow: 0 0 0 1px var(--cch-border-focus), 0 8px 30px rgba(0, 0, 0, 0.25);
|
|
transform: translateY(-2px);
|
|
z-index: 50;
|
|
background: var(--cch-bg-card);
|
|
}
|
|
|
|
.cch-card.cch-dim {
|
|
opacity: 0.3;
|
|
}
|
|
|
|
/* 5.2. Card Content */
|
|
.cch-card-main-link {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
padding: 16px;
|
|
text-decoration: none;
|
|
color: var(--cch-text-main) !important;
|
|
background: transparent;
|
|
min-height: 70px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
/* When card is selected via keyboard */
|
|
.cch-card.cch-active .cch-card-main-link {
|
|
background-color: rgba(127, 127, 127, 0.08);
|
|
border-bottom: 1px solid var(--cch-border);
|
|
}
|
|
|
|
.cch-card-main-link:hover .cch-label {
|
|
color: var(--cch-accent);
|
|
}
|
|
|
|
.cch-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--cch-text-sub);
|
|
margin-top: -2px;
|
|
}
|
|
|
|
.cch-icon.dashicons-before::before {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.cch-label {
|
|
font-weight: 600;
|
|
font-size: 15px;
|
|
line-height: 1.4;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.cch-meta {
|
|
font-size: 12px;
|
|
color: var(--cch-text-meta);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.cch-hl {
|
|
background: rgba(255, 200, 0, 0.3);
|
|
color: inherit;
|
|
padding: 0 2px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
/* Easter Egg Styling */
|
|
#cch-easter-egg-card {
|
|
border-color: var(--cch-accent);
|
|
background-color: var(--cch-bg-hover);
|
|
}
|
|
|
|
#cch-easter-egg-card .cch-icon {
|
|
color: var(--cch-accent);
|
|
}
|
|
|
|
/* 5.3. Submenus (Pills / Popups) */
|
|
.cch-submenu {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 4px 0;
|
|
background: var(--cch-bg-sub);
|
|
border-top: 1px solid var(--cch-border);
|
|
}
|
|
|
|
.cch-submenu:empty {
|
|
display: none;
|
|
}
|
|
|
|
.cch-submenu li {
|
|
margin: 0;
|
|
border-bottom: 1px solid transparent;
|
|
}
|
|
|
|
.cch-submenu li a {
|
|
display: block;
|
|
padding: 8px 12px 8px 46px;
|
|
margin: 2px 6px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
color: var(--cch-text-sub) !important;
|
|
text-decoration: none;
|
|
transition: all 0.1s;
|
|
}
|
|
|
|
.cch-submenu li a:hover {
|
|
background: var(--cch-bg-hover);
|
|
color: var(--cch-text-main) !important;
|
|
}
|
|
|
|
.cch-submenu a.cch-dim {
|
|
opacity: 0.25;
|
|
}
|
|
|
|
.cch-submenu a.cch-sub-active {
|
|
background: var(--cch-accent);
|
|
color: #fff !important;
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
|
|
font-weight: 600;
|
|
}
|
|
|
|
body.cch-dark-mode .cch-submenu li a.cch-sub-active {
|
|
color: #1d2327;
|
|
}
|
|
|
|
/* 5.4. GRID MODE (Cards View) Specifics */
|
|
.cch-view-cards .cch-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
|
gap: 12px;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.cch-view-cards .cch-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
gap: 16px;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1100px) {
|
|
.cch-view-cards .cch-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
}
|
|
}
|
|
|
|
.cch-view-cards .cch-card {
|
|
margin-bottom: 0;
|
|
overflow: visible;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.cch-view-cards .cch-card-main-link {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
padding: 16px;
|
|
min-height: auto;
|
|
gap: 12px;
|
|
}
|
|
|
|
.cch-view-cards .cch-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.cch-view-cards .cch-label {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.cch-view-cards .cch-card:hover,
|
|
.cch-view-cards .cch-card.cch-active,
|
|
.cch-view-cards .cch-card.cch-sub-open {
|
|
z-index: 100;
|
|
}
|
|
|
|
/* Popup Submenu Logic for Grid Mode */
|
|
.cch-view-cards .cch-submenu {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
min-width: 200px;
|
|
max-width: 280px;
|
|
max-height: 320px;
|
|
overflow-y: auto;
|
|
background: var(--cch-bg-card);
|
|
border: 1px solid var(--cch-border);
|
|
border-radius: 8px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
|
|
z-index: 100;
|
|
padding: 8px 0;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
transition: visibility 0s linear 0.1s;
|
|
}
|
|
|
|
.cch-view-cards .cch-submenu::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: -12px;
|
|
left: -10px;
|
|
right: -10px;
|
|
height: 12px;
|
|
}
|
|
|
|
.cch-view-cards .cch-card.cch-sub-open .cch-submenu,
|
|
.cch-view-cards .cch-card.cch-active.cch-sub-open .cch-submenu,
|
|
.cch-view-cards .cch-card:hover .cch-submenu {
|
|
visibility: visible;
|
|
pointer-events: auto;
|
|
transition: visibility 0s linear 0s;
|
|
}
|
|
|
|
.cch-view-cards .cch-submenu li a {
|
|
padding: 8px 16px;
|
|
margin: 0;
|
|
border-radius: 0;
|
|
}
|
|
|
|
body.cch-dark-mode .cch-view-cards .cch-submenu {
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
/* 5.5. LIST MODE (Expanded View) Specifics */
|
|
.cch-view-expanded .cch-grid {
|
|
display: block;
|
|
column-count: 1;
|
|
column-gap: 20px;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.cch-view-expanded .cch-grid {
|
|
column-count: 2;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1100px) {
|
|
.cch-view-expanded .cch-grid {
|
|
column-count: 3;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1500px) {
|
|
.cch-view-expanded .cch-grid {
|
|
column-count: 4;
|
|
}
|
|
}
|
|
|
|
.cch-view-expanded .cch-card {
|
|
break-inside: avoid;
|
|
page-break-inside: avoid;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
6. COMPONENT: CONTEXT MENU
|
|
========================================================================== */
|
|
.cch-context-menu {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.cch-context-label,
|
|
.cch-context-label[type=button] {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 0 10px;
|
|
height: 24px;
|
|
background: rgba(20, 20, 20, 0.90) !important;
|
|
backdrop-filter: blur(12px);
|
|
color: #e0e0e0;
|
|
border: 1px solid rgba(255, 255, 255, 0.12) !important;
|
|
border-radius: 999px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: opacity 0.2s ease;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.cch-context-label:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.cch-context-label .dashicons {
|
|
font-size: 14px;
|
|
width: 14px;
|
|
height: 14px;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.cch-context-open .cch-context-label .dashicons {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.cch-context-dropdown {
|
|
position: absolute;
|
|
bottom: calc(100% + 4px);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
min-width: 200px;
|
|
max-width: 300px;
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
background: rgba(20, 20, 20, 0.95) !important;
|
|
backdrop-filter: blur(12px);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
border-radius: 8px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
transition: opacity 0.15s ease, visibility 0s linear 0.15s;
|
|
z-index: 10;
|
|
}
|
|
|
|
.cch-context-open .cch-context-dropdown {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
pointer-events: auto;
|
|
transition: opacity 0.15s ease, visibility 0s linear 0s;
|
|
}
|
|
|
|
.cch-context-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
padding: 10px 14px;
|
|
font-size: 13px;
|
|
color: #a7aaad !important;
|
|
text-decoration: none;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
transition: background 0.1s ease, color 0.1s ease;
|
|
}
|
|
|
|
.cch-context-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.cch-context-item:hover,
|
|
.cch-context-item.cch-focus {
|
|
background: var(--cch-accent);
|
|
color: #fff !important;
|
|
}
|
|
|
|
.cch-context-item.cch-context-current {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
color: var(--cch-accent);
|
|
font-weight: 600;
|
|
border-left: 3px solid var(--cch-accent);
|
|
padding-left: 11px;
|
|
}
|
|
|
|
@media screen and (max-width: 600px) {
|
|
.cch-context-label span:not(.dashicons) {
|
|
display: none;
|
|
}
|
|
|
|
.cch-context-label {
|
|
padding: 0 8px;
|
|
}
|
|
}
|
|
|
|
/* ==========================================================================
|
|
7. COMPONENT: TOAST & HELP
|
|
========================================================================== */
|
|
|
|
/* 7.1. Toast Notification */
|
|
#cch-ui-toast {
|
|
position: fixed;
|
|
bottom: 80px;
|
|
left: 50%;
|
|
transform: translateX(-50%) translateY(20px);
|
|
background: rgba(20, 20, 20, 0.9);
|
|
backdrop-filter: blur(10px);
|
|
color: #fff;
|
|
padding: 10px 20px;
|
|
border-radius: 999px;
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.5px;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
z-index: var(--cch-z-toast);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
#cch-ui-toast.cch-show {
|
|
opacity: 1;
|
|
transform: translateX(-50%) translateY(0);
|
|
}
|
|
|
|
/* 7.2. Help Overlay */
|
|
#cch-help {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 200;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
#cch-help[aria-hidden="false"] {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.cch-help-panel {
|
|
background: var(--cch-bg-card);
|
|
padding: 32px;
|
|
border-radius: 12px;
|
|
width: 100%;
|
|
max-width: 450px;
|
|
box-shadow: var(--cch-shadow-popout);
|
|
color: var(--cch-text-main);
|
|
border: 1px solid var(--cch-border);
|
|
}
|
|
|
|
.cch-help-panel h3 {
|
|
color: var(--cch-text-main);
|
|
padding: 8px 0 0 0;
|
|
}
|
|
|
|
.cch-help-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 24px 0;
|
|
}
|
|
|
|
.cch-help-list li {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid var(--cch-border);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.cch-help-close {
|
|
width: 100%;
|
|
padding: 12px;
|
|
background: var(--cch-bg-hover);
|
|
border: 1px solid var(--cch-border);
|
|
color: var(--cch-text-main);
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
8. INTEGRATIONS
|
|
========================================================================== */
|
|
|
|
/* 8.1. Gutenberg / Block Editor Fixes */
|
|
body.cch-island-mode .interface-interface-skeleton,
|
|
body.cch-island-mode .interface-interface-skeleton__sidebar,
|
|
body.cch-island-mode .interface-interface-skeleton__content,
|
|
body.cch-island-mode .edit-post-header,
|
|
body.cch-island-mode .editor-header,
|
|
body.cch-island-mode .components-notice-list {
|
|
top: 0 !important;
|
|
left: 0 !important;
|
|
}
|
|
|
|
body.cch-island-mode .editor-post-publish-panel {
|
|
top: 0 !important;
|
|
}
|
|
|
|
body.cch-island-mode .edit-post-layout,
|
|
body.cch-island-mode .editor-visual-editor,
|
|
body.cch-island-mode .editor-styles-wrapper > .block-editor-block-list__layout {
|
|
min-height: 100vh;
|
|
}
|
|
|
|
body.cch-island-mode .edit-post-visual-editor {
|
|
margin-left: 0 !important;
|
|
}
|
|
|
|
body.cch-island-mode .edit-post-layout__content {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
/* 8.2. Query Monitor Colors */
|
|
#cch-island-qm.qm-error {
|
|
color: #ff5f5f !important;
|
|
}
|
|
|
|
#cch-island-qm.qm-warning,
|
|
#cch-island-qm.qm-alert {
|
|
color: #f0b849 !important;
|
|
}
|
|
|
|
/* 8.3. WooCommerce */
|
|
body .woocommerce-layout__header {
|
|
width: 100%;
|
|
top: 0px;
|
|
left: 0px;
|
|
}
|
|
|
|
/* 8.4. Page Builder Settings */
|
|
.settings_page_fl-builder-settings a.cch-island-action {
|
|
color: #fff;
|
|
}
|
|
|
|
.settings_page_fl-builder-settings a.cch-context-item {
|
|
color: #a7aaad;
|
|
}
|
|
|
|
.settings_page_fl-builder-settings a.cch-card-main-link {
|
|
color: var(--cch-text-main) !important;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
9. UTILITIES & ANIMATIONS
|
|
========================================================================== */
|
|
|
|
/* 9.1. Animations */
|
|
@keyframes cch-spin {
|
|
100% {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* 9.2. Fix for Plugin Install Grid (Force 2-column) */
|
|
@media screen and (min-width: 782px) {
|
|
body.cch-hide-admin-menu.plugin-install-php .plugin-card {
|
|
width: calc(50% - 8px) !important;
|
|
}
|
|
|
|
body.cch-hide-admin-menu.plugin-install-php .plugin-card:nth-child(odd) {
|
|
clear: both !important;
|
|
margin-left: 0 !important;
|
|
margin-right: 8px !important;
|
|
}
|
|
|
|
body.cch-hide-admin-menu.plugin-install-php .plugin-card:nth-child(even) {
|
|
clear: none !important;
|
|
margin-right: 0 !important;
|
|
margin-left: 8px !important;
|
|
}
|
|
}
|
|
|
|
/* 9.3. Misc Fixes */
|
|
.cch-hide-admin-menu #perfmatters-admin {
|
|
margin: 15px auto 0px;
|
|
} |