/* Scope Styles to Wizard Page */
.stwt-theme-wizard {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding-right: 20px;
    margin-top: 20px;
    color: #2c3338;
}

/* 1. Steps Navigation */
.stwt-wizard-steps {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.stwt-step {
    display: flex;
    align-items: center;
    color: #94a3b8;
    font-weight: 500;
    font-size: 13px;
}
.stwt-step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    margin-right: 8px;
    color: #64748b;
    font-size: 14px;
    transition: all 0.3s ease;
}
.stwt-step.completed {
    color: #1e293b;
}
.stwt-step.completed .step-num {
    background: #dcfce7;
    color: #15803d;
}
.stwt-step.active {
    color: #15803d;
    font-weight: 600;
}
.stwt-step.active .step-num {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.stwt-step-arrow {
    color: #cbd5e1;
    margin: 0 8px;
    display: flex;
    align-items: center;
}

/* 2. Wizard Header Toolbar */
.stwt-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.stwt-wizard-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    color: #1e293b;
}
.help-badge {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    cursor: pointer;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.shortcode-copy-container {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 5px 12px;
    font-family: monospace;
    font-size: 13px;
    color: #334155;
}
.shortcode-text {
    margin-right: 8px;
    font-weight: bold;
}
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #64748b;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}
.copy-btn:hover {
    color: #1e293b;
}

/* Buttons */
.stwt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    height: 38px;
}
.btn-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #475569;
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}
.btn-primary {
    background: #22c55e;
    color: #fff;
    border-color: #16a34a;
}
.btn-primary:hover {
    background: #16a34a;
}
.stwt-btn i {
    margin: 0 4px;
}

/* 3. Settings Card Panel */
.stwt-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 25px;
}
.stwt-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 18px;
    color: #1e293b;
    display: flex;
    align-items: center;
}
.help-icon {
    color: #94a3b8;
    margin-left: 6px;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

/* Toggle Row */
.stwt-toggle-row {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}
.toggle-label {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    margin-left: 12px;
}

/* Switch styling */
.stwt-switch-container {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    flex-shrink: 0;
}
.stwt-switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}
.stwt-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}
.stwt-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.stwt-switch-container input:checked + .stwt-slider {
    background-color: #22c55e;
}
.stwt-switch-container input:checked + .stwt-slider:before {
    transform: translateX(22px);
}

/* 4. Select Theme Grid */
.stwt-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}
.theme-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #fff;
    height: 210px;
}
.theme-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.theme-card.active {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px #22c55e;
}
.theme-card-inner {
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Mockup-style card radio button indicator */
.card-radio {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: #fff;
    box-sizing: border-box;
}
.theme-card.active .card-radio {
    border-color: #22c55e;
}
.theme-card.active .card-radio .radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    display: block;
}

/* Angled mock table preview inside the cards */
.theme-card-preview {
    height: 140px;
    background: #f8fafc;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.theme-card-preview table {
    width: 190px;
    position: absolute;
    bottom: -15px;
    right: -8px;
    transform: rotate(-12deg) scale(1.02);
    transform-origin: bottom right;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    border-collapse: collapse;
    background: #fff;
    font-size: 8px !important;
    line-height: 1.2 !important;
    border-radius: 2px;
}
.theme-card-preview table th,
.theme-card-preview table td {
    padding: 5px 8px !important;
    font-size: 8px !important;
    border: 1px solid transparent;
    text-align: left;
}
.theme-name {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-top: auto;
    text-align: center;
}

