/**
 * Uply Admin Dashboard - Stitch Design
 * Dark mode default, inspired by Google Stitch UI
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --ustt-primary: #137fec;
    --ustt-primary-hover: #0e6bce;
    --ustt-primary-light: rgba(19, 127, 236, 0.1);

    /* Spacing Tokens (Base-8) */
    --ustt-s1: 4px;
    --ustt-s2: 8px;
    --ustt-s3: 12px;
    --ustt-s4: 16px;
    --ustt-s5: 24px;
    --ustt-s6: 32px;
    --ustt-s7: 48px;
    --ustt-s8: 64px;

    /* Border Radius */
    --ustt-radius-s: 6px;
    --ustt-radius-m: 10px;
    --ustt-radius-l: 16px;

    /* Light Mode */
    --ustt-bg: #f6f7f8;
    --ustt-surface: #ffffff;
    --ustt-border: #e2e8f0;
    --ustt-text: #0f172a;
    --ustt-text-muted: #64748b;
    --ustt-text-light: #94a3b8;
}

.ustt-wrap.dark {
    --ustt-bg: #0f172a;
    /* Slightly deeper navy */
    --ustt-surface: #1e293b;
    --ustt-border: rgba(255, 255, 255, 0.08);
    /* Minimalist borders */
    --ustt-text: #f8fafc;
    --ustt-text-muted: #94a3b8;
    --ustt-text-light: #64748b;
}

/* ============================================
   Base Reset & Layout
   ============================================ */
.ustt-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--ustt-bg);
    color: var(--ustt-text);
    min-height: 100vh;
    margin-left: -20px;
    margin-top: -10px;
    display: flex;
    flex-direction: column;
}

.ustt-wrap *,
.ustt-wrap *::before,
.ustt-wrap *::after {
    box-sizing: border-box;
}

/* Hide WordPress Admin Notices on Plugin Page */
.toplevel_page_ustt-settings .notice,
.toplevel_page_ustt-settings .updated,
.toplevel_page_ustt-settings .update-nag,
.toplevel_page_ustt-settings .error,
.toplevel_page_ustt-settings .notice-warning,
.toplevel_page_ustt-settings .notice-info,
.toplevel_page_ustt-settings .notice-error,
.toplevel_page_ustt-settings .notice-success,
.toplevel_page_ustt-settings #wpbody-content>.notice,
.toplevel_page_ustt-settings #wpbody-content>.updated {
    display: none !important;
}

/* Hide WP Footer and Version */
.toplevel_page_ustt-settings #wpfooter,
.toplevel_page_ustt-settings .update-nag {
    display: none !important;
}

/* ============================================
   Header (Sticky Top Navigation)
   ============================================ */
.ustt-header {
    position: sticky;
    top: 32px;
    /* WP Admin bar offset */
    z-index: 100;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ustt-border);
    padding: 0 40px;
}

@media (min-width: 1024px) {
    .ustt-header {
        padding: 0 80px;
    }
}

.ustt-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    max-width: 98%;
    margin: 0 auto;
    width: 100%;
}

.ustt-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ustt-logo {
    background: var(--ustt-primary);
    color: #fff;
    padding: var(--ustt-s2);
    border-radius: var(--ustt-radius-s);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(19, 127, 236, 0.3);
}

.ustt-logo .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ustt-brand h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--ustt-text);
}

/* Navigation Links */
.ustt-nav {
    display: none;
    align-items: center;
    gap: 24px;
}

@media (min-width: 768px) {
    .ustt-nav {
        display: flex;
    }
}

.ustt-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ustt-text-muted);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    outline: none !important;
    box-shadow: none !important;
}

.ustt-nav-link:hover,
.ustt-nav-link:focus {
    color: var(--ustt-primary);
    text-decoration: none;
    outline: none !important;
}

.ustt-nav-link.active {
    color: var(--ustt-primary);
    font-weight: 700;
    border-bottom-color: var(--ustt-primary);
}

/* Header Actions */
.ustt-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ustt-btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--ustt-primary), var(--ustt-primary-hover));
    color: white !important;
    text-decoration: none;
    border-radius: var(--ustt-radius-m);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(19, 127, 236, 0.3);
}

.ustt-btn-upgrade:hover {
    background: linear-gradient(135deg, #2196f3, var(--ustt-primary));
    color: white !important;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(19, 127, 236, 0.45);
}

.ustt-btn-upgrade .ustt-upgrade-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ============================================
   Buttons
   ============================================ */
.ustt-btn-primary {
    background: var(--ustt-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 24px;
    border: none;
    border-radius: var(--ustt-radius-m);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(19, 127, 236, 0.2);
}

.ustt-btn-primary:hover {
    background: var(--ustt-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(19, 127, 236, 0.3);
}

.ustt-btn-primary:active {
    transform: translateY(0);
}

.ustt-btn-secondary {
    background: var(--ustt-surface);
    color: var(--ustt-text);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 24px;
    border: 1px solid var(--ustt-border);
    border-radius: var(--ustt-radius-m);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.ustt-btn-secondary:hover {
    background: var(--ustt-bg);
    border-color: var(--ustt-text-light);
}

/* ============================================
   Main Content Area
   ============================================ */
.ustt-main {
    flex: 1;
    padding: 40px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 1024px) {
    .ustt-main {
        padding: 40px 20px;
    }
}

/* ============================================
   Page Heading
   ============================================ */
.ustt-page-heading {
    margin-bottom: var(--ustt-s7);
}

.ustt-page-heading h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 var(--ustt-s2);
    color: var(--ustt-text);
}

.ustt-page-heading p {
    font-size: 0.9375rem;
    color: var(--ustt-text-muted);
    margin: 0;
    max-width: 600px;
    line-height: 1.5;
}

/* ============================================
   Tab Content
   ============================================ */
.ustt-tab-content {
    display: none;
}

.ustt-tab-content.active {
    display: block;
}

/* Sub-Tab Content (Templates / Custom Builder) */
.ustt-template-tab-content {
    display: none;
}

.ustt-template-tab-content.active {
    display: block;
}

/* ============================================
   Cards
   ============================================ */
.ustt-card {
    background: var(--ustt-surface);
    border: 1px solid var(--ustt-border);
    border-radius: var(--ustt-radius-m);
    padding: var(--ustt-s4);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.ustt-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ustt-text);
}

.ustt-card-title .dashicons {
    color: var(--ustt-primary);
}

/* ============================================
   Intro Grid (Video & Table)
   ============================================ */
.ustt-intro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

@media (min-width: 1024px) {
    .ustt-intro-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Video Placeholder */
.ustt-video-placeholder {
    background: linear-gradient(135deg, var(--ustt-primary-light), var(--ustt-bg));
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--ustt-text-muted);
}

.ustt-play-btn {
    width: 64px;
    height: 64px;
    background: var(--ustt-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(19, 127, 236, 0.4);
    transition: transform 0.2s;
}

.ustt-play-btn:hover {
    transform: scale(1.05);
}

.ustt-play-btn .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

/* Quick Start Table */
.ustt-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--ustt-border);
    background: var(--ustt-bg);
}

.ustt-table thead tr {
    background: rgba(51, 65, 85, 0.5);
}

.ustt-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ustt-text-muted);
}

.ustt-table td {
    padding: 16px 20px;
    font-size: 0.875rem;
    color: var(--ustt-text-muted);
    border-top: 1px solid var(--ustt-border);
}

.ustt-table .step-num {
    font-weight: 700;
    color: var(--ustt-text);
}

