/* FormLayer Admin Styles */
:root {
--formlayer-primary: #5525d6;
--formlayer-primary-hover: #4338ca;
--formlayer-bg-light: #f8fbff;
--formlayer-sidebar-bg: #f8fbff;
--formlayer-text-dark: #0f172a;
--formlayer-text-muted: #64748b;
--formlayer-border: #e2e8f0;
--formlayer-white: #ffffff;
--formlayer-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* body.toplevel_page_formlayer #adminmenumain, 
body[class*="formlayer-"] #adminmenumain { ... } */
/* WP menu restored */

#wpcontent {
padding-left: unset !important;
}

.formlayer-admin-wrapper {
width: 100%;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Main Header with Tabs */
.formlayer-admin-header {
position: sticky;
top: 32px;
z-index: 999;
background: var(--formlayer-white);
padding: 0 24px;
margin-bottom: 32px;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 0 0 12px 12px;
border-bottom: 1px solid var(--formlayer-border);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.formlayer-header-left {
display: flex;
align-items: center;
}

.formlayer-header-tabs {
display: flex;
gap: 8px;
}

.formlayer-header-right {
display: flex;
align-items: center;
gap: 20px;
}

.formlayer-version-badge {
background: #f0f6fc;
color: #646970;
padding: 4px 12px;
border-radius: 6px;
font-size: 11px;
font-weight: 700;
border: 1px solid #e2e8f0;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.formlayer-tab-item {
padding: 20px 16px;
color: var(--formlayer-text-muted);
text-decoration: none;
font-weight: 600;
font-size: 14px;
border-bottom: 3px solid transparent;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 8px;
}

.formlayer-tab-item:focus {
outline: none !important;
box-shadow: none !important;
}

.formlayer-tab-item:hover {
color: var(--formlayer-primary);
}

.formlayer-tab-item.active {
color: var(--formlayer-primary);
border-bottom-color: var(--formlayer-primary);
}

.formlayer-tab-item .dashicons,
.formlayer-tab-item svg {
font-size: 18px;
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
fill: currentColor;
}

.formlayer-search-bar {
background: var(--formlayer-white);
border: 1px solid var(--formlayer-border);
border-radius: 10px;
padding: 8px 16px;
display: flex;
align-items: center;
gap: 8px;
width: 300px;
}

.formlayer-search-bar input {
border: none;
outline: none;
width: 100%;
background: transparent;
}

.formlayer-header-actions {
display: flex;
align-items: center;
gap: 20px;
}

.formlayer-user-profile {
display: flex;
align-items: center;
gap: 12px;
}

.formlayer-user-info {
text-align: right;
}

.formlayer-user-name {
font-weight: 600;
color: var(--formlayer-text-dark);
display: block;
}

.formlayer-user-role {
font-size: 11px;
color: var(--formlayer-text-muted);
}

.formlayer-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
object-fit: cover;
}

/* Page Titles */
.formlayer-page-title-wrap {
margin-bottom: 32px;
}

.formlayer-page-title {
font-size: 28px;
font-weight: 700;
color: #111827;
margin: 0 0 8px 0;
}

.formlayer-page-desc {
color: var(--formlayer-text-muted);
font-size: 15px;
}

/* Cards & Grid */
.formlayer-stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 24px;
margin-bottom: 32px;
}

.formlayer-stat-card {
background: var(--formlayer-white);
padding: 24px;
border-radius: 16px;
border: 1px solid var(--formlayer-border);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
display: flex;
align-items: center;
gap: 20px;
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.formlayer-stat-icon {
width: 48px;
height: 48px;
border-radius: 12px;
background: #eff6ff;
display: flex;
align-items: center;
justify-content: center;
color: var(--formlayer-primary);
}

.formlayer-stat-label {
display: block;
font-size: 13px;
color: var(--formlayer-text-muted);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 4px;
}

.formlayer-stat-value {
font-size: 28px;
font-weight: 800;
color: var(--formlayer-text-dark);
line-height: 1;
}

/* Integrations Grid */
.formlayer-integrations-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 32px;
}

.formlayer-integration-card {
background: var(--formlayer-white);
padding: 32px;
border-radius: 20px;
box-shadow: var(--formlayer-shadow);
transition: transform 0.2s;
}

.formlayer-card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 24px;
}

.formlayer-int-icon {
width: 54px;
height: 54px;
border-radius: 12px;
background: #f1f5f9;
padding: 10px;
}

.formlayer-int-tag {
background: #eff6ff;
color: #3b82f6;
padding: 4px 12px;
border-radius: 20px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
}

.formlayer-int-title {
font-size: 20px;
font-weight: 600;
margin: 0 0 12px 0;
}

.formlayer-int-desc {
color: var(--formlayer-text-muted);
font-size: 14px;
line-height: 1.5;
margin-bottom: 24px;
}

.formlayer-int-footer {
display: flex;
flex-direction: column;
gap: 12px;
align-items: stretch;
}

.formlayer-btn {
padding: 10px 24px;
border-radius: 8px;
font-weight: 600;
text-decoration: none;
cursor: pointer;
transition: all 0.2s;
}

.formlayer-btn-primary:hover {
background: var(--fl-primary-dark);
box-shadow: 0 6px 15px rgba(85, 37, 214, 0.3);
}

.formlayer-btn-light {
background: #eff6ff;
color: var(--formlayer-primary);
}

.formlayer-btn-link {
color: var(--formlayer-primary);
text-decoration: none;
}

.formlayer-btn-outline {
background: transparent;
color: #475569;
border: 1px solid var(--formlayer-border);
}

.formlayer-btn-outline:hover {
background: #f8fafc;
border-color: #cbd5e1;
color: var(--formlayer-text-dark);
}

.formlayer-btn-action {
background: #f8fbff;
color: var(--formlayer-primary);
border: 1px solid #dbeafe;
font-weight: 700;
}

.formlayer-btn-action:hover {
background: #eff6ff;
border-color: var(--formlayer-primary);
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.formlayer-select {
padding: 8px 16px;
border-radius: 8px;
border: 1px solid var(--formlayer-border);
background: #fff;
font-size: 13px;
color: #475569;
outline: none;
transition: all 0.2s;
cursor: pointer;
min-width: 140px;
}

.formlayer-select:focus {
border-color: var(--formlayer-primary);
box-shadow: 0 0 0 2px rgba(0, 97, 224, 0.1);
}

.formlayer-input {
padding: 10px 16px;
border-radius: 10px;
border: 1px solid var(--formlayer-border);
background: #fff;
font-size: 14px;
color: var(--formlayer-text-dark);
width: 100%;
max-width: 400px;
transition: all 0.2s;
outline: none;
}

.formlayer-input:focus {
border-color: var(--formlayer-primary);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Settings UI Custom Styles */
.formlayer-settings-card {
background: var(--formlayer-white);
border-radius: 20px;
box-shadow: var(--formlayer-shadow);
margin-bottom: 24px;
overflow: hidden;
border: 1px solid var(--formlayer-border);
}

.formlayer-settings-header {
padding: 24px 32px;
background: #fafafa;
border-bottom: 1px solid var(--formlayer-border);
}

.formlayer-settings-header h3 {
margin: 0 0 4px 0;
font-size: 18px;
font-weight: 700;
color: var(--formlayer-text-dark);
}

.formlayer-settings-header p {
margin: 0;
color: var(--formlayer-text-muted);
font-size: 13px;
}

.formlayer-settings-body {
padding: 8px 32px;
}

.formlayer-setting-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24px 0;
border-bottom: 1px solid #f1f5f9;
gap: 40px;
}

.formlayer-setting-row:last-child {
border-bottom: none;
}

.formlayer-setting-info {
flex: 1;
}

.formlayer-setting-info label {
display: block;
font-weight: 600;
font-size: 15px;
color: var(--formlayer-text-dark);
margin-bottom: 4px;
}

.formlayer-setting-info span {
font-size: 13px;
color: var(--formlayer-text-muted);
display: block;
line-height: 1.4;
}

/* Custom Switch Toggles */
.formlayer-switch {
position: relative;
display: inline-block;
width: 44px;
height: 24px;
}

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

.formlayer-switch::after {
content: "";
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #e2e8f0;
transition: .4s;
border-radius: 24px;
}

.formlayer-switch::before {
content: "";
position: absolute;
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
transition: .4s;
border-radius: 50%;
z-index: 1;
}

.formlayer-switch:has(input:checked)::after {
background-color: var(--formlayer-primary);
}

.formlayer-switch:has(input:checked)::before {
transform: translateX(20px);
}

/* Main Content Area Styling Update */
.formlayer-admin-main-content {
padding: 24px 40px 100px 40px;
min-height: calc(100vh - 80px);
}

/* Sticky Settings Footer */
.formlayer-settings-footer {
position: sticky;
bottom: 24px;
padding: 16px 32px;
margin-top: 40px;
border-radius: 20px;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 100;
}

.formlayer-footer-status {
font-size: 14px;
font-weight: 500;
display: flex;
align-items: center;
gap: 8px;
}

.formlayer-footer-status.success {
color: #22c55e;
}

.formlayer-footer-status.error {
color: #ef4444;
}

.formlayer-chart-container {
background: var(--formlayer-white);
padding: 32px;
border-radius: 20px;
box-shadow: var(--formlayer-shadow);
margin-bottom: 32px;
}

.formlayer-chart-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}

.formlayer-bar-chart {
display: flex;
align-items: flex-end;
gap: 12px;
height: 200px;
padding-top: 20px;
}

.formlayer-bar {
background: #e2e8f0;
flex: 1;
border-radius: 4px 4px 0 0;
min-height: 10px;
}

.formlayer-bar.active {
background: var(--formlayer-primary);
}

/* Tables */
.formlayer-table-card {
background: var(--formlayer-white);
border-radius: 20px;
box-shadow: var(--formlayer-shadow);
overflow: hidden;
}

.formlayer-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
border: 1px solid #e2e8f0;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.formlayer-table th {
background: #fcfdfe;
text-align: left;
padding: 16px 24px;
font-size: 11px;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 700;
color: var(--formlayer-text-muted);
border-bottom: 1px solid #e2e8f0;
}

