:root {
    --wptp-z: 2147483000 !important;
    --wptp-bg: #f1f5f9 !important;
    --wptp-surface: #ffffff !important;
    --wptp-border: #d0d7de !important;
    --wptp-accent: #2563eb !important;
    --wptp-primary: #0f172a !important;
    --wptp-danger: #dc2626 !important;
    --wptp-radius: 6px !important;
    --wptp-text: #24292f !important;
    --wptp-font: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji !important;
    --wptp-transition: .15s ease !important;
    --wptp-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.wptp-popup {
    position: fixed !important;
    background: var(--wptp-surface) !important;

    right: 80px;
    bottom: 80px;

    font-size: 16px !important;
    font-family: var(--wptp-font) !important;
    border-radius: var(--wptp-radius) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 16px 48px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
    z-index: 10000000000 !important;

    animation: wptp-popup-entrance .35s ease-out !important;
}

@keyframes wptp-popup-entrance {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wptp-popup-title {
    font-size: 24px !important;
    font-weight: bold;
    margin: 0 0 8px !important;
}

.wptp-popup-content {
    padding: 20px;
}

.wptp-popup-content p {
    margin: 0 0 4px !important;
}

.wptp-highlight {
    box-shadow: 0 0 200px 80px var(--wptp-accent) !important;
    transition: box-shadow var(--wptp-transition) !important;
}

.wptp-floating-button {
    position: fixed !important;
    bottom: 1.25rem !important;
    right: 1.25rem !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: var(--wptp-radius) !important;
    background: var(--wptp-primary) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: .25rem !important;
    cursor: pointer !important;
    z-index: 10000000000 !important;
    box-shadow: var(--wptp-shadow);
    transition: background var(--wptp-transition), transform var(--wptp-transition);
    letter-spacing: .5px !important;
}

.wptp-floating-button:hover {
    background: #fff !important;
}

.wptp-floating-button:active {
    transform: translateY(2px) !important;
}

.wptp-panel {
    position: fixed !important;
    right: 1.25rem !important;
    bottom: 5rem !important;
    width: 420px !important;
    max-width: 95vw !important;
    max-height: 70vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--wptp-surface) !important;
    color: var(--wptp-text) !important;
    z-index: calc(var(--wptp-z) + 1) !important;
    font-family: var(--wptp-font) !important;
    border-radius: var(--wptp-radius) !important;
    box-shadow: var(--wptp-shadow) !important;
    overflow: hidden !important;
}

.wptp-panel-overlay {
    position: absolute !important;
    left: 0;
    width: 100%;
    justify-content: center !important;
    text-align: center !important;
    background: none !important;
}

.wptp-panel.hidden {
    display: none !important;
}

.wptp-panel-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: .75rem 1rem !important;
    border-bottom: 1px solid var(--wptp-border) !important;
    background: var(--wptp-primary) !important;
}

.wptp-panel-header h2 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--wptp-bg) !important;
}

.wptp-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
}

.wptp-header-btn,
button.wptp-close {
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--wptp-bg);
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.wptp-header-btn:hover,
button.wptp-close:hover {
    color: var(--wptp-accent);
    background-color: transparent;
}

.wptp-fullarea {
    overflow-y: auto !important;
}

.wptp-design-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    padding: .85rem 1rem 1rem !important;
    overflow: auto !important;
}

.wptp-section {
    border: 1px solid var(--wptp-border) !important;
    border-radius: var(--wptp-radius) !important;
    padding: .8rem .95rem 1rem !important;
    background: var(--wptp-bg) !important;
}

.wptp-section legend {
    padding: 0 .4rem !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    font-weight: 600 !important;
}

.wptp-grid-colors {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: .75rem !important;
}

.wptp-grid-colors label {
    display: flex !important;
    flex-direction: column !important;
    gap: .35rem !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: .5px !important;
    position: relative !important;
}

.wptp-grid-colors input[type=hidden] {
    display: none !important;
}

/* Compact icon reset buttons appended inside labels */
.wptp-icon-btn,
.wptp-reset-color,
.wptp-reset-background {
    position: absolute !important;
    align-self: center !important;
    top: 50% !important;
    right: 4px !important;
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    border: 0px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--wptp-text) !important;
    transition: background var(--wptp-transition), color var(--wptp-transition) !important;
}