.ustt-table .step-num.primary {
    color: var(--ustt-primary);
}

.ustt-table .bold {
    font-weight: 500;
    color: var(--ustt-text);
}

.ustt-table tr.highlight {
    background: var(--ustt-primary-light);
}

/* ============================================
   Section Header
   ============================================ */
.ustt-section-header {
    border-top: 1px solid var(--ustt-border);
    padding-top: 32px;
    margin-bottom: 24px;
}

.ustt-section-header h2 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--ustt-text);
}

/* ============================================
   Features Grid
   ============================================ */
.ustt-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.ustt-feature-card {
    background: var(--ustt-surface);
    border: 1px solid var(--ustt-border);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ustt-feature-card:hover {
    border-color: var(--ustt-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.ustt-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--ustt-primary-light);
    color: var(--ustt-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: background 0.2s, color 0.2s;
}

.ustt-feature-card:hover .ustt-feature-icon {
    background: var(--ustt-primary);
    color: #fff;
}

.ustt-feature-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.ustt-feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--ustt-text);
}

.ustt-feature-card p {
    font-size: 0.875rem;
    color: var(--ustt-text-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

.ustt-feature-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ustt-primary);
}

/* ============================================
   Support Grid
   ============================================ */
.ustt-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.ustt-support-card {
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid var(--ustt-border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.ustt-support-icon {
    width: 64px;
    height: 64px;
    background: var(--ustt-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ustt-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ustt-support-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.ustt-support-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--ustt-text);
}

.ustt-support-content p {
    font-size: 0.875rem;
    color: var(--ustt-text-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

/* ============================================
   Settings Card
   ============================================ */
.ustt-settings-card {
    max-width: 720px;
}

.ustt-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ustt-border);
    margin-bottom: 24px;
}

.ustt-settings-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--ustt-text);
}

.ustt-settings-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================
   Form Elements
   ============================================ */
.ustt-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ustt-form-group>label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ustt-text);
}

.ustt-form-group input[type="text"],
.ustt-form-group input[type="number"],
.ustt-form-group select {
    background: var(--ustt-bg);
    border: 1px solid var(--ustt-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8125rem;
    color: var(--ustt-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.ustt-form-group input:focus,
.ustt-form-group select:focus {
    outline: none;
    border-color: var(--ustt-primary);
    box-shadow: 0 0 0 3px var(--ustt-primary-light);
}

.ustt-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ustt-description {
    font-size: 0.75rem;
    color: var(--ustt-text-light);
    margin: 0;
}



/* Checkbox List */
.ustt-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ustt-checkbox-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--ustt-text-muted);
    cursor: pointer;
}

.ustt-checkbox-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ustt-primary);
    cursor: pointer;
}

/* Inline Checkbox */
.ustt-inline-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ustt-inline-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ustt-primary);
}

.ustt-inline-check span {
    font-size: 0.875rem;
    color: var(--ustt-text-muted);
}

/* ============================================
   Toggle Switch
   ============================================ */
.ustt-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.ustt-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ustt-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--ustt-border);
    transition: 0.3s;
    border-radius: 28px;
}

.ustt-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ustt-switch input:checked+.ustt-slider {
    background-color: var(--ustt-primary);
}

.ustt-switch input:checked+.ustt-slider:before {
    transform: translateX(24px);
}

/* ============================================
   Footer
   ============================================ */
.ustt-footer {
    margin-top: auto;
    border-top: 1px solid var(--ustt-border);
    background: var(--ustt-surface);
    padding: 24px 40px;
}

@media (min-width: 1024px) {
    .ustt-footer {
        padding: 24px 80px;
    }
}

.ustt-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 1440px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .ustt-footer-inner {
        flex-direction: row;
        justify-content: space-between;
    }
}

.ustt-footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    font-size: 0.875rem;
    color: var(--ustt-text-muted);
}

.ustt-footer-brand .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ustt-footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ustt-footer-links a {
    font-size: 0.75rem;
    color: var(--ustt-text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.ustt-footer-links a:hover {
    color: var(--ustt-primary);
}

#ustt-preview-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    /* Default styles removed to support templates */
    background: transparent;
    box-shadow: none;
    border: none;
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
}

#ustt-preview-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================
   Toast Notification
   ============================================ */
.ustt-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--ustt-surface);
    border: 1px solid var(--ustt-border);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ustt-text);
}

.ustt-card.ustt-settings-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--ustt-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--ustt-radius-m);
}

.ustt-settings-header h3 {
    margin: 0 0 var(--ustt-s3);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ustt-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ustt-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.ustt-toast.success {
    border-left: 4px solid #10b981;
}

.ustt-toast.error {
    border-left: 4px solid #ef4444;
}

/* ============================================
   Subtabs
   ============================================ */
.ustt-subtabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--ustt-border);
    padding-bottom: 0;
}

.ustt-subtab {
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ustt-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.ustt-subtab:hover {
    color: var(--ustt-text);
}

.ustt-subtab.active {
    color: var(--ustt-primary);
    border-bottom-color: var(--ustt-primary);
}

.ustt-subtab-content {
    display: none;
}

.ustt-subtab-content.active {
    display: block;
}

/* ============================================
   Compact Page Heading
   ============================================ */
.ustt-page-heading--compact {
    margin-bottom: 16px;
}

.ustt-page-heading--compact h1 {
    font-size: 1.75rem;
    margin-bottom: 0;
}

/* ============================================
   Designer Layout (Matches React Reference)
   ============================================ */
/* Designer Tab Layout Wrapper - 2 Column Layout */
.ustt-designer-wrap {
    display: grid;
    grid-template-columns: 550px 1fr;
    gap: var(--ustt-s6);
    align-items: start;
    margin-top: var(--ustt-s4);
}

@media (max-width: 1400px) {
    .ustt-designer-wrap {
        grid-template-columns: 480px 1fr;
    }
}

@media (max-width: 1100px) {
    .ustt-designer-wrap {
        grid-template-columns: 1fr;
    }
}

.ustt-designer-col {
    min-width: 0;
    /* Tooltip fix for grid */
}

.ustt-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0 0 24px;
}

/* ============================================
   1. Templates Grid
   ============================================ */
.ustt-template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ustt-template-item {
    cursor: pointer;
}

.ustt-template-item input {
    display: none;
}

.ustt-template-box {
    aspect-ratio: 1;
    background: rgba(30, 35, 50, 0.6);
    border: 2px solid rgba(55, 65, 81, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #9ca3af;
}

.ustt-template-box .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.ustt-template-item input:checked+.ustt-template-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    color: #3b82f6;
}

.ustt-template-item:hover .ustt-template-box {
    background: rgba(30, 35, 50, 0.9);
    border-color: rgba(75, 85, 99, 0.6);
}

/* ============================================
   2. Live Preview (Abstract Card)
   ============================================ */
.ustt-preview-col {
    position: sticky;
    top: 150px;
    /* Adjust based on header height */
    align-self: start;
    z-index: 10;
}

.ustt-preview-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ustt-preview-header-row .ustt-section-label {
    margin-bottom: 0;
}

/* Device Toggle */
.ustt-device-toggle {
    display: flex;
    background: rgba(30, 35, 50, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.4);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.ustt-device-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ustt-device-btn:hover {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.05);
}

.ustt-device-btn.active {
    background: #3b82f6;
    color: white;
}