.formlayer-table td {
padding: 20px 24px;
border-bottom: 1px solid #e2e8f0;
color: var(--formlayer-text-dark);
font-size: 14px;
}

.formlayer-table tr:hover td {
background: #f8fbff;
}

.formlayer-table th:first-child,
.formlayer-table td:first-child {
padding-left: 24px;
}

.formlayer-table th:last-child,
.formlayer-table td:last-child {
padding-right: 24px;
}

.formlayer-status-tag {
padding: 4px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: 500;
}

.formlayer-status-verified {
background: #dcfce7;
color: #166534;
}

.formlayer-status-pending {
background: #fef3c7;
color: #92400e;
}

.formlayer-status-draft {
background: #f1f5f9;
color: #475569;
}

/* Notification Pulse */
.formlayer-notification-btn {
position: relative;
padding: 8px;
border-radius: 8px;
transition: background 0.2s;
}

.formlayer-notification-btn:hover {
background: #f8fafc;
}

.formlayer-notification-btn::after {
content: '';
position: absolute;
top: 8px;
right: 8px;
width: 8px;
height: 8px;
background: #ef4444;
border: 2px solid white;
border-radius: 50%;
}

.formlayer-placeholder-page {
background: #fff;
padding: 60px;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* SPA Tab Content Visibility */
.formlayer-tab-content {
display: none;
}

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

/* Modal Styles */
.formlayer-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(15, 23, 42, 0.6);
backdrop-filter: blur(8px);
z-index: 999999;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.formlayer-modal-overlay.active {
opacity: 1;
pointer-events: auto;
}

.formlayer-modal-panel,
.formlayer-modal-content {
background: #fff;
width: 100%;
max-width: 500px;
border-radius: 20px;
padding: 24px;
box-sizing: border-box;
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
transform: translateY(20px) scale(0.95);
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
}

.formlayer-modal-overlay.active .formlayer-modal-panel,
.formlayer-modal-overlay.active .formlayer-modal-content {
transform: translateY(0) scale(1);
}

.formlayer-modal-panel {
max-width: 1000px;
height: 700px;
padding: 0;
}

/* Entry Detail Modal Overrides */
.formlayer-entry-modal .formlayer-modal-content {
max-width: 1000px !important;
height: 80vh;
padding: 0 !important;
}

.formlayer-modal-content h2 {
font-size: 24px;
margin-bottom: 10px;
color: #0f172a;
}

.formlayer-modal-content p {
color: #64748b;
margin-bottom: 30px;
}

.formlayer-modal-options {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-bottom: 35px;
}

.formlayer-option {
border: 2px solid #f1f5f9;
border-radius: 16px;
padding: 24px 15px;
text-align: center;
cursor: pointer;
transition: all 0.3s;
}

.formlayer-option:hover {
border-color: #cbd5e1;
background: #f8fafc;
}

.formlayer-option.active {
border-color: #0061e0;
background: #eff6ff;
}

.formlayer-option .icon {
font-size: 32px;
margin-bottom: 15px;
display: block;
}

.formlayer-option h3 {
font-size: 16px;
margin: 0 0 8px 0;
color: #1e293b;
}

.formlayer-option span {
font-size: 12px;
color: #64748b;
line-height: 1.4;
display: block;
}

.formlayer-content-list {
background: #f8fafc;
border-radius: 12px;
padding: 20px;
margin-bottom: 30px;
max-height: 250px;
overflow-y: auto;
}

.formlayer-list-item {
padding: 12px 15px;
border-bottom: 1px solid #e2e8f0;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: all 0.2s;
}

.formlayer-list-item:hover {
background: #fff;
color: #0061e0;
}

.formlayer-list-item:last-child {
border: none;
}

.formlayer-modal-footer {
display: flex;
justify-content: flex-end;
gap: 12px;
padding-top: 20px;
border-top: 1px solid #f1f5f9;
}

.btn-cancel {
background: #fff;
color: #475569;
border: 1px solid #e2e8f0;
padding: 10px 20px;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
}

.btn-confirm {
background: #0061e0;
color: #fff;
border: none;
padding: 10px 25px;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
transition: background 0.3s;
}

.formlayer-loading {
padding: 40px;
text-align: center;
color: #94a3b8;
}

/* Fullscreen Builder Mode */
.formlayer-admin-wrapper.formlayer-builder-fullscreen #adminmenumain,
.formlayer-admin-wrapper.formlayer-builder-fullscreen #wpadminbar,
.formlayer-admin-wrapper.formlayer-builder-fullscreen .formlayer-admin-header {
display: none !important;
}

.formlayer-admin-wrapper.formlayer-builder-fullscreen #wpcontent {
margin-left: 0 !important;
padding: 0 !important;
}

.formlayer-admin-wrapper.formlayer-builder-fullscreen .formlayer-admin-main-content {
padding: 0 !important;
margin: 0 !important;
}

.formlayer-admin-wrapper.formlayer-builder-fullscreen #formlayer-formbuilder-app {
height: 100vh !important;
}

/* FormLayer Form Builder - Premium Workspace Styles */
:root {
--fl-primary: #5525d6;
--fl-primary-dark: #441eb1;
--fl-purple-light: #f0f6fc;
--fl-bg: #f0f0f1;
--fl-bg-gray: #f6f7f7;
--fl-border: #dcdcde;
--fl-text: #1d2327;
--fl-text-light: #646970;
--fl-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#formlayer-formbuilder-app {
margin: 0;
padding: 0;
max-width: none;
background: #f0f0f1;
min-height: calc(100vh - 120px);
display: flex;
flex-direction: column;
}

.formlayer-builder-wrapper {
display: flex;
flex-direction: column;
flex: 1;
background: #f0f0f1;
}

.formlayer-builder-card {
background: #fff;
border: 1px solid #dcdcde;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
}

/* Header Info (formlayer Style) */
.formlayer-builder-header-info {
padding: 30px 40px 10px 40px;
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
background: #fff;
}

.formlayer-builder-header-info .info-left h2 {
font-size: 22px;
margin: 0 0 6px 0;
color: #1d2327;
font-weight: 700;
}

.formlayer-builder-header-info .info-left p {
font-size: 14px;
color: #646970;
margin: 0;
}

.formlayer-builder-header-info .info-right {
display: flex;
align-items: center;
gap: 12px;
flex-shrink: 0;
}

.formlayer-shortcode-box {
display: flex;
align-items: center;
gap: 12px;
background: #f8fafc;
border: 1px solid #e2e8f0;
padding: 5px 10px;
border-radius: 12px;
}

.formlayer-shortcode-box input {
border: none !important;
background: transparent !important;
font-family: inherit;
font-size: 13px;
color: #50575e;
flex: 1;
padding: 8px 15px !important;
box-shadow: none !important;
}

.formlayer-copy-shortcode {
background: #f6f7f7;
border: 1px solid #dcdcde;
border-radius: 4px;
padding: 7px 16px;
font-size: 12px;
font-weight: 600;
color: #2c3338;
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
transition: all 0.2s;
white-space: nowrap;
margin-right: 2px;
}

.formlayer-copy-shortcode:hover {
background: #fff;
border-color: #c3c4c7;
}

/* Action Bar */
.formlayer-builder-action-bar {
padding: 10px 40px 20px 40px;
display: flex;
justify-content: flex-end;
flex-shrink: 0;
background: #fff;
}

.formlayer-builder-action-bar .action-right {
display: flex;
gap: 12px;
}