/* Custom rotated preview stylesheet mapping */
.theme-preview-simple table { background: #fff; }
.theme-preview-simple table th { background: #ffffff; color: #000; font-weight: bold; border-bottom: 0.8px solid #cbd5e1; }
.theme-preview-simple table td { color: #333; border-bottom: 0.5px solid #f1f5f9; }

.theme-preview-simple-dark table { background: #121212; }
.theme-preview-simple-dark table th { background: #1e1e1e; color: #fff; border-bottom: 0.8px solid #333; }
.theme-preview-simple-dark table td { color: #ccc; border-bottom: 0.5px solid #222; }

.theme-preview-minimal table { background: #fff; }
.theme-preview-minimal table th { background: #ffffff; color: #475569; border-bottom: 0.8px solid #e2e8f0; }
.theme-preview-minimal table td { color: #64748b; }

.theme-preview-minimal-dark table { background: #212529; }
.theme-preview-minimal-dark table th { background: #2b3035; color: #f8f9fa; border-bottom: 0.8px solid #495057; }
.theme-preview-minimal-dark table td { color: #dee2e6; }

.theme-preview-minimal-elegant table { background: #fff; }
.theme-preview-minimal-elegant table th { background: #f4f0fa; color: #5e35b1; border-bottom: 0.8px solid #d1c4e9; }
.theme-preview-minimal-elegant table td { color: #512da8; }

.theme-preview-uppercase-heading table { background: #fff; }
.theme-preview-uppercase-heading table th { background: #f8fafc; color: #334155; text-transform: uppercase; font-size: 4px !important; border-bottom: 0.8px solid #e2e8f0; }
.theme-preview-uppercase-heading table td { color: #475569; }

.theme-preview-uppercase-elegant table { background: #fff; }
.theme-preview-uppercase-elegant table th { background: #fff9db; color: #f59f00; text-transform: uppercase; font-size: 4px !important; border-bottom: 0.8px solid #ffe066; }
.theme-preview-uppercase-elegant table td { color: #f39c12; }

.theme-preview-vertical-style table { background: #fff; }
.theme-preview-vertical-style table th { background: #e7f5ff; color: #1c7ed6; border-right: 1px solid #1c7ed6; border-bottom: 0.5px solid #e2e8f0; }
.theme-preview-vertical-style table td { color: #0c8599; border-right: 1px solid #e7f5ff; }

.theme-preview-dark-knight table { background: #0f121a; }
.theme-preview-dark-knight table th { background: #1a1f2c; color: #ffffff; border-bottom: 0.8px solid #1c2331; }
.theme-preview-dark-knight table td { color: #b0bec5; border-bottom: 0.5px solid #161b26; }

/* + New Theme card preview content */
.theme-card-new-theme {
    border-style: dashed !important;
    border-color: #22c55e !important;
    background: #f0fdf4 !important;
}
.theme-card-new-theme:hover {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
}
.new-theme-preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: auto 0;
}
.new-theme-icon {
    color: #22c55e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.1);
    border: 1px solid #bbf7d0;
}
.new-theme-icon i {
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.new-theme-text {
    font-size: 11px;
    font-weight: 700;
    color: #22c55e;
}

/* 5. Customize Options Grid */
.stwt-custom-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.option-column {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 16px;
}
.option-column h4 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

/* Color picker rows */
.color-picker-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}
.circle-picker-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.circle-picker-wrapper:hover {
    border-color: #22c55e;
    transform: scale(1.05);
}
.circle-color-input {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: none;
    -webkit-appearance: none;
}
.circle-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}
.circle-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}
.color-picker-label {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

/* Pagination options styling */
.pagination-options-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 25px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}
.checkbox-row {
    display: flex;
    align-items: center;
}
.stwt-checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 26px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    user-select: none;
}
.stwt-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.stwt-checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.stwt-checkbox-container:hover input ~ .stwt-checkmark {
    border-color: #22c55e;
}
.stwt-checkbox-container input:checked ~ .stwt-checkmark {
    background-color: #22c55e;
    border-color: #22c55e;
}
.stwt-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.stwt-checkbox-container input:checked ~ .stwt-checkmark:after {
    display: block;
}
.stwt-checkbox-container .stwt-checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.theme-custom-name-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
}
.theme-custom-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.edit-custom-theme-btn {
    background: none !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    font-size: 11px !important;
    color: #64748b !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    height: auto !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}
.edit-custom-theme-btn:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}
.delete-custom-theme-btn {
    background: none !important;
    border: 1px solid #fee2e2 !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    font-size: 11px !important;
    color: #ef4444 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    height: auto !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}
.delete-custom-theme-btn:hover {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border-color: #fca5a5 !important;
}

/* Modal Popup Styling */
.stwt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.stwt-modal-container {
    background: #fff;
    border-radius: 12px;
    width: 650px;
    max-width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.stwt-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}
.stwt-modal-header .back-link {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.stwt-modal-header .close-btn {
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.stwt-modal-header .close-btn:hover {
    color: #475569;
}
.stwt-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.modal-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.theme-name-input {
    padding: 10px 14px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    width: 100% !important;
    height: 40px !important;
    box-sizing: border-box !important;
}
.theme-name-input:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15) !important;
    outline: none !important;
}
.modal-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-top: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}
.stwt-modal-colors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.modal-color-card {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.modal-color-card h5 {
    margin: 0 0 4px 0;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
}
.modal-color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}
.toggle-label-modal {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}

/* 6. Live Table Preview Section */
.stwt-preview-section {
    margin-top: 40px;
}
.stwt-preview-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}
.preview-badge {
    font-size: 10px;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: bold;
}
.stwt-preview-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 30px;
    border: 1px solid #e2e8f0;
}
.table-preview-container-new {
    overflow-x: auto;
    width: 100%;
}

/* Preview Toolbar mimics DataTables wrapper UI */
.preview-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
    gap: 10px;
}
.preview-table-toolbar select.preview-entries-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center !important;
    background-size: 12px !important;
    padding: 4px 24px 4px 8px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    color: #334155 !important;
    height: 28px !important;
    cursor: pointer !important;
    outline: none !important;
    pointer-events: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 4px !important;
}

/* Interactive Preview Elements styling */
.preview-search-input {
    height: 32px !important;
    padding: 4px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    width: 200px !important;
    color: #334155 !important;
}
.preview-search-input:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2) !important;
    outline: none !important;
}

/* Preview Table base styling */
.preview-target-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    font-size: 15px !important; /* Larger text */
}
.preview-target-table th {
    padding: 14px 18px !important; /* Larger padding */
    font-weight: 600 !important;
    text-align: left !important;
    font-size: 15px !important;
}
.preview-target-table td {
    padding: 14px 18px !important; /* Larger padding */
    font-size: 15px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Pagination controls */
.preview-pagination-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
    color: #64748b;
    flex-wrap: wrap;
    gap: 15px;
}
.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
}
.paginate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px; /* Larger pagination buttons */
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
    user-select: none;
}
.paginate-btn:hover:not(.disabled):not(.active) {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}
.paginate-btn.active {
    color: #fff !important;
    border-color: #22c55e !important;
    background-color: #22c55e !important;
    font-weight: 600;
}
.paginate-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* Sorting arrows in preview */
.preview-target-table thead th.sortable-header {
    cursor: pointer;
    position: relative;
    padding-right: 28px !important;
    user-select: none;
}
.preview-target-table thead th.sortable-header::after {
    content: "↕";
    position: absolute;
    right: 10px;
    color: #cbd5e1;
    font-size: 12px;
}
.preview-target-table thead th.sortable-header.sorting-asc::after {
    content: "↑";
    color: #16a34a;
}
.preview-target-table thead th.sortable-header.sorting-desc::after {
    content: "↓";
    color: #16a34a;
}
.stwt-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-top: auto;
}

/* Tabs Navigation */
.stwt-tab-navigation {
    display: flex;
    gap: 15px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 25px;
    padding-bottom: 0px;
}
.stwt-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    outline: none;
    margin-bottom: -2px;
}
.stwt-tab-btn:hover {
    color: #1e293b;
    border-bottom-color: #cbd5e1;
}
.stwt-tab-btn.active {
    color: #16a34a;
    border-bottom-color: #22c55e;
}
.stwt-tab-btn i {
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.stwt-tab-content {
    display: none;
}
.stwt-tab-content.active {
    display: block;
}

/* Table Customization Layout */
.stwt-customization-layout {
    display: flex;
    gap: 30px;
}
.customization-sidebar {
    width: 200px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    padding-right: 20px;
    gap: 8px;
    flex-shrink: 0;
}
.sidebar-tab-btn {
    background: none;
    border: none;
    border-radius: 6px;
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}
.sidebar-tab-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}
.sidebar-tab-btn.active {
    background: #f0fdf4;
    color: #16a34a;
    font-weight: 600;
}
.badge-new {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 6px;
}
.customization-content {
    flex-grow: 1;
}
.custom-panel-row {
    display: flex;
    gap: 40px;
}
.panel-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.panel-column h4 {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 10px 0;
    font-weight: 600;
}
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 15px;
    border-radius: 8px;
}
.swap-pos-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #fff;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
    margin-top: 10px;
    transition: all 0.2s;
    outline: none;
}
.checkbox-group .swap-pos-btn {
    align-self: flex-end;
    margin-top: 0;
}
.swap-pos-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.swap-pos-btn.active {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #16a34a;
}
.panel-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 25px 0;
}
.general-checkboxes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.inline-flex-container {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.stwt-select-inline {
    padding: 4px 24px 4px 8px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 6px center !important;
    background-size: 12px !important;
    cursor: pointer !important;
    height: 28px !important;
    line-height: 1.5 !important;
    margin: 0 4px !important;
}
.sorting-settings-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.sorting-settings-box h4 {
    margin: 0;
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.sorting-fields-row {
    display: flex;
    gap: 20px;
}
.field-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.field-item label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}
.stwt-select-field {
    padding: 8px 32px 8px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center !important;
    background-size: 14px !important;
    cursor: pointer !important;
    height: 38px !important;
    width: 100% !important;
}
.checkbox-row-sorting {
    margin-top: 5px;
}
.freeze-settings-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Utility Tab Styling */
.utility-section {
    margin-bottom: 25px;
}
.utility-title-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}
.utility-title-row h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* Export buttons styling */
.export-buttons-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.export-btn-label {
    cursor: pointer;
}
.export-btn-label input {
    display: none;
}
.export-btn-label span {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 80px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.export-btn-label:hover span {
    background: #f8fafc;
    border-color: #94a3b8;
}
.export-btn-label input:checked + span {
    border-color: #22c55e;
    background-color: #f0fdf4;
    color: #15803d;
    font-weight: 600;
    box-shadow: 0 0 0 1px #22c55e;
}

/* Toggle radio cards styling */
.toggle-cards-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.toggle-card-label {
    cursor: pointer;
}
.toggle-card-label input {
    display: none;
}
.toggle-card-label .toggle-card-content {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.toggle-card-label:hover .toggle-card-content {
    background: #f8fafc;
    border-color: #94a3b8;
}
.card-radio-dot {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    background: #fff;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.toggle-card-label input:checked + .toggle-card-content {
    border-color: #22c55e;
    color: #1e293b;
    background-color: #f0fdf4;
    box-shadow: 0 0 0 1px #22c55e;
}
.toggle-card-label input:checked + .toggle-card-content .card-radio-dot {
    border-color: #22c55e;
}
.toggle-card-label input:checked + .toggle-card-content .card-radio-dot::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
}

/* CSS Tooltip design */
.stwt-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    vertical-align: middle;
}
.stwt-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    transition: all 0.2s ease;
}
.stwt-tooltip:hover .stwt-tooltip-icon {
    background: #cbd5e1;
    color: #334155;
}
.stwt-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background-color: #1e293b;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    z-index: 999999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.stwt-tooltip::before {
    content: "";
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.stwt-tooltip:hover::after,
.stwt-tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Utility checkboxes layout */
.utility-checkboxes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}
.utility-checkboxes-list .stwt-checkbox-container {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

/* Device toggle buttons */
.stwt-device-toggle-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.stwt-device-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}
.stwt-device-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.stwt-device-btn.active {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}
/* Same as desktop row */
.stwt-same-as-desktop-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    width: fit-content;
}
/* Hide info banner */
.stwt-hide-info-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    border-left: 4px solid #64748b;
}
.stwt-hide-info-banner .banner-icon {
    font-size: 16px;
}
/* Hidden items list title */
.stwt-hidden-items-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* Hidden items badges container */
.stwt-hidden-items-container {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    min-height: 54px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    box-sizing: border-box;
}
/* Badges for hidden items */
.stwt-hidden-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #334155;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #cbd5e1;
}
.stwt-hidden-badge .remove-badge-btn {
    border: none;
    background: none;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stwt-hidden-badge .remove-badge-btn:hover {
    color: #ef4444;
}
/* Enable hidden row */
.stwt-enable-hidden-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
}
/* Preview highlights */
.stwt-column-hover-highlight {
    background-color: rgba(239, 68, 68, 0.06) !important;
    cursor: pointer !important;
}
.stwt-column-hover-highlight {
    border-left: 1.5px dashed #ef4444 !important;
    border-right: 1.5px dashed #ef4444 !important;
}
.stwt-row-hover-highlight {
    background-color: rgba(239, 68, 68, 0.06) !important;
    cursor: pointer !important;
    outline: 1.5px dashed #ef4444 !important;
}
.stwt-cell-hover-highlight {
    background-color: rgba(239, 68, 68, 0.1) !important;
    cursor: pointer !important;
    outline: 1.5px dashed #ef4444 !important;
}

/* Follow-cursor tooltip */
#stwt-cursor-tooltip {
    display: none;
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    color: #f97316; /* Orange color */
    font-weight: 600;
    font-size: 13px;
    align-items: center;
    gap: 4px;
    font-family: 'Inter', sans-serif;
    line-height: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
#stwt-cursor-tooltip i,
#stwt-cursor-tooltip .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #f97316;
    margin: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes stwt-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.stwt-btn .dashicons.spin {
    animation: stwt-spin 1s linear infinite;
    display: inline-block;
}