.ustt-device-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Preview Card Container */
.ustt-preview-card {
    background: linear-gradient(to bottom, #ffffff 0%, #f3f4f6 100%);
    border-radius: 24px;
    padding: 0;
    /* Removing padding to let scroll window fill */
    position: relative;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Clip content for radius */

    /* Default Desktop View - HD Ratio Simulation */
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    max-height: 400px;
    /* Safety cap */
    transition: all 0.3s ease;
    margin: 0 auto;
}

/* Mobile View Modification */
.ustt-preview-card.is-mobile {
    width: 320px;
    height: 500px;
    /* Fixed height for mobile */
    aspect-ratio: auto;
    border: 4px solid #334155;
    /* Simulate phone bezel */
}

/* Scroll Window inside Card */
.ustt-preview-scroll-window {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 32px 24px;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.ustt-preview-scroll-window::-webkit-scrollbar {
    width: 6px;
}

.ustt-preview-scroll-window::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.ustt-preview-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 80px;
    /* Space for button at bottom */
}

.ustt-preview-lines-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ustt-preview-line {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    width: 100%;
}

.ustt-preview-block {
    height: 120px;
    background: #e5e7eb;
    border-radius: 12px;
    width: 100%;
}

/* Preview Button - Fixed relative to Card */
.ustt-preview-btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    bottom: 0;
    right: 0;
    z-index: 20;
    opacity: 0;
    transform: translateY(20px);
}

.ustt-preview-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ustt-preview-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.5);
}

.ustt-preview-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ============================================
   3. Customization Controls
   ============================================ */
.ustt-control-group {
    margin-bottom: 20px;
}

.ustt-control-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ustt-text-muted);
    margin-bottom: var(--ustt-s2);
}

.ustt-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ustt-value-display {
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 600;
}

/* Toggle Buttons */
.ustt-toggle-btns {
    display: flex;
    gap: 8px;
    background: rgba(30, 35, 50, 0.6);
    padding: 4px;
    border-radius: 12px;
}

.ustt-toggle-btn {
    flex: 1;
}

.ustt-toggle-btn input {
    display: none;
}

.ustt-toggle-btn span {
    display: block;
    padding: 6px 10px;
    text-align: center;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
}

.ustt-toggle-btn input:checked+span {
    background: #3b82f6;
    color: white;
}

/* Inputs (Glassmorphism) */
.ustt-control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.ustt-input-glass {
    width: 100%;
    padding: 8px 12px;
    background: rgba(30, 35, 50, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e8eaf0;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
}

.ustt-input-glass:focus {
    border-color: #3b82f6;
}

/* Input with Icon */
.ustt-input-with-icon {
    position: relative;
}

.ustt-input-with-icon .dashicons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

.ustt-input-with-icon input {
    padding-left: 40px;
}

/* Range Slider */
.ustt-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(55, 65, 81, 0.4);
    border-radius: 3px;
    outline: none;
}

.ustt-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.ustt-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Checkbox Groups */
.ustt-glass-group {
    background: rgba(30, 35, 50, 0.4);
    padding: 12px;
    border-radius: 12px;
}

.ustt-radio-row,
.ustt-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5db;
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: 6px;
}

.ustt-checkbox-inline input,
.ustt-radio-row input {
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
}

/* Save Button */
.ustt-save-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 32px;
}

.ustt-btn-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 16px 40px;
    border-radius: 12px;
    border: none;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ustt-btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.5);
}

.ustt-color-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ustt-color-input-wrap input[type="color"] {
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
}

/* ============================================
   Reset Button & Controls
   ============================================ */
.ustt-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ustt-btn-reset {
    background: transparent;
    border: none;
    color: var(--ustt-text-light);
    cursor: pointer;
    /* Remove padding if we are sizing specifically */
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ustt-btn-reset:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ustt-primary);
    transform: rotate(-30deg);
}

/* Specific override for when dashicons class is on the button itself */
.ustt-btn-reset.dashicons {
    font-size: 16px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
}

.ustt-admin-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ustt-admin-wrapper>* {
    pointer-events: auto;
}

/* ============================================
   Sticky Action Bar & New UI Elements
   ============================================ */
.ustt-sticky-bar {
    position: sticky;
    top: 90px;
    z-index: 90;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--ustt-border);
    padding: var(--ustt-s4) 40px;
    margin: -40px -40px var(--ustt-s6) -40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
    .ustt-sticky-bar {
        padding: var(--ustt-s4) 80px;
        margin: -40px -80px var(--ustt-s6) -80px;
    }
}

.ustt-sb-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
}

/* Big Toggle Switch */
.ustt-enable-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.ustt-enable-toggle input {
    display: none;
}

.ustt-toggle-slider {
    position: relative;
    width: 64px;
    height: 36px;
    background-color: var(--ustt-border);
    border-radius: 36px;
    transition: 0.3s;
}

.ustt-toggle-slider:before {
    content: "";
    position: absolute;
    height: 28px;
    width: 28px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ustt-enable-toggle input:checked+.ustt-toggle-slider {
    background-color: var(--ustt-primary);
}

.ustt-enable-toggle input:checked+.ustt-toggle-slider:before {
    transform: translateX(28px);
}

.ustt-toggle-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ustt-text);
}

/* Settings Box */
.ustt-settings-box {
    background: var(--ustt-surface);
    border: 1px solid var(--ustt-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 40px;
    transition: opacity 0.3s, filter 0.3s;
}

.ustt-settings-box.ustt-disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.8);
}

.ustt-setting-row {
    margin-bottom: var(--ustt-s6);
    padding-bottom: var(--ustt-s6);
    border-bottom: 1px solid var(--ustt-border);
}

.ustt-setting-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ustt-setting-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: var(--ustt-s3);
    color: var(--ustt-text);
    letter-spacing: -0.01em;
}

/* Radio Pills */
.ustt-radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ustt-radio-pill {
    position: relative;
    cursor: pointer;
}

.ustt-radio-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ustt-radio-pill {
    padding: 10px 20px;
    background: var(--ustt-bg);
    border: 1px solid var(--ustt-border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ustt-text-muted);
    transition: 0.2s;
}

.ustt-radio-pill:hover {
    border-color: var(--ustt-primary);
    color: var(--ustt-primary);
}

.ustt-radio-pill input:checked+span,
/* If span used */
.ustt-radio-pill:has(input:checked) {
    /* Modern browsers */
    background: var(--ustt-primary);
    border-color: var(--ustt-primary);
    color: white;
}

/* Fallback for older browsers if needed, but :has is widely supported now or use JS class toggle */
.ustt-radio-pill.active {
    background: var(--ustt-primary);
    border-color: var(--ustt-primary);
    color: white;
}

/* Accordion */
.ustt-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ustt-accordion-item {
    border: 1px solid var(--ustt-border);
    border-radius: 8px;
    background: var(--ustt-bg);
    overflow: hidden;
}

.ustt-accordion-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    background: var(--ustt-surface);
    transition: background 0.2s;
}

.ustt-accordion-header:hover {
    background: var(--ustt-bg);
}

.ustt-accordion-body {
    padding: 20px;
    border-top: 1px solid var(--ustt-border);
    display: none;
}

.ustt-accordion-item.active .ustt-accordion-body {
    display: block;
}

.ustt-accordion-item.active .dashicons {
    transform: rotate(180deg);
}

.ustt-checkbox-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--ustt-text);
}

/* Enable Section (Below Sticky Bar) */
.ustt-enable-section {
    background: var(--ustt-surface);
    border: 1px solid var(--ustt-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ustt-enable-section .ustt-enable-toggle {
    margin-bottom: 0;
}

.ustt-enable-section .ustt-description {
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--ustt-text-muted);
}

/* ============================================
   Updated Toggle Switch (IOS Style)
   ============================================ */
.ustt-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.ustt-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ustt-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--ustt-border);
    /* Darker gray default */
    transition: .4s;
}