.formlayer-btn-all-forms {
background: var(--fl-primary);
color: #fff !important;
text-decoration: none !important;
padding: 8px 16px;
border-radius: 4px;
font-size: 13px;
font-weight: 600;
transition: all 0.2s;
border: none;
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.formlayer-btn-all-forms:hover {
background: var(--fl-primary-dark);
box-shadow: 0 6px 15px rgba(85, 37, 214, 0.3);
}

/* Main Layout */
.formlayer-builder-main {
display: flex;
gap: 24px;
padding: 30px 40px 40px 40px;
flex: 1;
overflow: hidden;
background: #fbfbfc;
/* Light gray to make white boxes stand out */
border-top: 1px solid #f0f0f1;
}

.formlayer-preview-column {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}

.formlayer-preview-container {
background: #fff;
border: 1px solid #dcdcde;
border-radius: 8px;
display: flex;
flex-direction: column;
flex: 1;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.formlayer-preview-header {
padding: 12px 20px;
display: flex;
justify-content: flex-end;
align-items: center;
border-bottom: 1px solid #f0f0f1;
background: #fbfbfc;
border-radius: 8px 8px 0 0;
}

.formlayer-device-toggles {
display: flex;
background: #fff;
border: 1px solid var(--fl-border);
border-radius: 4px;
overflow: hidden;
}

.formlayer-device-btn {
background: none;
border: none;
padding: 6px 12px;
cursor: pointer;
color: var(--fl-text-light);
border-right: 1px solid var(--fl-border);
transition: all 0.2s;
}

.formlayer-device-btn:last-child {
border-right: none;
}

.formlayer-device-btn:hover,
.formlayer-device-btn.active {
background: var(--fl-bg-gray);
color: var(--fl-primary);
}

.formlayer-btn-save {
background: var(--fl-primary);
color: #fff !important;
text-decoration: none !important;
padding: 8px 16px;
border-radius: 4px;
font-size: 13px;
font-weight: 600;
transition: all 0.2s;
border: none;
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.formlayer-btn-save:hover {
background: var(--fl-primary-dark);
box-shadow: 0 6px 15px rgba(85, 37, 214, 0.3);
}

.formlayer-fullscreen-toggle {
background: none;
border: none;
cursor: pointer;
color: var(--fl-text-light);
padding: 8px;
border-radius: 4px;
}

.formlayer-fullscreen-toggle:hover {
color: var(--fl-primary);
background: var(--fl-bg-gray);
}

.formlayer-btn-save .dashicons-update.spin {
animation: fl-spin 1s infinite linear;
}

@keyframes fl-spin {
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);
}
}

/* Rest of the styles... */

/* Content Layout */
.formlayer-builder-content {
display: flex;
flex: 1;
background: var(--fl-bg);
overflow: hidden;
}

/* Canvas */
.formlayer-builder-canvas {
flex: 1;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
}

.formlayer-canvas-inner {
width: 100%;
max-width: 900px;
background: #fff;
border-radius: 8px;
box-shadow: var(--fl-shadow);
display: flex;
flex-direction: column;
min-height: 600px;
border: 1px solid var(--fl-border);
transition: all 0.3s ease;
}

.formlayer-canvas-inner.desktop {
max-width: 900px;
}

.formlayer-canvas-inner.tablet {
max-width: 768px;
}

.formlayer-canvas-inner.mobile {
max-width: 375px;
}

/* Builder Mock Responsive Styles - Trigger wrapping even if browser window is large */
.formlayer-canvas-inner.tablet .formlayer-container,
.formlayer-canvas-inner.mobile .formlayer-container {
grid-template-columns: 1fr !important;
}

.formlayer-canvas-inner.mobile .formlayer-grid,
.formlayer-canvas-inner.mobile .formlayer-address-grid,
.formlayer-canvas-inner.mobile .formlayer-grid-2 {
grid-template-columns: 1fr !important;
}

.formlayer-dropzone {
flex: 1;
padding: 40px;
}

.formlayer-empty-dropzone {
height: 300px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: 2px dashed #e2e8f0;
border-radius: 12px;
color: var(--fl-text-light);
text-align: center;
padding: 20px;
}

.formlayer-empty-icon {
width: 64px;
height: 64px;
border-radius: 50%;
background: #f1f5f9;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
}

.formlayer-empty-icon span {
color: var(--fl-primary);
}

.formlayer-canvas-footer {
padding: 24px 40px;
border-top: 1px solid var(--fl-border);
}

.formlayer-submit-btn {
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 0 24px;
height: 46px;
background: var(--fl-primary);
color: #fff;
border: none;
border-radius: 10px;
font-weight: 700;
font-size: 15px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(85, 37, 214, 0.2);
box-sizing: border-box;
text-decoration: none;
line-height: 1;
}

.formlayer-submit-btn:hover {
background: var(--fl-primary-dark);
box-shadow: 0 6px 15px rgba(85, 37, 214, 0.3);
}

/* Field Instance */
.formlayer-field-instance {
padding: 10px 20px;
border: 1px solid transparent;
border-radius: 8px;
margin-bottom: 4px;
position: relative;
cursor: move;
transition: all 0.2s;
}

.formlayer-field-instance:hover {
background: #f8fafc;
border-color: #e2e8f0;
}

.formlayer-field-instance.active {
border-color: var(--fl-primary);
background: #fdfaff;
box-shadow: 0 4px 15px rgba(85, 37, 214, 0.12);
transform: scale(1.002);
z-index: 10;
}

.formlayer-control-label {
display: block;
font-size: 11px;
font-weight: 700;
color: #475569;
margin-bottom: 6px;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.formlayer-field-label label {
display: block;
font-weight: 600;
font-size: 14px;
color: var(--fl-text);
margin-bottom: 8px;
}

.formlayer-field-label .required {
color: #ef4444;
}

/* Label Placement & Styling */
.formlayer-field-instance.label-left,
.formlayer-field-instance.label-right {
display: flex;
flex-wrap: nowrap;
align-items: center;
gap: 20px;
}

.formlayer-field-instance.label-left .formlayer-field-label,
.formlayer-field-instance.label-right .formlayer-field-label {
width: 30%;
min-width: 100px;
margin-bottom: 0;
}

.formlayer-field-instance.label-left .formlayer-field-input,
.formlayer-field-instance.label-right .formlayer-field-input {
flex: 1;
}

.formlayer-field-instance.label-right .formlayer-field-label {
order: 2;
}

.formlayer-field-instance.label-right .formlayer-field-input {
order: 1;
}

.formlayer-field-help {
width: 100%;
font-size: 12px;
color: #94a3b8;
margin-top: 8px;
font-style: italic;
}

.formlayer-field-input {
width: 100% !important;
}

.formlayer-field-instance.label-left .formlayer-field-help,
.formlayer-field-instance.label-right .formlayer-field-help {
flex-basis: 100%;
margin-left: calc(30% + 20px);
}

.formlayer-field-input input:not([type="checkbox"]):not([type="radio"]),
.formlayer-field-input textarea,
.formlayer-field-input select {
width: 100% !important;
max-width: none !important;
padding: 12px 16px;
border: 1.5px solid var(--fl-border);
border-radius: 10px;
background: #fff;
font-size: 15px;
color: var(--fl-text);
pointer-events: none;
transition: var(--fl-transition);
height: 48px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.formlayer-field-input textarea {
height: auto;
min-height: 120px;
}

.formlayer-field-input input[type="checkbox"],
.formlayer-field-input input[type="radio"] {
width: 20px !important;
height: 20px !important;
margin: 0 !important;
cursor: move !important;
pointer-events: none !important;
display: inline-block !important;
border: 1.5px solid var(--fl-border) !important;
border-radius: 4px !important;
background: #fff !important;
accent-color: #5525d6 !important;
}

.formlayer-field-input input[type="radio"] {
border-radius: 50% !important;
}

.formlayer-field-actions {
position: absolute;
right: 12px;
top: -14px;
display: flex;
gap: 0;
opacity: 0;
pointer-events: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 6px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
overflow: hidden;
z-index: 50;
transform: translateY(5px);
}

.formlayer-field-instance:hover .formlayer-field-actions,
.formlayer-field-instance.active .formlayer-field-actions {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}

.formlayer-field-actions button {
background: none;
border: none;
padding: 8px 10px;
cursor: pointer;
color: #64748b;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
border-right: 1px solid #f1f5f9;
}

.formlayer-field-actions button:last-child {
border-right: none;
}

.formlayer-field-actions button:hover:not(:disabled) {
background: #f8fafc;
color: var(--fl-primary);
}

.formlayer-field-actions button:hover:disabled {
cursor: not-allowed;
}

.formlayer-field-actions button:disabled {
opacity: 0.3;
}

.formlayer-field-actions .formlayer-field-delete:hover {
background: #fef2f2;
color: #ef4444;
}

.formlayer-field-actions .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
}

/* Sidebar Column */
.formlayer-sidebar-column {
width: 360px;
background: #fff;
border: 1px solid #dcdcde;
border-radius: 8px;
display: flex;
flex-direction: column;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
overflow: hidden;
}

.formlayer-sidebar-tabs {
display: flex;
border-bottom: 2px solid #f0f0f1;
background: #fff;
}

.formlayer-sidebar-tab {
flex: 1;
padding: 16px 8px;
font-size: 13px;
font-weight: 600;
text-align: center;
background: none;
border: none;
border-bottom: 3px solid transparent;
cursor: pointer;
color: var(--fl-text-light);
transition: all 0.2s;
}

.formlayer-sidebar-tab.active {
color: var(--fl-primary);
border-bottom-color: var(--fl-primary);
background: #fff;
}

.formlayer-sidebar-pane {
display: none;
padding: 24px;
overflow-y: auto;
flex: 1;
}

.formlayer-sidebar-pane.active {
display: block;
}

/* Category Grid Item Style */
.formlayer-category {
margin-bottom: 20px;
}

.formlayer-category-header {
background: #fff;
border: 1px solid var(--fl-border);
border-radius: 8px;
padding: 12px 16px;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
transition: background 0.2s;
font-weight: 600;
font-size: 14px;
color: var(--fl-text);
}

.formlayer-category-header:hover {
background: var(--fl-bg-gray);
}

.formlayer-category-header .dashicons-admin-generic {
color: var(--fl-text-light);
margin-right: 12px;
}

.formlayer-category-content {
display: none;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
padding: 12px 2px;
}

.formlayer-category.open .formlayer-category-content {
display: grid;
}

.formlayer-palette-field {
padding: 10px 4px;
border: 1px solid #e2e8f0;
border-radius: 6px;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
cursor: grab;
transition: all 0.2s;
text-align: center;
background: #fff;
min-height: 70px;
justify-content: center;
}

.formlayer-palette-field span:not(.dashicons) {
font-size: 11px;
font-weight: 500;
line-height: 1.2;
}

.formlayer-palette-field .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
}

.formlayer-palette-field:hover {
background: #f8fafc;
border-color: var(--fl-primary);
color: var(--fl-primary);
box-shadow: 0 4px 12px rgba(85, 37, 214, 0.1);
}

.formlayer-palette-field .dashicons {
font-size: 20px;
width: 20px;
height: 20px;
color: #5525d6;
}

.formlayer-palette-field span:last-child {
font-size: 11px;
font-weight: 600;
color: #2c3338;
}

.formlayer-canvas-wrapper {
flex: 1;
overflow-y: auto;
overflow-x: auto;
background: #f0f0f1;
padding: 40px;
display: flex;
justify-content: center;
min-height: 600px;
}

/* Sidebar Column Improvements */
.formlayer-sidebar-tabs {
display: flex;
border-bottom: 2px solid var(--fl-border);
background: #fff;
}

.formlayer-sidebar-tab {
flex: 1;
padding: 16px 8px;
font-size: 13px;
font-weight: 700;
text-align: center;
background: none;
border: none;
border-bottom: 2px solid transparent;
cursor: pointer;
color: var(--fl-text-light);
letter-spacing: 0.3px;
transition: all 0.2s;
}

.formlayer-sidebar-tab.active {
color: var(--fl-primary);
border-bottom-color: var(--fl-primary);
background: #fff;
}

/* Advanced Accordion UI */
.formlayer-accordion {
border: 1px solid #e2e8f0;
border-radius: 8px;
background: #fff;
margin-bottom: 12px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.formlayer-accordion-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 14px 18px;
background: #fff;
cursor: pointer;
user-select: none;
transition: background 0.2s;
}

.formlayer-accordion.open {
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.formlayer-accordion-header:hover {
background: #f8fafc;
}

.formlayer-accordion-header h4 {
margin: 0;
font-size: 13.5px;
font-weight: 700;
color: #1e293b;
}

.formlayer-accordion-header .dashicons {
font-size: 16px;
color: #94a3b8;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.formlayer-accordion.open .formlayer-accordion-header .dashicons {
transform: rotate(180deg);
}

.formlayer-accordion-content {
display: none;
padding: 15px 18px;
border-top: 1px solid #f1f5f9;
}

.formlayer-accordion.open .formlayer-accordion-content {
display: block;
}

/* Info Icon */
.formlayer-info-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 14px;
height: 14px;
background: #94a3b8;
color: #fff;
border-radius: 50%;
font-size: 9px;
font-weight: 700;
margin-left: 6px;
cursor: help;
vertical-align: middle;
}

/* Segmented Control / Button Group */
.formlayer-segmented-control {
display: flex;
background: #f1f5f9;
padding: 2px;
border-radius: 6px;
gap: 0;
border: 1px solid #e2e8f0;
}

.segmented-btn {
flex: 1;
border: none;
background: none;
padding: 7px 4px;
font-size: 11px;
font-weight: 600;
color: #64748b;
cursor: pointer;
border-radius: 4px;
transition: all 0.2s;
text-align: center;
border-right: 1px solid transparent;
}

.segmented-btn:not(:last-child) {
border-right: 1px solid #e2e8f0;
}

.segmented-btn:hover {
color: #1e293b;
}

.segmented-btn.active {
background: var(--fl-primary);
color: #fff;
border-right-color: var(--fl-primary);
}

/* Custom Checkbox/Radio List */
.formlayer-prop-list {
display: flex;
flex-direction: column;
gap: 12px;
margin-top: 15px;
}

.formlayer-prop-item {
display: flex;
align-items: center;
justify-content: space-between;
}

.formlayer-prop-item label {
font-size: 13px;
color: #475569;
}

.formlayer-input-full, select.formlayer-input-full {
background: #fff !important;
border: 1.5px solid var(--fl-border) !important;
border-radius: 10px !important;
padding: 8px 12px !important;
min-height: 40px !important;
font-size: 13.5px !important;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
width: 100% !important;
box-sizing: border-box !important;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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");
background-repeat: no-repeat;
background-position: right 16px center;
background-size: 14px;
}

.formlayer-input-full:focus {
border-color: var(--fl-primary) !important;
box-shadow: 0 0 0 4px rgba(85, 37, 214, 0.1) !important;
outline: none !important;
}

/* Form Controls (FormLayer Style) */
.formlayer-control-group {
margin-bottom: 15px;
}

/* Field Search UI */
.formlayer-search-wrapper {
position: relative;
margin-bottom: 20px;
}

.formlayer-fields-search {
width: 100% !important;
padding: 10px 12px 10px 36px !important;
border: 1px solid #dcdcde !important;
border-radius: 4px !important;
font-size: 13px !important;
}

.formlayer-search-wrapper .dashicons-search {
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
color: #a7aaad;
font-size: 18px;
}

/* Toggle Switch (formLayer Style) */
.formlayer-switch {
position: relative;
display: inline-block;
width: 46px;
height: 24px;
}

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

.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}

.slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}

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

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

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

.slider.round {
border-radius: 24px;
}

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

/* Templates Discovery Screen */
.formlayer-templates-wrapper {
display: flex;
flex: 1;
background: #fff;
border-radius: 12px;
border: 1px solid #dcdcde;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
height: 750px;
}

.formlayer-templates-sidebar {
width: 260px;
background: #fbfbfc;
border-right: 1px solid #dcdcde;
padding: 30px 20px;
overflow-y: auto;
}

.formlayer-templates-sidebar h3 {
font-size: 14px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #646970;
margin: 0 0 20px 0;
}

.formlayer-template-cats {
list-style: none;
margin: 0;
padding: 0;
}

.formlayer-template-cats li {
padding: 12px 15px;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
color: #1d2327;
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 4px;
transition: all 0.2s;
}

.formlayer-template-cats li:hover {
background: #f0f0f1;
}

.formlayer-template-cats li.active {
background: var(--fl-primary);
color: #fff;
}

.formlayer-templates-main {
flex: 1;
padding: 0;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--fl-primary) #f1f5f9;
}

.formlayer-templates-main::-webkit-scrollbar {
width: 6px;
}

.formlayer-templates-main::-webkit-scrollbar-track {
background: #f1f5f9;
}

.formlayer-templates-main::-webkit-scrollbar-thumb {
background-color: var(--fl-primary);
border-radius: 20px;
}

.formlayer-templates-header {
position: sticky;
top: 0;
background: #fff;
z-index: 100;
padding: 7px;
border-bottom: 1px solid var(--fl-border);
margin-bottom: 30px;
}

.formlayer-templates-header h1,
.formlayer-templates-header h2 {
font-size: 28px;
margin: 0 0 10px 0;
color: #1d2327;
}

.formlayer-templates-header p {
font-size: 16px;
color: #646970;
margin: 0;
}

.formlayer-templates-grid {
padding: 0 40px 40px 40px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
}

.formlayer-template-card {
flex-direction: column;
align-items: center;
}

.template-info h4 {
font-size: 18px;
margin: 0 0 10px 0;
color: #1d2327;
}

.template-info p {
font-size: 14px;
color: #646970;
line-height: 1.5;
margin-bottom: 20px;
}

.formlayer-btn-use-template {
background: #fff;
border: 1px solid var(--fl-primary);
color: var(--fl-primary);
padding: 10px 24px;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}

.slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}

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

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

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

.slider.round {
border-radius: 24px;
}

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

/* Templates Discovery Screen */
.formlayer-templates-wrapper {
display: flex;
flex: 1;
background: #fff;
border-radius: 12px;
border: 1px solid #dcdcde;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
height: 750px;
padding: 40px;
}

.formlayer-templates-sidebar {
width: 260px;
background: #fbfbfc;
border-right: 1px solid #dcdcde;
padding: 30px 20px;
overflow-y: auto;
}

.formlayer-templates-sidebar h3 {
font-size: 14px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #646970;
margin: 0 0 20px 0;
}

.formlayer-template-cats {
list-style: none;
margin: 0;
padding: 0;
}