.wptp-icon-btn:hover,
.wptp-reset-color:hover,
.wptp-reset-background:hover {
    background: #f0f3f6 !important;
    color: var(--wptp-accent) !important;
}

/* Reset button positioning over the swatch */

/* Background color label now lives inside #wptp-dynamic-colors as first label */
/* No special max-width needed; inherits grid layout like others. */

.wptp-full {
    display: flex !important;
    flex-direction: column !important;
    gap: .35rem !important;
    margin-top: .6rem !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

.wptp-full input[type=text] {
    background: #fff !important;
    border: 1px solid var(--wptp-border) !important;
    border-radius: 4px !important;
    padding: .5rem .6rem !important;
    color: var(--wptp-text) !important;
    font-size: 13px !important;
}

.wptp-full input[type=text]:focus {
    outline: 2px solid var(--wptp-accent) !important;
}

.wptp-hint {
    font-size: 11px !important;
    opacity: .65 !important;
    margin: .4rem 0 0 !important;
}

.wptp-logo-row {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.wptp-logo-preview {
    width: 140px !important;
    height: 70px !important;
    background: #fff !important;
    border: 1px solid var(--wptp-border) !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 4px !important;
}

.wptp-logo-preview img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

.wptp-logo-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: .4rem !important;
}

.wptp-actions, .wptp-popup-actions {
    padding: .75rem 1rem !important;
    display: flex !important;
    gap: .5rem !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    border-top: 1px solid var(--wptp-border) !important;
    background: var(--wptp-bg) !important;
}

.wptp-version {
    margin-left: auto !important;
    font-size: 9px !important;
    opacity: .35 !important;
    font-family: var(--wptp-font) !important;
    user-select: none !important;
}

.wptp-popup-actions {
    justify-content: flex-end !important;
}

.wptp-button-primary,
.wptp-button-secondary,
.wptp-button-danger {
    cursor: pointer !important;
    border: 1px solid var(--wptp-border) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: .5px !important;
    padding: 8px 16px 8px 16px !important;
    border-radius: 8px !important;
    background: #f6f8fa !important;
    color: var(--wptp-text) !important;
    line-height: 1.2 !important;
    font-family: var(--wptp-font) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wptp-button-primary {
    background: var(--wptp-accent) !important;
    color: #fff !important;
    border-color: var(--wptp-accent) !important;
}

.wptp-button-primary:hover {
    background: #1d4ed8 !important;
}

.wptp-button-secondary {
    background: var(--wptp-surface) !important;
    color: var(--wptp-text) !important;
}

.wptp-button-secondary:hover {
    background: #f0f3f6 !important;
}

.wptp-button-danger {
    background: #fff !important;
    color: var(--wptp-danger) !important;
    border-color: var(--wptp-danger) !important;
}

.wptp-button-danger:hover {
    background: var(--wptp-danger) !important;
    color: #fff !important;
}

@media (max-width:800px) {
    .wptp-popup {
        left: 50% !important;
        top: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: 95vw !important;
        max-width: 400px !important;
    }

}


#wptp-preview-toggle.wptp-preview-on {
    background: var(--wptp-accent) !important;
    color: #fff !important;
    border-color: var(--wptp-accent) !important;
}

#wptp-preview-toggle:not(.wptp-preview-on) {
    background: #fff !important;
    color: var(--wptp-text) !important;
}

#wptp-preview-toggle:not(.wptp-preview-on):hover {
    background: #f0f3f6 !important;
}

.wptp-checkout {
    padding: .75rem 1rem !important;
    border-top: 1px solid var(--wptp-border) !important;
    background: var(--wptp-bg) !important;
    text-align: center !important;
}

.wptp-checkout-btn {
    width: 100% !important;
}

@media (max-width:800px) {
    .wptp-panel {
        right: .75rem !important;
        left: .75rem !important;
        width: auto !important;
        bottom: 4.5rem !important;
    }

    .wptp-design-form {
        max-height: 50vh !important;
    }
}