.ustt-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ustt-switch input:checked+.ustt-slider {
    background-color: var(--ustt-primary);
}

.ustt-switch input:focus+.ustt-slider {
    box-shadow: 0 0 1px var(--ustt-primary);
}

.ustt-switch input:checked+.ustt-slider:before {
    transform: translateX(22px);
}

/* Rounded sliders */
.ustt-slider.round {
    border-radius: 34px;
}

.ustt-slider.round:before {
    border-radius: 50%;
}

/* ============================================
   Fix for Sticky Sidebar Overflow (Independent Scroll)
   ============================================ */
.ustt-customize-col {
    position: sticky;
    top: 90px;
    z-index: 10;
    height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Custom Scrollbar for Chrome/Safari/Edge */
.ustt-customize-col::-webkit-scrollbar {
    width: 6px;
}

.ustt-customize-col::-webkit-scrollbar-track {
    background: transparent;
}

.ustt-customize-col::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.ustt-customize-col::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Spacer for bottom items */
.ustt-customize-col>*:last-child {
    margin-bottom: 40px;
}

/* ============================================
   Disabled State (Visible but reduced opacity)
   ============================================ */
.ustt-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   Template Tabs (Templates / Custom Builder)
   ============================================ */
.ustt-template-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--ustt-border);
    margin-bottom: var(--ustt-s4);
}

.ustt-template-tab {
    background: transparent;
    border: none;
    color: var(--ustt-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    outline: none;
}

.ustt-template-tab:hover {
    color: var(--ustt-text);
}

.ustt-template-tab.active {
    color: var(--ustt-primary);
    border-bottom-color: var(--ustt-primary);
}

.ustt-template-tab-content {
    display: none;
}

.ustt-template-tab-content.active {
    display: block;
}

/* Template Grid Styling - Strict 3 Columns */
.ustt-template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--ustt-s3);
    margin-top: var(--ustt-s4);
}

.ustt-template-item {
    position: relative;
    cursor: pointer;
}

.ustt-template-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ustt-template-box {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--ustt-bg);
    border: 2px solid var(--ustt-border);
    border-radius: var(--ustt-radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ustt-template-item:hover .ustt-template-box {
    border-color: var(--ustt-text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ustt-template-item input:checked+.ustt-template-box {
    border-color: var(--ustt-primary);
    background: var(--ustt-primary-light);
    box-shadow: 0 0 0 1px var(--ustt-primary);
}

.ustt-template-item input:checked+.ustt-template-box::after {
    content: "\f147";
    /* Checkmark icon */
    font-family: dashicons;
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--ustt-primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* ============================================
   Custom Builder Icon Grid
   ============================================*/
/* Custom Icon Grid Styling */
.ustt-custom-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: var(--ustt-s3);
    margin-top: var(--ustt-s4);
}

.ustt-custom-icon-preview {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--ustt-bg);
    border: 2px solid var(--ustt-border);
    border-radius: var(--ustt-radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: var(--ustt-s2);
}

.ustt-custom-icon-item input {
    display: none;
}

.ustt-custom-icon-preview svg {
    width: 24px;
    height: 24px;
    color: var(--ustt-text-muted);
    transition: all 0.2s ease;
}

.ustt-custom-icon-item:hover .ustt-custom-icon-preview {
    border-color: var(--ustt-primary);
    background: var(--ustt-surface);
}

.ustt-custom-icon-item input:checked+.ustt-custom-icon-preview {
    background: var(--ustt-primary);
    border-color: var(--ustt-primary);
    box-shadow: 0 4px 12px rgba(19, 127, 236, 0.3);
}

.ustt-custom-icon-item input:checked+.ustt-custom-icon-preview svg {
    color: white;
}

/* ============================================
   Custom Builder Sidebar Settings
   ============================================ */
#ustt-custom-builder-settings .ustt-control-group {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

#ustt-custom-builder-settings .ustt-control-group {
    background: rgba(255, 255, 255, 0.015);
    padding: var(--ustt-s4);
    border-radius: var(--ustt-radius-m);
    border: 1px solid var(--ustt-border);
    margin-bottom: var(--ustt-s4);
}

#ustt-custom-bg-options {
    background: rgba(255, 255, 255, 0.01);
    padding: var(--ustt-s4);
    border-radius: var(--ustt-radius-m);
    border: 1px solid var(--ustt-border);
    margin-top: var(--ustt-s4);
}

#ustt-custom-bg-options,
#ustt-custom-border-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.ustt-custom-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ustt-text-muted);
    margin-bottom: var(--ustt-s4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ustt-custom-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--ustt-s2);
    padding: var(--ustt-s2) 0;
}

.ustt-custom-control-row label {
    font-size: 0.875rem;
    color: var(--ustt-text);
    font-weight: 600;
}

.ustt-custom-control-row input[type="number"] {
    width: 64px;
    /* More compact */
    padding: 6px 10px;
}

/* Border controls hidden by default */
.ustt-custom-border-controls {
    display: none;
    padding-left: 16px;
    margin-top: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.ustt-custom-border-controls.active {
    display: block;
}

/* Adjust color picker for custom builder */
.ustt-custom-section .ustt-color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ustt-custom-section .ustt-color-picker input[type="color"] {
    width: 50px;
    height: 36px;
}

/* ============================================
   RESTORED MISSING STYLES
   ============================================ */

/* Sticky Actions (Inside customize column) */
.ustt-sticky-actions {
    position: sticky;
    top: 32px;
    /* Below WP Admin Bar (32px) */
    z-index: 99;
    background: var(--ustt-surface);
    border: 1px solid var(--ustt-border);
    border-radius: var(--ustt-radius-m);
    padding: 12px 20px;
    margin-bottom: 20px;
    max-width: 720px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ustt-sticky-actions-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ustt-sticky-actions-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Lock Overlay for Pro Templates */
.ustt-lock-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--ustt-primary), var(--ustt-primary-hover));
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(19, 127, 236, 0.4);
}

.ustt-lock-overlay .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #fff;
    line-height: 1;
}

.ustt-sticky-actions-left .ustt-toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ustt-text);
}

.ustt-sticky-actions .ustt-btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ustt-sticky-actions .ustt-btn-primary .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ustt-sticky-actions .ustt-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

/* Gradient Button (Restored) */
.ustt-btn-gradient {
    background: linear-gradient(135deg, var(--ustt-primary), var(--ustt-primary-hover));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0 24px;
    border: none;
    border-radius: var(--ustt-radius-m);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(19, 127, 236, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ustt-btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(19, 127, 236, 0.4);
    filter: brightness(1.1);
}

.ustt-btn-gradient:active {
    transform: translateY(0);
}

.ustt-btn-gradient .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Cards */
.ustt-card {
    background: var(--ustt-surface);
    border: 1px solid var(--ustt-border);
    border-radius: var(--ustt-radius-m);
    padding: var(--ustt-s5);
    transition: all 0.2s ease;
}

.ustt-card:hover {
    border-color: rgba(19, 127, 236, 0.2);
}

.ustt-settings-card {
    margin-bottom: var(--ustt-s5);
}

.ustt-card.ustt-compact {
    padding: var(--ustt-s3);
    margin-bottom: var(--ustt-s3);
}

.ustt-card.ustt-compact .ustt-control-group {
    margin-bottom: var(--ustt-s2);
}

.ustt-card.ustt-compact .ustt-control-group:last-child {
    margin-bottom: 0;
}

/* Control Groups */
.ustt-control-group {
    margin-bottom: var(--ustt-s4);
}

.ustt-control-group:last-child {
    margin-bottom: 0;
}

.ustt-control-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ustt-text);
    margin-bottom: var(--ustt-s2);
}