.formlayer-template-cats li {
padding: 12px 16px;
border-radius: 10px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
color: #64748b;
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 6px;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.formlayer-template-cats li:hover {
background: #f1f5f9;
color: var(--fl-primary);
}

.formlayer-template-cats li.active {
background: var(--fl-primary-light);
color: var(--fl-primary);
}

.cat-count {
margin-left: auto;
font-size: 11px;
background: #e2e8f0;
color: #64748b;
padding: 2px 8px;
border-radius: 20px;
font-weight: 700;
}

.formlayer-template-cats li.active .cat-count {
background: var(--fl-primary);
color: #fff;
}

/* Consolidated with block above */

.formlayer-template-card {
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 24px;
text-align: center;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.formlayer-template-card:hover {
border-color: var(--fl-primary);
box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.template-header-badge {
position: absolute;
top: 12px;
right: 12px;
background: #f1f5f9;
color: #64748b;
font-size: 10px;
font-weight: 700;
padding: 2px 8px;
border-radius: 4px;
text-transform: uppercase;
}

.template-icon {
width: 56px;
height: 56px;
background: #f8fafc;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
transition: background 0.2s;
}

.formlayer-template-card:hover .template-icon {
background: var(--fl-primary-light);
}

.template-icon .dashicons {
font-size: 28px;
width: 28px;
height: 28px;
color: var(--fl-primary);
}

.template-info h4 {
font-size: 16px;
margin: 0 0 8px 0;
color: #1e293b;
font-weight: 700;
}

.template-info p {
font-size: 13px;
color: #64748b;
line-height: 1.6;
margin-bottom: 20px;
min-height: 42px;
}

.template-footer {
width: 100%;
display: flex;
flex-direction: column;
gap: 12px;
}

.formlayer-btn-use-template {
background: var(--fl-primary);
border: 1px solid var(--fl-primary);
color: #fff;
padding: 10px 24px;
border-radius: 8px;
font-weight: 600;
font-size: 14px;
cursor: pointer;
transition: all 0.2s;
width: 100%;
}

.formlayer-btn-use-template:hover {
background: var(--fl-primary-dark);
box-shadow: 0 6px 15px rgba(85, 37, 214, 0.3);
}

/* Unified with global modal styles at line 672 */

@keyframes fl-modal-slide {
from {
transform: translateY(20px);
opacity: 0;
}

to {
transform: translateY(0);
opacity: 1;
}
}

.formlayer-modal-header {
padding: 20px 32px;
border-bottom: 1px solid #f1f5f9;
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
}

.formlayer-modal-header h2 {
margin: 0;
font-size: 20px;
font-weight: 700;
color: #1e293b;
}

.formlayer-modal-header .header-left {
display: flex;
align-items: center;
gap: 12px;
}

.formlayer-modal-header .header-left .dashicons {
color: var(--fl-primary);
font-size: 24px;
width: 24px;
height: 24px;
}

.formlayer-modal-header .header-right {
display: flex;
align-items: center;
gap: 16px;
}

.formlayer-modal-close {
background: none;
border: none;
font-size: 32px;
color: #94a3b8;
cursor: pointer;
line-height: 1;
padding: 0;
transition: color 0.2s;
}

.formlayer-modal-close:hover {
color: #ef4444;
}

.formlayer-modal-body {
flex: 1;
display: flex;
overflow: hidden;
}

.formlayer-modal-sidebar {
width: 260px;
background: #f8fafc;
border-right: 1px solid #f1f5f9;
padding: 24px 0;
}

.formlayer-modal-sidebar ul {
margin: 0;
padding: 0;
list-style: none;
}

.formlayer-modal-sidebar li {
padding: 12px 24px;
display: flex;
align-items: center;
gap: 12px;
color: #64748b;
cursor: pointer;
font-weight: 500;
transition: all 0.2s;
}

.formlayer-modal-sidebar li .dashicons {
font-size: 20px;
width: 20px;
height: 20px;
}

.formlayer-modal-sidebar li:hover {
color: var(--fl-primary);
background: rgba(37, 99, 235, 0.05);
}

.formlayer-modal-sidebar li.active {
color: var(--fl-primary);
background: #fff;
border-right: 3px solid var(--fl-primary);
}

.formlayer-modal-main {
flex: 1;
padding: 40px;
overflow-y: auto;
}


.formlayer-settings-section {
max-width: 600px;
}

.formlayer-settings-section h3 {
margin: 0 0 8px 0;
font-weight: 700;
color: #1e293b;
}

.formlayer-settings-section .section-header {
margin-bottom: 32px;
}

.formlayer-settings-section .section-header p {
color: #64748b;
margin: 0;
font-size: 15px;
}

.formlayer-settings-field {
margin-bottom: 24px;
}

/* Options Editor Styles */
.formlayer-option-edit-row {
transition: all 0.2s;
}

.formlayer-option-edit-row:hover {
background: #f8fafc;
}

.formlayer-option-edit-row input[type="radio"],
.formlayer-option-edit-row input[type="checkbox"] {
width: 16px !important;
height: 16px !important;
margin: 0 !important;
cursor: pointer !important;
box-shadow: none !important;
}

.formlayer-option-edit-row input[type="text"] {
width: 100% !important;
max-width: none !important;
min-height: 32px !important;
height: 32px !important;
padding: 5px 8px !important;
margin: 0 !important;
font-size: 13px !important;
border: 1px solid #ddd !important;
border-radius: 4px !important;
background: #fff !important;
box-shadow: none !important;
}

.formlayer-option-edit-row input[type="text"]:focus {
border-color: var(--formlayer-primary) !important;
box-shadow: 0 0 0 2px rgba(85, 37, 214, 0.1) !important;
outline: none !important;
}

.formlayer-btn-remove-option:hover {
color: #dc2626 !important;
transform: scale(1.1);
}

.formlayer-settings-field label {
display: block;
font-weight: 600;
margin-bottom: 8px;
color: #334155;
}

.formlayer-settings-field .description {
font-size: 12px;
color: #94a3b8;
margin-top: 6px;
}

/* Switch Styling */
.formlayer-switch {
position: relative;
display: inline-block;
width: 48px;
height: 24px;
}

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

.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #cbd5e1;
transition: .4s;
}

.slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
transition: .4s;
}

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

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

.slider.round {
border-radius: 34px;
}

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

.formlayer-select {
width: 100%;
height: 42px;
padding: 8px 36px 8px 16px;
border: 1px solid #cbd5e1;
border-radius: 10px;
background: #fff;
color: #334155;
font-size: 14px;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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");
background-repeat: no-repeat;
background-position: right 12px center;
background-size: 16px;
transition: all 0.2s;
cursor: pointer;
}

.formlayer-select-compact {
width: auto !important;
min-width: 160px;
height: 45px !important;
min-height: 38px !important;
padding: 0 32px 0 12px !important;
font-size: 13px !important;
}

.formlayer-settings-field-group {
padding: 20px;
background: #f8fafc;
border-radius: 12px;
border: 1px solid #f1f5f9;
margin-bottom: 24px;
}

.formlayer-btn-back-templates:hover {
background: var(--fl-primary);
color: #fff;
}

/* Entries Specific Styles */
.entry-row-unread {
background-color: rgba(79, 70, 229, 0.02);
}

.entry-row-unread td {
font-weight: 500;
}

.formlayer-badge {
padding: 4px 10px;
border-radius: 6px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.formlayer-badge.status-unread {
background: #fef2f2;
color: #ef4444;
border: 1px solid #fee2e2;
}

.formlayer-badge.status-read {
background: #f0fdf4;
color: #22c55e;
border: 1px solid #dcfce7;
}

.formlayer-entry-modal .formlayer-modal-content {
max-width: 900px !important;
padding: 0 !important;
overflow: hidden;
}

.formlayer-entry-details {
display: flex;
flex-direction: column;
height: 80vh;
}

.formlayer-details-header {
padding: 24px 32px;
border-bottom: 1px solid var(--formlayer-border);
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
flex-shrink: 0;
}

.formlayer-details-header h2 {
margin: 0;
font-size: 20px;
}

.formlayer-details-grid {
display: flex;
flex: 1;
overflow: hidden;
background: #f8fafc;
}

.formlayer-details-main {
flex: 1;
padding: 32px;
overflow-y: auto;
}

.formlayer-details-sidebar {
width: 300px;
padding: 32px;
background: #fff;
border-left: 1px solid var(--formlayer-border);
overflow-y: auto;
}

.formlayer-details-card {
background: #fff;
border: 1px solid var(--formlayer-border);
border-radius: 12px;
padding: 24px;
margin-bottom: 24px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.formlayer-details-sidebar .formlayer-details-card {
background: #f8fafc;
border: none;
box-shadow: none;
padding: 20px;
}

.formlayer-details-card h3 {
margin: 0 0 20px 0;
font-size: 14px;
text-transform: uppercase;
letter-spacing: 1px;
color: #94a3b8;
}

.formlayer-data-table {
width: 100%;
border-collapse: collapse;
}

.formlayer-data-table tr {
border-bottom: 1px solid #f1f5f9;
}

.formlayer-data-table tr:last-child {
border-bottom: none;
}

.formlayer-data-table th {
width: 200px;
text-align: left;
padding: 16px 0;
color: #64748b;
font-size: 14px;
font-weight: 600;
vertical-align: top;
}

.formlayer-data-table td {
padding: 16px 0;
color: #1e293b;
font-size: 14px;
line-height: 1.5;
}

.formlayer-meta-list {
list-style: none;
padding: 0;
margin: 0;
}

.formlayer-meta-list li {
margin-bottom: 15px;
font-size: 13px;
color: #475569;
}

.formlayer-meta-list li strong {
display: block;
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #94a3b8;
margin-bottom: 4px;
}

.spin {
animation: fl-spin 1s linear infinite;
}

@keyframes fl-spin {
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);
}
}

.entry-detail-modal {
max-width: 1000px !important;
}

/* Options Preview in Canvas */
.formlayer-options-preview {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 5px;
}

.formlayer-option-row {
display: flex;
align-items: center;
gap: 10px;
font-size: 14px;
color: #475569;
cursor: default;
padding: 2px 0;
}

.formlayer-option-row input[type="radio"],
.formlayer-option-row input[type="checkbox"] {
margin: 0 !important;
cursor: default;
width: 16px !important;
height: 16px !important;
min-width: 16px !important;
appearance: auto !important;
-webkit-appearance: auto !important;
display: inline-block !important;
}

.formlayer-option-row span {
line-height: 1;
}

/* Options Editor in Sidebar */
.formlayer-options-editor {
padding: 15px;
background: #f8fafc;
border-radius: 10px;
border: 1px solid #f1f5f9;
}

.formlayer-option-edit-row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
}

.formlayer-option-input {
flex: 1;
padding: 8px 12px;
border: 1px solid #cbd5e1;
border-radius: 6px;
font-size: 13px;
color: #1e293b;
transition: border-color 0.2s;
}

.formlayer-option-input:focus {
border-color: var(--fl-primary);
outline: none;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.formlayer-btn-remove-option {
background: none;
border: none;
color: #94a3b8;
cursor: pointer;
transition: color 0.2s;
padding: 4px;
display: flex;
align-items: center;
}

.formlayer-btn-remove-option:hover {
color: #ef4444;
}

.formlayer-btn-remove-option .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
}

.formlayer-rating-preview {
display: flex;
gap: 5px;
}

/* Grid Layouts for Multi-input Fields */
.formlayer-grid-2-col {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
width: 100%;
}

.formlayer-address-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
width: 100%;
}

.formlayer-sub-label {
font-size: 11px;
color: #94a3b8;
margin-top: 4px;
font-weight: 500;
}

/* Fix for overlapping Dropdown icons */
.formlayer-builder-select {
appearance: none !important;
-webkit-appearance: none !important;
-moz-appearance: none !important;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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") !important;
background-repeat: no-repeat !important;
background-position: right 14px center !important;
background-size: 16px !important;
padding-right: 40px !important;
width: 100% !important;
height: 48px !important;
border: 1.5px solid var(--fl-border) !important;
border-radius: 10px !important;
background-color: #fff !important;
font-size: 15px !important;
color: #1e293b !important;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
cursor: pointer !important;
}