.ustt-control-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--ustt-s3);
    margin-bottom: var(--ustt-s4);
}

/* Generic Color Picker */
.ustt-color-picker {
    display: flex;
    align-items: center;
    gap: var(--ustt-s2);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--ustt-border);
    border-radius: var(--ustt-radius-s);
    padding: var(--ustt-s1);
    transition: all 0.2s ease;
}

.ustt-color-picker:hover {
    border-color: var(--ustt-primary);
}

.ustt-color-picker input[type="color"] {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--ustt-radius-s);
    cursor: pointer;
    background: transparent;
}

.ustt-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.ustt-color-picker input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.ustt-color-value {
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    color: var(--ustt-text-muted);
    min-width: 70px;
}

/* Glass Input */
.ustt-input-glass {
    width: 100%;
    padding: var(--ustt-s2) var(--ustt-s3);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--ustt-border);
    border-radius: var(--ustt-radius-s);
    color: var(--ustt-text);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.ustt-input-glass:hover {
    border-color: var(--ustt-primary);
}

.ustt-input-glass:focus {
    outline: none;
    border-color: var(--ustt-primary);
    box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.1);
}

/* Settings Section Headers (Icon, Background, Border) */
.ustt-settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ustt-border);
}

.ustt-settings-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ustt-text);
    margin-bottom: 12px;
}

.ustt-settings-section-header .ustt-settings-section-title {
    margin-bottom: 0;
}

.ustt-settings-section-title .dashicons {
    color: var(--ustt-primary);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Hint text below inputs */
.ustt-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--ustt-text-light);
    margin-top: 4px;
    font-style: italic;
}

/* Custom Builder settings wrapper spacing */
#ustt-custom-builder-settings .ustt-card {
    margin-bottom: var(--ustt-s3);
}

#ustt-custom-builder-settings .ustt-card:last-child {
    margin-bottom: 0;
}

/* ============================================
   Progress Bar Template System
   ============================================ */

/* Template Grid */
.ustt-pb-template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 4px 0;
}

/* Template Item (label wrapper) */
.ustt-pb-template-item {
    cursor: pointer;
    position: relative;
}

.ustt-pb-template-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Preview Card */
.ustt-pb-preview-card {
    background: var(--ustt-card-bg);
    border: 2px solid var(--ustt-border);
    border-radius: var(--ustt-radius);
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ustt-pb-template-item:hover .ustt-pb-preview-card {
    border-color: rgba(19, 127, 236, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ustt-pb-template-item input:checked+.ustt-pb-preview-card {
    border-color: var(--ustt-primary);
    box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.15), 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Preview Viewport (simulated browser top) */
.ustt-pb-preview-viewport {
    position: relative;
    width: 100%;
    height: 70px;
    background: #1a1d23;
    border-bottom: 1px solid var(--ustt-border);
    overflow: hidden;
}

/* Base bar style (positioned at top of viewport) */
.ustt-pb-preview-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 65%;
    height: 4px;
}

/* Template Name */
.ustt-pb-template-name {
    display: block;
    text-align: center;
    padding: 10px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ustt-text-muted);
    letter-spacing: 0.02em;
}

.ustt-pb-template-item input:checked+.ustt-pb-preview-card .ustt-pb-template-name {
    color: var(--ustt-primary);
}

/* ============================================
   TEMPLATE 1: Neon Glow
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-1 {
    background: linear-gradient(90deg, #00d4ff, #00ffea);
    box-shadow:
        0 0 8px rgba(0, 212, 255, 0.6),
        0 0 20px rgba(0, 212, 255, 0.3),
        0 0 40px rgba(0, 255, 234, 0.15);
    animation: ustt-pb-neon-pulse 2s ease-in-out infinite;
}

@keyframes ustt-pb-neon-pulse {

    0%,
    100% {
        box-shadow:
            0 0 8px rgba(0, 212, 255, 0.6),
            0 0 20px rgba(0, 212, 255, 0.3),
            0 0 40px rgba(0, 255, 234, 0.15);
    }

    50% {
        box-shadow:
            0 0 12px rgba(0, 212, 255, 0.8),
            0 0 30px rgba(0, 212, 255, 0.5),
            0 0 60px rgba(0, 255, 234, 0.25);
    }
}

/* ============================================
   TEMPLATE 2: Gradient Wave
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-2 {
    background: linear-gradient(90deg, #ff6b9d, #ff8a56, #ffb347, #00d4ff, #7c4dff, #ff6b9d);
    background-size: 300% 100%;
    animation: ustt-pb-gradient-wave 3s linear infinite;
}

@keyframes ustt-pb-gradient-wave {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* ============================================
   TEMPLATE 3: Particle Trail
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-3 {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.4), #a855f7);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.ustt-pb-preview-bar.ustt-pb-3::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #e879f9;
    border-radius: 50%;
    box-shadow: 0 0 12px #e879f9, 0 0 24px rgba(232, 121, 249, 0.5);
    animation: ustt-pb-particle-pulse 1.5s ease-in-out infinite;
}

@keyframes ustt-pb-particle-pulse {

    0%,
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translateY(-50%) scale(1.5);
    }
}

/* ============================================
   TEMPLATE 4: Segmented
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-4 {
    background: repeating-linear-gradient(90deg,
            #00d4ff 0px,
            #00d4ff 12px,
            transparent 12px,
            transparent 16px);
    animation: ustt-pb-segment-shift 1s linear infinite;
}

@keyframes ustt-pb-segment-shift {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 16px 0;
    }
}

/* ============================================
   TEMPLATE 5: Minimalist
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-5 {
    height: 2px !important;
    background: #e2e8f0;
    opacity: 0.85;
}

/* ============================================
   TEMPLATE 6: Double Line
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-6 {
    height: 2px !important;
    background: #ff6b9d;
    box-shadow: none;
}

.ustt-pb-preview-bar.ustt-pb-6::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    width: 80%;
    height: 2px;
    background: #00d4ff;
    animation: ustt-pb-double-slide 3s ease-in-out infinite alternate;
}

@keyframes ustt-pb-double-slide {
    0% {
        width: 50%;
    }

    100% {
        width: 90%;
    }
}

/* ============================================
   TEMPLATE 7: Gradient Mesh
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-7 {
    height: 6px !important;
    background:
        radial-gradient(ellipse at 20% 50%, #ff6b9d 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, #7c4dff 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, #00d4ff 0%, transparent 60%);
    background-size: 200% 100%;
    animation: ustt-pb-mesh-flow 4s ease-in-out infinite alternate;
}

@keyframes ustt-pb-mesh-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* ============================================
   TEMPLATE 8: Glitch
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-8 {
    height: 4px !important;
    background: #00ff41;
    animation: ustt-pb-glitch 0.3s steps(2) infinite;
}

.ustt-pb-preview-bar.ustt-pb-8::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ff0055;
    animation: ustt-pb-glitch-r 0.4s steps(3) infinite;
}

.ustt-pb-preview-bar.ustt-pb-8::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00d4ff;
    animation: ustt-pb-glitch-b 0.35s steps(3) infinite;
}

@keyframes ustt-pb-glitch {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(-1px);
    }
}

@keyframes ustt-pb-glitch-r {
    0% {
        clip-path: inset(0 0 60% 0);
        transform: translateX(-3px);
    }

    50% {
        clip-path: inset(40% 0 0 0);
        transform: translateX(2px);
    }

    100% {
        clip-path: inset(0 0 60% 0);
        transform: translateX(-1px);
    }
}

@keyframes ustt-pb-glitch-b {
    0% {
        clip-path: inset(60% 0 0 0);
        transform: translateX(2px);
    }

    50% {
        clip-path: inset(0 0 40% 0);
        transform: translateX(-2px);
    }

    100% {
        clip-path: inset(60% 0 0 0);
        transform: translateX(1px);
    }
}

/* ============================================
   TEMPLATE 9: Rainbow
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-9 {
    background: linear-gradient(90deg,
            #ff0000, #ff7700, #ffff00, #00ff00,
            #0000ff, #8b00ff, #ff0000);
    background-size: 400% 100%;
    animation: ustt-pb-rainbow-flow 3s linear infinite;
}

@keyframes ustt-pb-rainbow-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 400% 50%;
    }
}

/* ============================================
   TEMPLATE 10: Neumorphic
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-10 {
    height: 8px !important;
    background: transparent;
    border-radius: 4px;
    box-shadow:
        inset 2px 2px 4px rgba(0, 0, 0, 0.3),
        inset -1px -1px 3px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.ustt-pb-preview-bar.ustt-pb-10::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 80%;
    height: calc(100% - 2px);
    border-radius: 3px;
    background: linear-gradient(90deg, #137fec, #36a3f7);
    box-shadow: 0 1px 3px rgba(19, 127, 236, 0.4);
}

/* ============================================
   TEMPLATE 11: Liquid Metal
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-11 {
    height: 5px !important;
    background: linear-gradient(90deg,
            #8e8e8e 0%,
            #d4d4d4 15%,
            #ffffff 30%,
            #b8b8b8 45%,
            #e8e8e8 60%,
            #d0d0d0 75%,
            #f0f0f0 85%,
            #a0a0a0 100%);
    background-size: 200% 100%;
    animation: ustt-pb-liquid-metal 2.5s ease-in-out infinite alternate;
    border-radius: 1px;
}

@keyframes ustt-pb-liquid-metal {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* ============================================
   TEMPLATE 12: Fire Trail
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-12 {
    height: 5px !important;
    background: linear-gradient(90deg, #ff0000, #ff6600, #ffaa00, #ffdd00);
    background-size: 200% 100%;
    animation: ustt-pb-fire-flicker 0.8s ease-in-out infinite alternate;
    box-shadow:
        0 0 6px rgba(255, 102, 0, 0.5),
        0 0 15px rgba(255, 60, 0, 0.3);
}

.ustt-pb-preview-bar.ustt-pb-12::after {
    content: '';
    position: absolute;
    right: -2px;
    top: -3px;
    width: 12px;
    height: 10px;
    background: radial-gradient(ellipse at center bottom, #ffdd00, #ff6600, transparent);
    animation: ustt-pb-fire-tip 0.5s ease-in-out infinite alternate;
    border-radius: 50% 50% 20% 20%;
    opacity: 0.8;
}

@keyframes ustt-pb-fire-flicker {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 6px rgba(255, 102, 0, 0.5), 0 0 15px rgba(255, 60, 0, 0.3);
    }

    100% {
        background-position: 100% 50%;
        box-shadow: 0 0 10px rgba(255, 102, 0, 0.7), 0 0 25px rgba(255, 60, 0, 0.4);
    }
}

@keyframes ustt-pb-fire-tip {
    0% {
        transform: scaleY(0.8) scaleX(0.9);
        opacity: 0.7;
    }

    100% {
        transform: scaleY(1.2) scaleX(1.1);
        opacity: 1;
    }
}

/* Height slider value display for PB */
#pb-height-slider {
    width: 100%;
}

/* ============================================
   TEMPLATE 13: Striped Diagonal
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-13 {
    height: 5px !important;
    background: repeating-linear-gradient(-45deg,
            #6366f1 0px,
            #6366f1 6px,
            #818cf8 6px,
            #818cf8 12px);
    background-size: 17px 17px;
    animation: ustt-pb-stripe-move 0.8s linear infinite;
}

@keyframes ustt-pb-stripe-move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 17px 0;
    }
}

/* ============================================
   TEMPLATE 14: Pulse Glow
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-14 {
    background: #e11d48;
    animation: ustt-pb-pulse-glow 1.5s ease-in-out infinite;
}

@keyframes ustt-pb-pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(225, 29, 72, 0.4);
        height: 3px;
    }

    50% {
        box-shadow: 0 0 16px rgba(225, 29, 72, 0.8), 0 0 32px rgba(225, 29, 72, 0.4);
        height: 5px;
    }
}

/* ============================================
   TEMPLATE 15: Ocean Tide
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-15 {
    height: 5px !important;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4, #22d3ee, #06b6d4, #0ea5e9);
    background-size: 300% 100%;
    animation: ustt-pb-ocean 4s ease-in-out infinite;
    border-radius: 0 2px 2px 0;
}

@keyframes ustt-pb-ocean {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   TEMPLATE 16: Sunset Fade
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-16 {
    height: 4px !important;
    background: linear-gradient(90deg, #f59e0b, #ef4444, #ec4899, #8b5cf6);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* ============================================
   TEMPLATE 17: Electric Spark
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-17 {
    height: 3px !important;
    background: #facc15;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.6);
}

.ustt-pb-preview-bar.ustt-pb-17::after {
    content: '';
    position: absolute;
    right: 0;
    top: -6px;
    width: 3px;
    height: 15px;
    background: #fff;
    box-shadow: 0 0 8px #facc15, 0 0 16px rgba(250, 204, 21, 0.8);
    animation: ustt-pb-spark 0.6s ease-in-out infinite alternate;
    border-radius: 1px;
}

@keyframes ustt-pb-spark {
    0% {
        opacity: 0.3;
        transform: scaleY(0.5);
    }

    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }

    100% {
        opacity: 0.5;
        transform: scaleY(0.8);
    }
}

/* ============================================
   TEMPLATE 18: Frosted Glass
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-18 {
    height: 6px !important;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.ustt-pb-preview-bar.ustt-pb-18::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: ustt-pb-frost-shimmer 2.5s ease-in-out infinite;
}

@keyframes ustt-pb-frost-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(300%);
    }
}

/* ============================================
   TEMPLATE 19: Matrix Code
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-19 {
    height: 5px !important;
    background: #00ff41;
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.4), 0 0 12px rgba(0, 255, 65, 0.2);
    animation: ustt-pb-matrix 0.15s steps(4) infinite;
}

@keyframes ustt-pb-matrix {
    0% {
        opacity: 0.7;
    }

    25% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }

    75% {
        opacity: 0.95;
    }

    100% {
        opacity: 0.8;
    }
}

/* ============================================
   TEMPLATE 20: Aurora
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-20 {
    height: 5px !important;
    background: linear-gradient(90deg, #22c55e, #06b6d4, #8b5cf6, #ec4899, #22c55e);
    background-size: 400% 100%;
    animation: ustt-pb-aurora 5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

@keyframes ustt-pb-aurora {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    }

    33% {
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    }

    66% {
        box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
    }

    100% {
        background-position: 400% 50%;
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    }
}

/* ============================================
   TEMPLATE 21: Candy Stripe
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-21 {
    height: 6px !important;
    background: repeating-linear-gradient(-45deg,
            #f472b6 0px,
            #f472b6 5px,
            #fce7f3 5px,
            #fce7f3 10px);
    background-size: 14px 14px;
    animation: ustt-pb-candy 1s linear infinite;
    border-radius: 3px;
}

@keyframes ustt-pb-candy {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 14px 0;
    }
}

/* ============================================
   TEMPLATE 22: Lava Flow
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-22 {
    height: 5px !important;
    background: linear-gradient(90deg, #7f1d1d, #dc2626, #f97316, #dc2626, #7f1d1d);
    background-size: 300% 100%;
    animation: ustt-pb-lava 3s ease-in-out infinite;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
}

@keyframes ustt-pb-lava {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   TEMPLATE 23: Ice Crystal
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-23 {
    height: 4px !important;
    background: linear-gradient(90deg, #e0f2fe, #bae6fd, #7dd3fc, #38bdf8, #bae6fd, #e0f2fe);
    background-size: 200% 100%;
    animation: ustt-pb-ice 3s ease-in-out infinite alternate;
}

.ustt-pb-preview-bar.ustt-pb-23::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: ustt-pb-ice-shine 2s ease-in-out infinite;
}

@keyframes ustt-pb-ice {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

@keyframes ustt-pb-ice-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

/* ============================================
   TEMPLATE 24: Holographic
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-24 {
    height: 5px !important;
    background: linear-gradient(90deg,
            #ff0080, #ff8c00, #40e0d0,
            #7b68ee, #ff0080, #ff8c00);
    background-size: 300% 100%;
    animation: ustt-pb-holo 2s linear infinite;
    box-shadow: 0 0 8px rgba(127, 104, 238, 0.3);
}

.ustt-pb-preview-bar.ustt-pb-24::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: ustt-pb-holo-shine 1.5s linear infinite;
}

@keyframes ustt-pb-holo {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

@keyframes ustt-pb-holo-shine {
    0% {
        background-position: 200% 50%;
    }

    100% {
        background-position: -100% 50%;
    }
}

/* ============================================
   TEMPLATE 25: Dark Slate
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-25 {
    height: 3px !important;
    background: linear-gradient(90deg, #334155, #475569, #64748b);
    box-shadow: 0 0 10px rgba(100, 116, 139, 0.5);
}

/* ============================================
   TEMPLATE 26: Charcoal Wave
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-26 {
    height: 5px !important;
    background: repeating-linear-gradient(90deg,
            #2c2c2e 0px,
            #3a3a3c 10px,
            #48484a 20px,
            #3a3a3c 30px,
            #2c2c2e 40px);
    background-size: 40px 100%;
    animation: ustt-pb-wave-move 2s linear infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@keyframes ustt-pb-wave-move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 40px 0;
    }
}

/* ============================================
   TEMPLATE 27: Warm Beige
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-27 {
    height: 4px !important;
    background: linear-gradient(90deg, #c9b8a3, #b8a793, #9d8b7a);
    box-shadow: 0 1px 4px rgba(157, 139, 122, 0.3);
}

/* ============================================
   TEMPLATE 28: Soft Gray
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-28 {
    height: 3px !important;
    background: linear-gradient(90deg, #adb5bd, #868e96, #6c757d);
}

/* ============================================
   TEMPLATE 29: Forest Green
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-29 {
    height: 4px !important;
    background: linear-gradient(90deg, #2d5a3d, #3d7050, #4d8663);
    box-shadow: 0 1px 3px rgba(45, 90, 61, 0.3);
}

/* ============================================
   TEMPLATE 30: Deep Burgundy
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-30 {
    height: 4px !important;
    background: linear-gradient(90deg, #5c1f2e, #7a2d3f, #983b50);
    box-shadow: 0 0 8px rgba(152, 59, 80, 0.4);
}

/* ============================================
   TEMPLATE 31: Navy Depths
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-31 {
    height: 4px !important;
    background: linear-gradient(90deg, #1a3a52, #2d5373, #406d94);
    box-shadow: 0 1px 4px rgba(64, 109, 148, 0.4);
}

/* ============================================
   TEMPLATE 32: Teal Accent
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-32 {
    height: 4px !important;
    background: linear-gradient(90deg, #0d9488, #14b8a6, #2dd4bf);
    box-shadow: 0 1px 4px rgba(20, 184, 166, 0.3);
}

/* ============================================
   TEMPLATE 33: Amber Glow
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-33 {
    height: 4px !important;
    background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24);
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.4);
}

/* ============================================
   TEMPLATE 34: Slate Gradient
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-34 {
    height: 5px !important;
    background: linear-gradient(90deg,
            #1e293b 0%,
            #334155 25%,
            #475569 50%,
            #64748b 75%,
            #94a3b8 100%);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3);
}

/* ============================================
   TEMPLATE 35: Espresso
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-35 {
    height: 4px !important;
    background: linear-gradient(90deg, #3e2723, #5d4037, #795548);
    box-shadow: 0 1px 4px rgba(121, 85, 72, 0.4);
}

/* ============================================
   TEMPLATE 36: Obsidian Pulse
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-36 {
    height: 8px !important;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
}

.ustt-pb-preview-bar.ustt-pb-36::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.1) 75%,
            transparent 100%);
    animation: ustt-pb-pulse 2s ease-in-out infinite;
}

.ustt-pb-preview-bar.ustt-pb-36::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    background: radial-gradient(ellipse at center,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.4) 40%,
            transparent 70%);
    animation: ustt-pb-obsidian-glow 1.5s ease-in-out infinite;
}

@keyframes ustt-pb-pulse {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

@keyframes ustt-pb-obsidian-glow {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ============================================
   TEMPLATE 37: Void Ripple
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-37 {
    height: 6px !important;
    background: #0f0f0f;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    overflow: visible;
}

.ustt-pb-preview-bar.ustt-pb-37::before,
.ustt-pb-preview-bar.ustt-pb-37::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ustt-pb-ripple1 2s ease-out infinite;
}

.ustt-pb-preview-bar.ustt-pb-37::after {
    animation: ustt-pb-ripple2 2s ease-out infinite;
    animation-delay: 1s;
}

@keyframes ustt-pb-ripple1 {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }

    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

@keyframes ustt-pb-ripple2 {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }

    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

/* ============================================
   TEMPLATE 38: Midnight Storm
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-38 {
    height: 8px !important;
    background: linear-gradient(90deg, #1a1a2e, #2d2d4a, #3a3a5c);
    box-shadow:
        0 0 10px rgba(138, 138, 255, 0.3),
        inset 0 1px 0 rgba(138, 138, 255, 0.2);
    overflow: hidden;
}

.ustt-pb-preview-bar.ustt-pb-38::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            transparent 48%,
            rgba(138, 138, 255, 0.8) 49%,
            rgba(200, 200, 255, 1) 50%,
            rgba(138, 138, 255, 0.8) 51%,
            transparent 52%,
            transparent 100%);
    background-size: 200% 100%;
    opacity: 0;
    animation: ustt-pb-lightning-strike 5s ease-in-out infinite;
}

@keyframes ustt-pb-lightning-strike {

    0%,
    90%,
    100% {
        opacity: 0;
        background-position: 0% 0%;
    }

    91% {
        opacity: 1;
        background-position: 50% 0%;
    }

    91.3% {
        opacity: 0;
    }

    92% {
        opacity: 1;
        background-position: 100% 0%;
    }

    92.3% {
        opacity: 0;
    }
}

/* ============================================
   TEMPLATE 39: Carbon Fiber
   ============================================ */