.formlayer-field-input input[type="text"],
.formlayer-field-input input[type="email"],
.formlayer-field-input input[type="number"],
.formlayer-field-input input[type="password"],
.formlayer-field-input input[type="tel"],
.formlayer-field-input input[type="url"],
.formlayer-field-input textarea {
width: 100% !important;
padding: 12px 18px !important;
border: 1px solid #cbd5e1 !important;
border-radius: 10px !important;
font-size: 15px !important;
color: #1e293b !important;
background-color: #ffffff !important;
height: 46px !important;
line-height: normal !important;
transition: all 0.2s ease !important;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

.formlayer-field-input textarea {
height: auto !important;
min-height: 120px !important;
}

.formlayer-input {
width: 100%;
padding: 12px 16px;
border: 1px solid var(--formlayer-border);
border-radius: 10px;
font-size: 14px;
color: var(--formlayer-text-dark);
background: #fff;
transition: all 0.2s;
outline: none;
}

.formlayer-input:focus {
border-color: var(--formlayer-primary);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 
========================================================================== 
PREMIUM UI & SIZING FIXES
========================================================================== 
*/
:root {
--fl-primary: #5525d6;
--fl-primary-dark: #441ca8;
--fl-primary-light: #f0ecfb;
--fl-text: #1e293b;
--fl-text-light: #64748b;
--fl-border: #e2e8f0;
--fl-bg-premium: #f8fafc;
--fl-radius-lg: 12px;
--fl-radius-md: 8px;
--fl-shadow-premium: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.premium-ui .formlayer-admin-header.main-header-sticky {
background: rgba(255, 255, 255, 0.8) !important;
backdrop-filter: blur(12px) !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
}

.premium-ui .formlayer-tab-item.active {
color: var(--fl-primary) !important;
border-bottom-color: var(--fl-primary) !important;
}

/* Fix Input Field Size coming less */
.formlayer-input,
.formlayer-select,
.formlayer-builder-view input,
.formlayer-builder-view select,
.formlayer-builder-view textarea {
min-height: 44px !important;
width: 100% !important;
max-width: none !important;
font-size: 14px !important;
border-radius: 10px !important;
border: 1.5px solid #e2e8f0 !important;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.formlayer-input:focus,
.formlayer-select:focus {
border-color: var(--fl-primary) !important;
box-shadow: 0 0 0 4px rgba(85, 37, 214, 0.1) !important;
outline: none !important;
}

/* Palette Field Premium Look */
.formlayer-palette-field {
padding: 22px 14px !important;
border-radius: 14px !important;
border: 1.5px solid #f1f5f9 !important;
background: #ffffff !important;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02) !important;
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.formlayer-palette-field:hover {

border-color: var(--fl-primary) !important;
box-shadow: 0 12px 24px rgba(85, 37, 214, 0.1) !important;
}

.formlayer-palette-field .dashicons {
font-size: 26px !important;
width: 26px !important;
height: 26px !important;
margin-bottom: 8px !important;
color: var(--fl-primary) !important;
}

.formlayer-palette-field span:last-child {
font-size: 12px !important;
font-weight: 700 !important;
letter-spacing: -0.2px !important;
color: var(--fl-text) !important;
}

/* Canvas Header Improvements */
.formlayer-builder-header-info {
padding: 40px 40px 20px 40px !important;
background: linear-gradient(to bottom, #ffffff, #fbfbfc) !important;
}

#formlayer-builder-title {
font-size: 15px;
font-weight: 600;
margin: 0;
line-height: 1; 
}

.formlayer-header-version-badge {
padding: 3px 10px;
border-radius: 6px;
background: #f0f6fc;
color: #646970;
font-weight: 500;
}


@keyframes flFadeIn {
from {
opacity: 0;
transform: translateY(10px);
}

to {
opacity: 1;
transform: translateY(0);
}
}

.formlayer-btn-primary {
background: var(--fl-primary);
color: #fff !important;
box-shadow: 0 4px 14px rgba(85, 37, 214, 0.25) !important;
border: none !important;
border-radius: 10px !important;
font-weight: 700 !important;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}


/* Captcha Tabbed Interface */
.formlayer-captcha-tabs-wrapper {
margin-top: 20px;
border: 1px solid #e2e8f0;
border-radius: 16px;
overflow: hidden;
background: #fff;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.formlayer-captcha-tabs-nav {
display: flex;
background: #f8fafc;
border-bottom: 1px solid #e2e8f0;
padding: 0 10px;
}

.captcha-tab-item {
padding: 16px 20px;
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
font-weight: 600;
font-size: 14px;
color: #64748b;
border-bottom: 3px solid transparent;
transition: all 0.2s ease;
}

.captcha-tab-item:hover {
color: var(--fl-primary);
background: rgba(85, 37, 214, 0.02);
}

.captcha-tab-item.active {
color: var(--fl-primary);
border-bottom-color: var(--fl-primary);
background: #fff;
}

.formlayer-captcha-tab-content {
padding: 25px;
}

.captcha-pane {
display: none;
}

.captcha-pane.active {
display: block;
animation: flFadeIn 0.3s ease-out;
}

.pane-header {
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 1px dashed #e2e8f0;
}

.pane-header p {
margin: 10px 0 0 0;
font-size: 13px;
color: #64748b;
line-height: 1.5;
}

.provider-status {
display: flex;
justify-content: flex-end;
}

.formlayer-btn-set-primary {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
border-radius: 20px;
border: 1px solid #e2e8f0;
background: #fff;
color: #64748b;
font-size: 12px;
font-weight: 700;
cursor: pointer;
transition: all 0.2s;
}

.formlayer-btn-set-primary:hover {
border-color: var(--fl-primary);
color: var(--fl-primary);
}

.formlayer-btn-set-primary.is-active {
background: #dcfce7;
border-color: #22c55e;
color: #166534;
}

.formlayer-btn-set-primary .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
}

/* Pro Lock Pane */
.formlayer-pro-lock-pane {
padding: 40px 20px;
text-align: center;
}

.lock-inner {
max-width: 300px;
margin: 0 auto;
}

.lock-icon {
width: 60px;
height: 60px;
background: #fef2f2;
color: #ef4444;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 20px;
}

.lock-icon .dashicons {
font-size: 30px;
width: 30px;
height: 30px;
}

.lock-inner h4 {
margin: 0 0 10px;
font-size: 18px;
}

.lock-inner p {
color: #64748b;
font-size: 14px;
margin-bottom: 20px;
}


.tab-icon-wrap {
width: 28px;
height: 28px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
}

.tab-icon-wrap .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
}

.captcha-tab-item:hover .tab-icon-wrap {
transform: scale(1.1);
}


/* Submit Button Customization */
.formlayer-submit-wrap.align-center,
.formlayer-submit-preview.align-center {
display: flex;
justify-content: center;
}

.formlayer-submit-wrap.align-right,
.formlayer-submit-preview.align-right {
display: flex;
justify-content: flex-end;
}

.formlayer-submit-wrap.align-full .formlayer-submit-btn,
.formlayer-submit-preview.align-full .formlayer-submit-btn {
width: 100%;
}

.formlayer-submit-btn.btn-sm {
height: 38px;
padding: 0 16px;
font-size: 13px;
}

.formlayer-submit-btn.btn-md {
height: 46px;
padding: 0 24px;
font-size: 15px;
}

.formlayer-submit-btn.btn-lg {
height: 56px;
padding: 0 32px;
font-size: 17px;
}


/* Force auto width for submit button by default */
.formlayer-submit-btn {
width: auto !important;
max-width: 100% !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
}

.align-full .formlayer-submit-btn {
width: 100% !important;
display: flex !important;
}


/* Container Layouts */
.formlayer-container-preview {
display: grid;
gap: 20px;
background: #f8fafc;
padding: 15px;
border-radius: 12px;
border: 1px dashed #cbd5e1;
}

.formlayer-container-preview.grid-cols-1 {
grid-template-columns: 1fr;
}

.formlayer-container-preview.grid-cols-2 {
grid-template-columns: 1fr 1fr;
}

.formlayer-container-preview.grid-cols-3 {
grid-template-columns: 1fr 1fr 1fr;
}

.formlayer-container-preview.grid-cols-4 {
grid-template-columns: repeat(4, 1fr);
}

.formlayer-container-column {
background: #fff;
border: 1px dashed #e2e8f0;
border-radius: 8px;
min-height: 80px;
display: flex;
flex-direction: column;
padding: 10px;
}

.formlayer-column-placeholder {
margin: auto;
text-align: center;
color: #94a3b8;
}

.formlayer-column-placeholder .dashicons {
font-size: 20px;
width: 20px;
height: 20px;
margin-bottom: 5px;
}

.formlayer-column-placeholder div {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}


/* Container Interaction */
.formlayer-column-empty {
padding: 10px;
border: 1px dashed #cbd5e1;
background: #f1f5f9;
border-radius: 6px;
color: #64748b;
font-size: 11px;
text-align: center;
font-weight: 600;
text-transform: uppercase;
}

.formlayer-btn-add-to-col {
width: 100%;
margin-top: 10px;
padding: 5px;
background: #f8fafc;
border: 1px dashed #cbd5e1;
color: var(--fl-primary);
cursor: pointer;
border-radius: 4px;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
}

.formlayer-btn-add-to-col:hover {
background: var(--fl-primary);
color: #fff;
border-style: solid;
}

.formlayer-container-column.active-col {
border-color: var(--fl-primary);
background: rgba(37, 99, 235, 0.02);
}


@keyframes flHighlightPulse {
0% {
box-shadow: 0 0 0 0 rgba(85, 37, 214, 0.4);
}

70% {
box-shadow: 0 0 0 10px rgba(85, 37, 214, 0);
}

100% {
box-shadow: 0 0 0 0 rgba(85, 37, 214, 0);
}
}

.formlayer-pane-palette.highlight-add {
animation: flHighlightPulse 1.5s infinite;
border: 2px solid var(--fl-primary);
position: relative;
z-index: 100;
}

/* Modal Footer & Buttons */
.formlayer-modal-footer {
padding: 24px 32px;
border-top: 1px solid #f1f5f9;
background: #f8fafc;
display: flex;
justify-content: flex-end;
gap: 12px;
flex-shrink: 0;
}

.formlayer-modal-content .btn-cancel {
padding: 10px 20px;
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 8px;
color: #64748b;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}

.formlayer-modal-content .btn-cancel:hover {
background: #f1f5f9;
color: #1e293b;
}

.formlayer-modal-content .btn-confirm {
padding: 10px 24px;
background: var(--fl-primary);
border: none;
border-radius: 8px;
color: #fff;
font-weight: 600;
cursor: pointer;
box-shadow: 0 4px 14px rgba(85, 37, 214, 0.2);
transition: all 0.2s;
}

.formlayer-modal-content .btn-confirm:hover {
transform: translateY(-1px);
box-shadow: 0 10px 15px -3px rgba(85, 37, 214, 0.3);
}

.formlayer-modal-content h3 {
margin: 0 0 10px 0;
font-size: 20px;
font-weight: 700;
color: #1e293b;
}

.formlayer-modal-content p {
margin: 0 0 25px 0;
color: #64748b;
font-size: 14px;
}

.formlayer-btn-back-templates {
padding: 8px 16px;
color: var(--fl-primary);
border: 1px solid var(--fl-primary); /* add this */
border-radius: 8px;
transition: 0.2s;
text-decoration: none;
cursor: pointer !important;
display: inline-flex !important;
align-items: center !important;
gap: 8px !important;
line-height: 1 !important;
}

.formlayer-btn-back-templates * {
pointer-events: none !important;
cursor: pointer !important;
}

.formlayer-support-page{
background: #fff;
padding: 60px;
border-radius: 12px;
text-align: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.formlayer-support-page h2{
font-size: 28px;
margin-bottom: 15px;
}

.formlayer-support-page p{
color: #666;
font-size: 16px;
}

/* Custom Additions for Advanced Field Options */
.formlayer-name-preview-container {
display: flex;
flex-direction: column;
gap: 12px;
}

.formlayer-customization-form .sub-group {
background: #f8fafc;
padding: 15px;
border-radius: 12px;
border: 1px solid #e2e8f0;
margin-top: -5px;
margin-bottom: 20px;
display: flex;
flex-direction: column;
gap: 10px;
}

.formlayer-divider {
font-size: 11px;
font-weight: 700;
color: #475569;
text-transform: uppercase;
letter-spacing: 1px;
margin: 25px 0 15px 0;
padding-bottom: 8px;
border-bottom: 1px solid #f1f5f9;
}

.formlayer-prop-list {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 15px;
}

.formlayer-prop-item {
display: flex;
justify-content: space-between;
align-items: center;
}

.formlayer-prop-item label {
font-size: 13px;
font-weight: 600;
color: #334155;
}

.formlayer-control-group.sub-group input {
font-size: 13px !important;
padding: 8px 12px !important;
}

/* Builder Preview Icons */
.formlayer-select-wrap,
.formlayer-date-wrap {
position: relative;
width: 100%;
}

.formlayer-select-wrap .dashicons,
.formlayer-date-wrap .dashicons {
position: absolute;
left: 16px;
top: 50%;
transform: translateY(-50%);
color: #94a3b8;
pointer-events: none;
font-size: 18px;
width: 18px;
height: 18px;
}

.formlayer-field-instance select,
.formlayer-field-instance input[type="date"] {
padding-left: 45px !important;
}

/* Force Full Width for Builder Preview Fields */
.formlayer-builder-select,
.formlayer-select-wrap,
.formlayer-date-wrap,
.formlayer-input-icon-wrap {
width: 100% !important;
max-width: 100% !important;
}

.formlayer-field-input input:not([type="checkbox"]):not([type="radio"]),
.formlayer-field-input select,
.formlayer-field-input textarea {
width: 100% !important;
max-width: none !important;
}

/* Fluent Forms Style File Upload Builder Preview */
.formlayer-file-upload-box {
display: flex !important;
align-items: center !important;
gap: 15px !important;
background: #f8fafc !important;
border: 1.5px solid #e2e8f0 !important;
border-radius: 10px !important;
padding: 12px 20px !important;
width: 100% !important;
box-sizing: border-box !important;
margin-top: 5px !important;
}

.formlayer-file-fake-btn {
background: #5525d6 !important;
color: #fff !important;
padding: 8px 16px !important;
border-radius: 6px !important;
font-size: 14px !important;
font-weight: 600 !important;
cursor: pointer !important;
display: inline-block !important;
white-space: nowrap !important;
transition: all 0.2s !important;
}

.formlayer-file-fake-btn:hover {
background: #441eb1 !important;
}

.formlayer-file-chosen-name {
font-size: 14px !important;
color: #64748b !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
}

/* Extracted Inline Styles */
.formlayer-captcha-preview {
background: #f1f5f9;
padding: 15px;
border-radius: 8px;
border: 1px dashed #cbd5e1;
text-align: center;
}
.formlayer-captcha-preview .dashicons-shield {
font-size: 30px;
height: 30px;
width: 30px;
color: var(--fl-primary);
margin-bottom: 5px;
}
.formlayer-captcha-preview .provider-label {
font-weight: 600;
color: #475569;
}
.formlayer-captcha-preview .credentials-note {
font-size: 11px;
color: #94a3b8;
margin: 5px 0 0 0;
}

.formlayer-richtext-preview {
border: 1.5px solid #cbd5e1;
border-radius: 10px;
padding: 15px;
background: #fff;
min-height: 100px;
}
.formlayer-richtext-toolbar {
border-bottom: 1px solid #eee;
padding-bottom: 8px;
margin-bottom: 10px;
display: flex;
gap: 10px;
}
.formlayer-richtext-placeholder {
color: #94a3b8;
font-style: italic;
}

.formlayer-no-templates {
grid-column: 1 / -1;
text-align: center;
padding: 100px 0;
color: #94a3b8;
}
.formlayer-no-templates .dashicons-search {
font-size: 48px;
width: 48px;
height: 48px;
margin-bottom: 20px;
opacity: 0.5;
}

.formlayer-template-cat-item-wrap {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}

.template-header-badge.starter {
background: var(--fl-primary);
color: #fff;
}
.template-header-badge.pro {
background: #f59e0b;
color: #fff;
}

.formlayer-btn-upgrade-pro {
background: #f59e0b !important;
border: 1px solid #f59e0b !important;
color: #fff !important;
width: 100%;
padding: 10px;
border-radius: 8px;
font-weight: 700;
cursor: pointer;
transition: opacity 0.2s;
}
.formlayer-btn-upgrade-pro:hover {
opacity: 0.9;
}

.formlayer-gdpr-label-preview {
font-size: 14px;
color: #475569;
line-height: 1.4;
}
.formlayer-gdpr-desc-preview {
color: #64748b;
font-size: 12px;
margin-top: 4px;
line-height: 1.4;
}

.formlayer-logo-img {
filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.formlayer-unread-badge {
background: #ef4444;
color: #fff;
border-radius: 20px;
padding: 2px 8px;
font-size: 12px;
margin-left: 5px;
font-weight: 700;
line-height: 1;
}

.formlayer-forms-header {
padding: 28px 32px;
display: flex;
justify-content: space-between;
align-items: center;
}
.formlayer-bulk-actions-wrap {
display: flex;
gap: 10px;
align-items: center;
}

.formlayer-empty-table-state {
text-align: center;
padding: 60px 0;
color: var(--formlayer-text-muted);
}
.formlayer-empty-table-icon {
font-size: 40px;
margin-bottom: 15px;
}
.formlayer-empty-table-title {
font-weight: 600;
font-size: 16px;
margin-bottom: 5px;
}

.formlayer-template-header-top {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.formlayer-template-search-wrapper {
width: 300px;
position: relative;
}
.formlayer-template-search-input {
padding-left: 40px !important;
width: 100%;
border-radius: 20px !important;
border-color: #cbd5e1 !important;
}

.formlayer-builder-header-info {
display: flex;
flex-wrap: wrap;
gap: 16px;
align-items: center;
justify-content: space-between;
}

.formlayer-title-edit-wrapper {
display: flex;
align-items: center;
gap: 8px;
justify-content: center;
flex: 1;
position: relative;
left: -190px;
}
.formlayer-builder-title-input {
display: none;
font-size: 1.5em;
font-weight: 700;
border: 1px solid var(--fl-primary);
border-radius: 4px;
padding: 2px 8px;
color: #1e293b;
background: #fff;
}
.formlayer-edit-title-icon {
color: #94a3b8;
cursor: pointer;
font-size: 18px;
margin-top: 2px;
}

.formlayer-builder-header-right {
display: flex;
align-items: center;
gap: 12px;
width: 100%;
justify-content: flex-end;
order: 3;
}

.formlayer-fullscreen-toggle {
display: flex;
align-items: center;
justify-content: center;
background: #fff;
border: 1px solid #d1d5db;
border-radius: 8px;
padding: 8px;
cursor: pointer;
width: 38px;
height: 38px;
color: #374151;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
transition: all 0.2s;
}

.formlayer-entries-header-wrap {
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
padding: 20px 32px;
border-radius: 12px;
border: 1px solid var(--fl-border);
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.formlayer-entries-search-wrap {
position: relative;
width: 250px;
}
.formlayer-entries-search-icon {
position: absolute;
left: 12px;
top: 10px;
color: #94a3b8;
font-size: 18px;
}
.formlayer-entries-search-input {
padding-left: 40px !important;
width: 100%;
border-radius: 8px !important;
border: 1px solid #e2e8f0 !important;
height: 38px;
font-size: 14px;
}

.formlayer-entries-bulk-bar {
padding: 16px 32px;
border-bottom: 1px solid var(--fl-border);
display: flex;
gap: 10px;
align-items: center;
}

.formlayer-pagination-info {
color: #64748b;
font-size: 13px;
}
.formlayer-pagination-controls {
display: flex;
gap: 8px;
}

.formlayer-support-banner {
max-width: 280px;
height: auto;
}

/* Pro Integration Settings */
.formlayer-int-field-row {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 8px;
}
.formlayer-int-input-full {
max-width: 100% !important;
}


/* Layout Utilities */
.formlayer-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.formlayer-mt-20 { margin-top: 20px; }
.formlayer-mt-30 { margin-top: 30px; }
.formlayer-p-32-0 { padding: 0 32px 32px 32px; }

/* Icon Wrappers */
.formlayer-icon-box {
width: 40px;
height: 40px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.formlayer-icon-box-primary { background: #eff6ff; color: var(--fl-primary); }
.formlayer-icon-box-warning { background: #fff4e5; color: #ff9800; box-shadow: 0 4px 6px rgba(255, 152, 0, 0.1); }
.formlayer-icon-box-success { background: #f0fdf4; color: #22c55e; }
.formlayer-icon-box-info { background: #f0f9ff; color: #0284c7; }

.formlayer-card-title-wrap h3 { margin: 0; font-size: 18px; font-weight: 700; }
.formlayer-card-title-wrap p { margin: 4px 0 0 0; font-size: 13px; color: var(--fl-text-light); }

.formlayer-pane-header h4 { margin: 0; font-size: 15px; }

.formlayer-notice-info {
margin-top: 20px;
padding: 15px;
background: #f0f9ff;
border: 1px solid #bae6fd;
border-radius: 12px;
display: flex;
gap: 12px;
align-items: flex-start;
}
.formlayer-notice-info .dashicons { color: #0284c7; margin-top: 2px; }
.formlayer-notice-info p { margin: 0; font-size: 13px; color: #0369a1; line-height: 1.5; }

/* Extra specific styles */
.formlayer-btn-save-settings { padding: 12px 30px !important; font-size: 15px !important; }
.formlayer-modal-close-abs { position: absolute; top: 15px; right: 20px; z-index: 10; }
.formlayer-input-notif-body { height: 120px !important; }
.formlayer-input-conf-msg { height: 100px !important; }

/* Captcha Tab Icons */
.captcha-tab-item .tab-icon-wrap {
width: 32px;
height: 32px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
}


.formlayer-hidden { display: none !important; }
.formlayer-fw-600 { font-weight: 600; }
.formlayer-shortcode-code { background:#f1f5f9; padding:4px 8px; border-radius:4px; font-size:12px; }
.formlayer-actions-flex { display:flex; gap:12px; color:var(--formlayer-text-muted); }
.formlayer-color-inherit { color:inherit; }
.formlayer-p-30 { padding: 30px; }
.formlayer-w-40 { width: 40px; }
.formlayer-text-right { text-align: right; }
.formlayer-pr-32 { padding-right: 32px; }
.formlayer-italic-muted { color:#94a3b8; font-style:italic; }
.formlayer-sep { color:#e2e8f0; margin:0 4px; }
.formlayer-entry-id { color: #64748b; font-weight: 500; }
.formlayer-entry-date { color: #64748b; font-size: 13px; }
.formlayer-flex-end { display: flex; gap: 8px; justify-content: flex-end; }
.formlayer-btn-icon-only { background: none; border: none; color: #94a3b8; cursor: pointer; transition: color 0.2s; }

.formlayer-pro-lock-card {
background: #f8fafc;
border: 1px dashed #cbd5e1;
border-radius: 12px;
padding: 40px;
text-align: center;
}
.formlayer-pro-lock-icon-wrap {
background: #fff;
width: 64px;
height: 64px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 20px auto;
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.formlayer-pro-lock-icon {
font-size: 32px;
height: 32px;
width: 32px;
color: var(--fl-primary);
}
.formlayer-pro-lock-title {
margin: 0 0 10px 0;
font-size: 18px;
}
.formlayer-pro-lock-desc {
color: #64748b;
margin: 0 0 20px 0;
}

.formlayer-gdpr-wrap,
.formlayer-terms-wrap,
.formlayer-option-row {
display: flex;
align-items: flex-start;
gap: 12px;
margin-bottom: 10px;
}
.formlayer-gdpr-wrap input[type="checkbox"],
.formlayer-terms-wrap input[type="checkbox"],
.formlayer-option-row input[type="checkbox"],
.formlayer-option-row input[type="radio"] {
flex-shrink: 0;
margin-top: 2px !important;
}

.formlayer-custom-css-area {
height: 300px;
font-family: monospace;
}

/* Toast Notifications */
.formlayer-toast {
position: fixed;
top: 90px;
right: 20px;
background: #F0FFF2;
color: #000000;
padding: 15px;
border-radius: 5px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
z-index: 99999;
display: none;
font-weight: 600;
animation: formlayer-slide-down 0.3s ease-out;
}

.formlayer-toast.error {
background: #f44336;
color: white;
}

.formlayer-toast .dashicons {
color: #008000; 
vertical-align: middle;
margin-right: 3px;
font-size: 23px;
}

.formlayer-toast.error .dashicons {
color: white; 
}

@keyframes formlayer-slide-down {
from {
transform: translateY(-100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}


/* Utility classes for extracted inline styles */
.formlayer-unread-badge {
background: #ef4444;
color: #fff;
border-radius: 20px;
padding: 2px 8px;
font-size: 12px;
margin-left: 5px;
font-weight: 700;
line-height: 1;
display: inline-block;
}

.formlayer-table-card-header {
padding: 28px 32px;
display: flex;
justify-content: space-between;
align-items: center;
}

.formlayer-bulk-action-wrap {
display: flex;
gap: 10px;
align-items: center;
}

.formlayer-empty-icon {
font-size: 40px;
margin-bottom: 15px;
}

.formlayer-empty-title {
font-weight: 600;
font-size: 16px;
margin-bottom: 5px;
}

.formlayer-templates-header-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}

.formlayer-template-search-input {
padding-left: 40px !important;
width: 300px !important;
border-radius: 20px !important;
border-color: #cbd5e1 !important;
}

.formlayer-builder-header-info-wrap {
display: flex;
flex-wrap: wrap;
gap: 16px;
align-items: center;
justify-content: space-between;
}

.formlayer-title-edit-container {
display: flex;
align-items: center;
gap: 8px;
justify-content: center;
flex: 1;
position: relative;
left: -190px;
}

.formlayer-builder-title-input-el {
display: none;
font-size: 1.5em;
font-weight: 700;
border: 1px solid var(--formlayer-primary);
border-radius: 4px;
padding: 2px 8px;
color: #1e293b;
background: #fff;
}

.formlayer-builder-info-right {
display: flex;
align-items: center;
gap: 12px;
width: 100%;
justify-content: flex-end;
order: 3;
}

.formlayer-fullscreen-toggle-btn {
display: flex;
align-items: center;
justify-content: center;
background: #fff;
border: 1px solid #d1d5db;
border-radius: 8px;
padding: 8px;
cursor: pointer;
width: 38px;
height: 38px;
color: #374151;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
transition: all 0.2s;
}

.formlayer-entries-filter-bar {
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
padding: 20px 32px;
border-radius: 12px;
border: 1px solid var(--formlayer-border);
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.formlayer-entries-filter-left {
display: flex;
align-items: center;
gap: 15px;
}

.formlayer-entries-search-wrapper {
position: relative;
width: 250px;
}

.formlayer-entries-search-icon {
position: absolute !important;
left: 12px !important;
top: 10px !important;
color: #94a3b8 !important;
font-size: 18px !important;
}

.formlayer-entries-search-input-el {
padding-left: 40px !important;
border-radius: 8px !important;
border: 1px solid #e2e8f0 !important;
height: 38px !important;
font-size: 14px !important;
}

.formlayer-export-btn {
display: flex;
align-items: center;
gap: 8px;
height: 38px;
}

.formlayer-entries-table-card {
border: 1px solid var(--formlayer-border);
border-radius: 12px;
background: #fff;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.formlayer-entries-table-actions {
padding: 16px 32px;
border-bottom: 1px solid var(--formlayer-border);
display: flex;
gap: 10px;
align-items: center;
}

.formlayer-entry-row-actions {
display: flex;
gap: 8px;
justify-content: flex-end;
}

.formlayer-table-footer-wrap {
padding: 16px 32px;
background: #fdfdfd;
border-top: 1px solid var(--formlayer-border);
display: flex;
justify-content: space-between;
align-items: center;
}

.formlayer-captcha-header-left {
display: flex;
align-items: center;
gap: 15px;
}

.formlayer-captcha-icon-box {
background: #fff4e5;
color: #ff9800;
width: 42px;
height: 42px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 6px rgba(255, 152, 0, 0.1);
}

.formlayer-captcha-notice-box {
margin-top: 20px;
padding: 15px;
background: #f0f9ff;
border: 1px solid #bae6fd;
border-radius: 12px;
display: flex;
gap: 12px;
align-items: flex-start;
}

.formlayer-modal-close-btn {
position: absolute;
top: 15px;
right: 20px;
z-index: 10;
}

/* Pro Integration Styles */
.formlayer-int-setting-row-pro {
background: #f8fafc;
border: 1px solid #f1f5f9;
border-radius: 12px;
padding: 20px;
margin-bottom: 15px;
}

.formlayer-int-row-header {
display: flex;
justify-content: space-between;
align-items: center;
}

.formlayer-int-row-title-wrap {
display: flex;
align-items: center;
gap: 12px;
}

.formlayer-int-row-content {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #edf2f7;
}

.formlayer-int-modal-header {
border-bottom: 1px solid #f1f5f9;
padding-bottom: 20px;
margin-bottom: 25px;
display: flex;
justify-content: space-between;
align-items: center;
}

.formlayer-int-modal-footer {
margin-top: 30px;
padding-top: 25px;
border-top: 1px solid #f1f5f9;
display: flex;
justify-content: flex-end;
gap: 12px;
}

.formlayer-pro-lock-pane-wrap {
background: #f8fafc;
border: 1px dashed #cbd5e1;
border-radius: 12px;
padding: 40px;
text-align: center;
}

.formlayer-pro-lock-icon-box {
background: #fff;
width: 64px;
height: 64px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 20px auto;
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.formlayer-int-modal-title-el {
margin: 0;
font-size: 22px;
font-weight: 700;
color: #1e293b;
}

.formlayer-entries-empty-row {
text-align: center;
padding: 80px 0;
color: var(--formlayer-text-muted);
}

.formlayer-search-empty-icon {
font-size: 40px;
margin-bottom: 20px;
}

.formlayer-entry-details-header-left {
display: flex;
align-items: center;
gap: 12px;
}

.formlayer-details-card-title {
display: flex;
align-items: center;
gap: 8px;
}

.formlayer-btn-upgrade-pro-el {
background: #f59e0b;
border: 1px solid #f59e0b;
color: #fff;
width: 100%;
padding: 10px;
border-radius: 8px;
font-weight: 700;
cursor: pointer;
}

.formlayer-style-divider {
margin: 15px 0 10px 0;
border-bottom: 1px solid #eee;
text-transform: none;
font-size: 13px;
color: #475569;
}

.formlayer-flex-center-between {
display: flex;
align-items: center;
justify-content: space-between;
}

.formlayer-flex-center-gap8 {
display: flex;
align-items: center;
gap: 8px;
}.formlayer-template-cat-item {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}

.cat-count {
background: #f1f5f9;
color: #64748b;
font-size: 11px;
font-weight: 600;
padding: 2px 6px;
border-radius: 10px;
min-width: 20px;
text-align: center;
}

.active .cat-count {
background: rgba(255, 255, 255, 0.2);
color: #fff;
}

.formlayer-no-results {
padding: 30px 15px;
text-align: center;
color: #94a3b8;
font-style: italic;
font-size: 13px;
}

.formlayer-copy-shortcode-list,
.formlayer-delete-form,
.formlayer-action-btns{
text-decoration: none !important;
border-bottom: none !important;
box-shadow: none !important;
}

.formlayer-setting-row-v{ 
margin-bottom: 20px;
}

.formlayer-setting-row-v label{ 
display: block;
font-weight: 600;
margin-bottom: 8px;
font-size: 14px;
color: #334155; 
}