.ustt-pb-preview-bar.ustt-pb-39 {
    height: 10px !important;
    background:
        repeating-linear-gradient(45deg,
            #1a1a1a 0px,
            #1a1a1a 2px,
            #0f0f0f 2px,
            #0f0f0f 4px),
        repeating-linear-gradient(-45deg,
            #1a1a1a 0px,
            #1a1a1a 2px,
            #0f0f0f 2px,
            #0f0f0f 4px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.ustt-pb-preview-bar.ustt-pb-39::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.05) 30%,
            transparent 50%,
            rgba(0, 0, 0, 0.1) 100%);
    animation: ustt-pb-carbon-shine 3s ease-in-out infinite;
}

@keyframes ustt-pb-carbon-shine {

    0%,
    100% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 0% 100%;
    }
}

/* ============================================
   Layout Fixes
   ============================================ */
.ustt-designer-col.ustt-customize-col {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 140px !important;
    align-self: start;
    z-index: 10;

}

/* ==========================================================================
   READ TIME TEMPLATES & SETTINGS
   ========================================================================== */

/* Template Grid Override for Read Time (Wider items) */
.ustt-rt-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

/* Base Preview Style */
.ustt-rt-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    font-size: 14px;
    line-height: 1.4;
    color: #ccc;
    background: transparent;
    border-radius: 0;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.ustt-rt-icon {
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.ustt-rt-icon svg {
    stroke: currentColor;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ustt-rt-text {
    display: flex;
    gap: 4px;
}

/* --- Template 1: Simple Text --- */
.ustt-rt-template-1 {
    font-family: inherit;
    color: #555;
}

/* --- Template 2: Subtle Border --- */
.ustt-rt-template-2 {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #666;
}

/* --- Template 3: Dot Separator --- */
.ustt-rt-template-3 .ustt-rt-prefix::after {
    content: '•';
    margin: 0 5px;
    color: #999;
}

/* --- Template 4: Underline --- */
.ustt-rt-template-4 {
    border-bottom: 2px solid #333;
    padding-bottom: 2px;
    border-radius: 0;
}

/* --- Template 5: Light Badge --- */
.ustt-rt-template-5 {
    background: #f0f0f0;
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 500;
}

/* --- Template 6: Pipe Separator --- */
.ustt-rt-template-6 .ustt-rt-prefix {
    border-right: 1px solid #ccc;
    padding-right: 8px;
    margin-right: 8px;
}

/* --- Template 7: Mono Text --- */
.ustt-rt-template-7 {
    font-family: 'Courier New', monospace;
    letter-spacing: -0.5px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
}

/* --- Template 8: Tiny Pill --- */
.ustt-rt-template-8 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #333;
    color: #fff;
    border-radius: 12px;
    padding: 4px 10px;
}

/* --- Template 9: Left Accent --- */
.ustt-rt-template-9 {
    border-left: 3px solid #0073aa;
    padding-left: 10px;
    background: #f4f9fc;
}

/* --- Template 10: Ghost Button --- */
.ustt-rt-template-10 {
    border: 1px solid #333;
    background: transparent;
    color: #333;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
}

/* --- Template 11: Icon Only (Clock) --- */
.ustt-rt-template-11 .ustt-rt-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23555"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z"/></svg>') no-repeat center center;
}

.ustt-rt-template-11 .ustt-rt-prefix {
    display: none;
}

/* --- Template 12: Bracket Style --- */
.ustt-rt-template-12::before {
    content: '[';
    margin-right: 5px;
    color: #999;
}

.ustt-rt-template-12::after {
    content: ']';
    margin-left: 5px;
    color: #999;
}

/* --- Template 13: Condensed --- */
.ustt-rt-template-13 {
    font-family: 'Arial Narrow', sans-serif;
    letter-spacing: -0.5px;
    font-weight: 600;
    color: #222;
}

/* --- Template 14: Slash Separator --- */
.ustt-rt-template-14 .ustt-rt-prefix::after {
    content: '/';
    margin: 0 6px;
    color: #ccc;
    font-weight: 300;
}

/* --- Template 15: Soft Shadow --- */
.ustt-rt-template-15 {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    padding: 8px 16px;
}

/* --- Template 16: Inline Subtle --- */
.ustt-rt-template-16 {
    opacity: 0.7;
    font-style: italic;
    font-size: 13px;
}

/* --- Template 17: Rounded Minimal --- */
.ustt-rt-template-17 {
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 5px 15px;
    background: #fafafa;
}

/* --- Template 18: Bottom Border Gradient --- */
.ustt-rt-template-18 {
    position: relative;
    padding-bottom: 5px;
}

.ustt-rt-template-18::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #7c4dff);
}

/* --- Template 19: Square Minimal --- */
.ustt-rt-template-19 {
    background: #333;
    color: #fff;
    border-radius: 0;
    padding: 6px 12px;
}

/* --- Template 20: Text Only Clean --- */
.ustt-rt-template-20 {
    font-weight: 300;
    color: #888;
    letter-spacing: 0.5px;
}

/* --- Template 21: Glassmorphism --- */
.ustt-rt-template-21 {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* --- Template 22: Neon Glow --- */
.ustt-rt-template-22 {
    color: #00d4ff;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
    background: #000;
    border: 1px solid #00d4ff;
    border-radius: 4px;
}

/* --- Template 23: Gradient Badge --- */
.ustt-rt-template-23 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    padding: 6px 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Template 24: Neumorphism --- */
.ustt-rt-template-24 {
    background: #e0e5ec;
    box-shadow: 5px 5px 10px #babecc, -5px -5px 10px #ffffff;
    border-radius: 10px;
    color: #4d4d4d;
    padding: 8px 16px;
}

/* --- Template 25: Outlined Modern --- */
.ustt-rt-template-25 {
    border: 2px solid #333;
    border-radius: 0;
    background: transparent;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

/* --- Template 26: Retro Pixel --- */
.ustt-rt-template-26 {
    font-family: 'Courier New', monospace;
    border: 2px solid #000;
    box-shadow: 4px 4px 0 #000;
    background: #fff;
    padding: 6px 12px;
}

/* --- Template 27: Soft Pastel --- */
.ustt-rt-template-27 {
    background: #ffecd2;
    color: #8a5a44;
    border-radius: 8px;
    padding: 6px 14px;
}

/* --- Template 28: Brutalist Bold --- */
.ustt-rt-template-28 {
    background: #000;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    border: 4px solid #000;
    padding: 8px 15px;
}

/* --- Template 29: Elegant Serif --- */
.ustt-rt-template-29 {
    font-family: 'Georgia', serif;
    font-style: italic;
    border-bottom: 1px solid #d4af37;
    color: #333;
}

/* --- Template 30: Cyberpunk --- */
.ustt-rt-template-30 {
    background: #0f0f1a;
    color: #00ff9f;
    border: 1px solid #00ff9f;
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.3);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   Toast Notifications
   ============================================ */
.ustt-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1e293b;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--ustt-radius-m);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border-left: 4px solid var(--ustt-primary);
}

.ustt-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.ustt-toast.info {
    border-left-color: #3b82f6;
    background: #1e3a8a;
}

.ustt-toast.success {
    border-left-color: #10b981;
}

.ustt-toast.error {
    border-left-color: #ef4444;
}

/* ============================================
   WP Color Picker Protection
   ============================================ */
/* Ensure Iris picker uses content-box sizing inside our border-box admin */
.wp-picker-container,
.wp-picker-container *,
.iris-picker,
.iris-picker * {
    box-sizing: content-box !important;
}