/* WP Advanced Form - Admin Styles */

.formnest-admin {
    max-width: 1200px;
    margin: 20px 0;
}

/* Welcome Panel */
.formnest-welcome-panel {
    position: relative;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin: 20px 0;
    padding: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.formnest-welcome-panel-content {
    padding: 30px;
    position: relative;
}

.formnest-welcome-panel-dismiss {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    color: #646970;
    z-index: 2;
    transition: color 0.2s ease;
}

.formnest-welcome-panel-dismiss:hover {
    color: #d63638;
}

.formnest-welcome-panel-dismiss .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.formnest-welcome-panel-dismiss .screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    word-wrap: normal !important;
    overflow: hidden;
    width: 1px;
    height: 1px;
}

.formnest-welcome-panel h2 {
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: #1d2327;
}

.formnest-welcome-panel .about-description {
    font-size: 16px;
    line-height: 1.5;
    color: #646970;
    margin: 0 0 30px;
}

.formnest-welcome-panel-column-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.formnest-welcome-panel-column {
    flex: 1;
    min-width: 0;
}

.formnest-welcome-panel-column h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.formnest-welcome-panel-column p {
    margin: 0 0 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #646970;
}

.formnest-welcome-panel-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.formnest-welcome-panel-column li {
    margin-bottom: 8px;
}

.formnest-welcome-panel-column a {
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
}

.formnest-welcome-panel-column a:hover {
    color: #135e96;
    text-decoration: underline;
}

.formnest-welcome-panel .button-hero {
    font-size: 14px;
    padding: 10px 20px;
    height: auto;
    line-height: 1.4;
}

.formnest-welcome-panel .button-hero .dashicons {
    margin-right: 8px;
    font-size: 16px;
    vertical-align: middle;
}

.formnest-welcome-panel-tips {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
}

.formnest-welcome-panel-tips h3 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.formnest-tips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.formnest-tip-item {
    padding: 15px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.formnest-tip-item strong {
    color: #1d2327;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

/* Responsive styles for welcome panel */
@media (max-width: 1024px) {
    .formnest-welcome-panel-column-container {
        flex-direction: column;
        gap: 20px;
    }

    .formnest-welcome-panel-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .formnest-welcome-panel h2 {
        font-size: 20px;
    }

    .formnest-welcome-panel .about-description {
        font-size: 15px;
    }

    .formnest-welcome-panel-content {
        padding: 15px;
    }

    .formnest-welcome-panel-tips {
        padding: 15px;
    }

    .formnest-tip-item {
        padding: 12px;
    }
}

.page-title-action{

     display: inline-flex !Important;
    align-items: center;
}

/* Dashboard Grid */
.formnest-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.formnest-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.formnest-card h3 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.formnest-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.formnest-stat-item {
    text-align: center;
    padding: 15px;
    background: #f6f7f7;
    border-radius: 4px;
}

.formnest-stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #2271b1;
    margin-bottom: 5px;
}

.formnest-stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.formnest-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.formnest-action-buttons .button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.formnest-action-buttons .button .dashicons {
    margin-right: 8px;
    font-size: 16px;
}

.formnest-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.formnest-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
}

.formnest-info-item:last-child {
    border-bottom: none;
}

.formnest-info-item label {
    font-weight: 500;
    color: #1d2327;
    margin: 0;
}

.formnest-info-item span {
    color: #646970;
    font-family: monospace;
}

/* Dashboard Responsive */
@media (max-width: 1024px) {
    .formnest-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .formnest-stats-grid {
        grid-template-columns: 1fr;
    }

    .formnest-card {
        padding: 15px;
    }

    .formnest-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Usage Guide Menu Icon */
.wp-menu-name:has(a[href*="formnest-usage-guide"]):before,
a[href*="formnest-usage-guide"]:before {
    content: "📖 ";
    margin-right: 5px;
}

/* Alternative approach for Usage Guide menu styling */
.wp-submenu a[href*="formnest-usage-guide"] {
    position: relative;
}

.wp-submenu a[href*="formnest-usage-guide"]:after {
    content: " ↗";
    font-size: 12px;
    opacity: 0.7;
    margin-left: 3px;
}

/* Shortcode Section */
.formnest-shortcode-section {
    margin: 20px 0;
}

.formnest-shortcode-section .formnest-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.formnest-shortcode-section h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
}

.formnest-shortcode-section .description {
    margin: 0 0 20px;
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

.formnest-shortcode-container {
    margin-bottom: 20px;
}

.formnest-shortcode-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 10px;
}

.formnest-shortcode-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    font-family: Monaco, 'Courier New', monospace;
    font-size: 13px;
    color: #1d2327;
    cursor: pointer;
    transition: all 0.2s ease;
}

.formnest-shortcode-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    background: #fff;
}

.formnest-copy-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    white-space: nowrap;
    min-width: 100px;
    justify-content: center;
    transition: all 0.2s ease;
}

.formnest-copy-button:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

.formnest-copy-button.formnest-copy-success {
    background: #00a32a;
    border-color: #00a32a;
    color: #fff;
}

.formnest-copy-button.formnest-copy-error {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

/* HTML Update Button States */
.formnest-update-success {
    background: #00a32a !important;
    border-color: #00a32a !important;
    color: #fff !important;
}

.formnest-update-error {
    background: #d63638 !important;
    border-color: #d63638 !important;
    color: #fff !important;
}

/* HTML Copy Button States */
.formnest-copy-success {
    background: #00a32a !important;
    border-color: #00a32a !important;
    color: #fff !important;
}

.formnest-copy-error {
    background: #d63638 !important;
    border-color: #d63638 !important;
    color: #fff !important;
}

.formnest-copy-message {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.formnest-copy-message.formnest-copy-success {
    background: #d1eddd;
    border: 1px solid #00a32a;
    color: #00a32a;
}

.formnest-copy-message.formnest-copy-error {
    background: #f8d7da;
    border: 1px solid #d63638;
    color: #d63638;
}

.formnest-shortcode-usage {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.formnest-shortcode-usage h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.formnest-shortcode-usage ul {
    margin: 0;
    padding-left: 20px;
}

.formnest-shortcode-usage li {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #646970;
}

.formnest-shortcode-usage code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: Monaco, 'Courier New', monospace;
    font-size: 12px;
    color: #d63638;
    display: inline-block;
    margin-top: 5px;
}

/* New Form Notice */
.formnest-new-form-notice {
    margin: 20px 0;
}

.formnest-new-form-notice .notice {
    border-left-color: #72aee6;
}

/* Responsive styles for shortcode section */
@media (max-width: 768px) {
    .formnest-shortcode-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .formnest-copy-button {
        width: 100%;
    }

    .formnest-shortcode-section .formnest-card {
        padding: 15px;
    }

    .formnest-shortcode-usage {
        padding: 12px;
    }
}

/* Form List Table */
.formnest-forms-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.formnest-forms-table th,
.formnest-forms-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.formnest-forms-table th {
    background-color: #f1f1f1;
    font-weight: 600;
}

.formnest-forms-table tr:hover {
    background-color: #f9f9f9;
}

/* Form Builder */
.formnest-form-builder {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.formnest-form-builder__sidebar {
    width: 300px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
}

.formnest-form-builder__canvas {
    flex: 1;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    min-height: 500px;
}

/* Field Types */
.formnest-field-types {
    margin-bottom: 30px;
}

.formnest-field-types h3 {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.formnest-field-type {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.formnest-field-type:hover {
    background: #e7e8e9;
    border-color: #c3c4c7;
}

.formnest-field-type__icon {
    margin-right: 10px;
    font-size: 16px;
    color: #646970;
}

.formnest-field-type__label {
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
}

/* Form Preview */
.formnest-form-preview {
    max-width: 600px;
}

.formnest-form-editor-container .formnest-form-field {
    margin-bottom: 20px;
    padding: 0;
}

.formnest-form-editor-container .formnest-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1d2327;
}

.formnest-form-field input[type="text"],
.formnest-form-field input[type="email"],
.formnest-form-field input[type="url"],
.formnest-form-field input[type="tel"],
.formnest-form-field input[type="number"],
.formnest-form-field input[type="file"],
.formnest-form-field textarea,
.formnest-form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
}

/* File upload wrapper styles (match frontend) */
.formnest-field-preview .formnest-file-upload-wrapper,
.formnest-form-preview .formnest-file-upload-wrapper,
.formnest-preview-form .formnest-file-upload-wrapper,
.formnest-form-real-preview-content .formnest-file-upload-wrapper {
    width: 100%;
}

.formnest-field-preview .formnest-file-upload-label,
.formnest-form-preview .formnest-file-upload-label,
.formnest-preview-form .formnest-file-upload-label,
.formnest-form-real-preview-content .formnest-file-upload-label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    gap: 10px;
}

.formnest-field-preview .formnest-file-upload-button,
.formnest-form-preview .formnest-file-upload-button,
.formnest-preview-form .formnest-file-upload-button,
.formnest-form-real-preview-content .formnest-file-upload-button {
    display: inline-block;
    padding: 8px 14px;
    background-color: #2271b1;
    color: #ffffff;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
}

.formnest-field-preview .formnest-file-upload-filename,
.formnest-form-preview .formnest-file-upload-filename,
.formnest-preview-form .formnest-file-upload-filename,
.formnest-form-real-preview-content .formnest-file-upload-filename {
    flex: 1;
    padding: 6px 10px;
    background-color: #f6f7f7;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    color: #646970;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.formnest-field-preview .formnest-file-upload-filename.has-file,
.formnest-form-preview .formnest-file-upload-filename.has-file,
.formnest-preview-form .formnest-file-upload-filename.has-file,
.formnest-form-real-preview-content .formnest-file-upload-filename.has-file {
    color: #1d2327;
    font-weight: 500;
    border-color: #2271b1;
    background-color: #eef6ff;
}

.formnest-form-field input:focus,
.formnest-form-field textarea:focus,
.formnest-form-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.formnest-form-field.required label::after {
    content: " *";
    color: #d63638;
}

/* Buttons */
.formnest-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.formnest-btn:hover {
    background: #005a87;
    color: #fff;
}

.formnest-btn--secondary {
    background: #f6f7f7;
    color: #1d2327;
    border: 1px solid #c3c4c7;
}

.formnest-btn--secondary:hover {
    background: #e7e8e9;
    color: #1d2327;
}

.formnest-btn--danger {
    background: #d63638;
}

.formnest-btn--danger:hover {
    background: #b32d2e;
}

/* Submissions Statistics */
.formnest-submissions-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.formnest-stat-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 20px;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.formnest-stat-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.formnest-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
    line-height: 1;
    margin-bottom: 8px;
}

.formnest-stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .formnest-submissions-stats {
        flex-direction: column;
        gap: 15px;
    }

    .formnest-stat-card {
        min-width: auto;
    }

    .formnest-stat-number {
        font-size: 28px;
    }
}

/* Submissions Table */
.formnest-submissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.formnest-submissions-table th,
.formnest-submissions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.formnest-submissions-table th {
    background-color: #f1f1f1;
    font-weight: 600;
}

.formnest-submissions-table tr:hover {
    background-color: #f9f9f9;
}

.formnest-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.formnest-status-badge--unread {
    background: #ffebee;
    color: #c62828;
}

.formnest-status-badge--read {
    background: #e8f5e8;
    color: #2e7d32;
}

/* Mail Settings Section */
.formnest-mail-settings-section {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.formnest-mail-settings-section>h3 {
    margin: 0 0 25px 0;
    padding: 0 0 15px 0;
    border-bottom: 3px solid #0073aa;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}


.formnest-form-col {
    flex: 1;
}

.formnest-form-col--narrow {
    flex: 0 0 200px;
}

.formnest-form-group {
    margin-bottom: 20px;
}

.formnest-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1d2327;
}

.formnest-form-group input,
.formnest-form-group textarea,
.formnest-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
}

.formnest-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Agreement description textarea - preserve newlines */
#agreement_field_description,
textarea[name="agreement_field_description"] {
    white-space: pre-wrap;
    /* Preserve newlines and wrap text */
    word-wrap: break-word;
    /* Break long words if needed */
}

.formnest-agreement-content {
    white-space: pre-wrap;
}

/* TinyMCE Toolbar Wrapping for Agreement Field */
#agreement_field_description_ifr+.mce-toolbar,
.mce-toolbar.mce-toolbar-1,
.mce-toolbar.mce-toolbar-2 {
    flex-wrap: wrap !important;
    max-width: 100% !important;
}

.mce-toolbar .mce-btn-group {
    flex-wrap: wrap !important;
}

.mce-toolbar .mce-btn {
    margin: 2px !important;
}

/* Ensure toolbar buttons don't overflow */
.formnest-field-settings-modal .mce-container {
    max-width: 100% !important;
}

.formnest-field-settings-modal .mce-toolbar {
    overflow: visible !important;
}

/* Quicktags Toolbar - Only visible in Text/Code tab, not Visual tab */
/* Hide Quicktags when Visual tab is active */
.wp-core-ui .wp-editor-wrap.tmce-active #qt_agreement_field_description_toolbar,
.wp-core-ui .wp-editor-wrap.tmce-active #qt_agreement_field_description_toolbar.hide-if-no-js {
    display: none !important;
    visibility: hidden !important;
}

/* Show Quicktags when Text/Code tab is active */
.wp-core-ui .wp-editor-wrap.html-active #qt_agreement_field_description_toolbar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 10px !important;
}

.wp-core-ui .wp-editor-wrap.html-active #qt_agreement_field_description_toolbar.hide-if-no-js {
    display: block !important;
    visibility: visible !important;
}

/* Quicktags buttons styling - Ensure all buttons are visible */
#qt_agreement_field_description_toolbar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 30px !important;
    overflow: visible !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Force all buttons to be visible */
#qt_agreement_field_description_toolbar .ed_button {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 2px !important;
    padding: 4px 8px !important;
    min-width: 24px !important;
    width: auto !important;
    height: auto !important;
    min-height: 24px !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
    position: relative !important;
    overflow: visible !important;
}

/* Ensure button text and icons are visible */
#qt_agreement_field_description_toolbar .ed_button,
#qt_agreement_field_description_toolbar .ed_button * {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure button icons and pseudo-elements are visible */
#qt_agreement_field_description_toolbar .ed_button .ed_button-icon,
#qt_agreement_field_description_toolbar .ed_button::before,
#qt_agreement_field_description_toolbar .ed_button::after {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure Quicktags toolbar wraps and shows all buttons */
.wp-core-ui .wp-editor-wrap.html-active #qt_agreement_field_description_toolbar {
    flex-wrap: wrap !important;
    display: flex !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: center !important;
}

/* Fix for buttons that might be hidden by default WordPress styles */
.formnest-field-settings-modal #qt_agreement_field_description_toolbar,
.formnest-field-settings-modal #qt_agreement_field_description_toolbar .ed_button {
    display: block !important;
    visibility: visible !important;
}

.formnest-field-settings-modal #qt_agreement_field_description_toolbar .ed_button {
    display: inline-block !important;
}

/* Override any WordPress core styles that might hide buttons */
.wp-core-ui #qt_agreement_field_description_toolbar .ed_button.hidden,
.wp-core-ui #qt_agreement_field_description_toolbar .ed_button[style*="display: none"],
.wp-core-ui #qt_agreement_field_description_toolbar .ed_button[style*="visibility: hidden"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure toolbar container doesn't hide buttons */
.wp-editor-container #qt_agreement_field_description_toolbar {
    display: block !important;
    visibility: visible !important;
}

/* Full width editor for agreement field description */
.formnest-agreement-row[data-field-type="agreement"] td[colspan="2"] {
    width: 100% !important;
    padding: 0 !important;
}

.formnest-agreement-row[data-field-type="agreement"] td[colspan="2"] label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.formnest-agreement-row[data-field-type="agreement"] td[colspan="2"] .wp-editor-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

.formnest-agreement-row[data-field-type="agreement"] td[colspan="2"] .wp-editor-container {
    width: 100% !important;
    max-width: 100% !important;
}

.formnest-agreement-row[data-field-type="agreement"] td[colspan="2"] .mce-tinymce {
    width: 100% !important;
    max-width: 100% !important;
}

.formnest-agreement-row[data-field-type="agreement"] td[colspan="2"] iframe {
    width: 100% !important;
    max-width: 100% !important;
}

/* Responsive */
@media (max-width: 768px) {
    .formnest-form-builder {
        flex-direction: column;
    }

    .formnest-form-builder__sidebar {
        width: 100%;
        order: 2;
    }

    .formnest-form-row {
        flex-direction: column;
    }

    .formnest-form-col--narrow {
        flex: 1;
    }
}

/* Preview Tabs */
.formnest-preview-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.formnest-preview-tab {
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
    color: #555;
    transition: all 0.3s ease;
}

.formnest-preview-tab:hover {
    background: #e6e6e6;
    color: #333;
}

.formnest-preview-tab--active {
    background: #fff;
    color: #0073aa;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

/* Preview Content */
.formnest-preview-content {
    min-height: 300px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 0 4px 4px 4px;
    background: #fff;
}

.formnest-preview-content--html {
    padding: 15px;
}

/* Form Preview Styles */
.formnest-preview-content--form {
    padding: 20px;
    background: #f8f9fa;
}

.formnest-form-real-preview-container {
    max-width: 800px;
    margin: 0 auto;
}

.formnest-form-real-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.formnest-form-real-preview-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.formnest-form-real-preview-content {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
}

.formnest-form-preview-container {
    padding: 30px;
    background: #fff;
}

.formnest-preview-form .formnest-field-wrapper {
    margin-bottom: 20px;
}

.formnest-preview-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.formnest-preview-form input[type="text"],
.formnest-preview-form input[type="email"],
.formnest-preview-form input[type="tel"],
.formnest-preview-form input[type="number"],
.formnest-preview-form input[type="date"],
.formnest-preview-form input[type="file"],
.formnest-preview-form textarea,
.formnest-preview-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.formnest-preview-form input[type="text"]:focus,
.formnest-preview-form input[type="email"]:focus,
.formnest-preview-form input[type="tel"]:focus,
.formnest-preview-form input[type="number"]:focus,
.formnest-preview-form input[type="date"]:focus,
.formnest-preview-form textarea:focus,
.formnest-preview-form select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.formnest-preview-form textarea {
    min-height: 80px;
    resize: vertical;
}

.formnest-preview-form fieldset {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 0;
    background: #f9f9f9;
}

.formnest-preview-form legend {
    font-weight: 600;
    color: #333;
    padding: 0 10px;
    background: #fff;
}

.formnest-preview-form fieldset label {
    display: inline-block;
    margin: 5px 15px 5px 0;
    font-weight: normal;
    cursor: pointer;
}

.formnest-preview-form fieldset input[type="radio"],
.formnest-preview-form fieldset input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}

.formnest-preview-form .formnest-field-description {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.formnest-preview-form .formnest-required {
    color: #d63638;
    font-weight: bold;
}

.formnest-preview-form .formnest-form-submit {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.formnest-preview-form .formnest-submit-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.formnest-preview-form .formnest-submit-button:hover {
    background: #005a87;
}

.formnest-preview-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #856404;
}

.formnest-preview-note p {
    margin: 0;
    font-size: 14px;
}

.formnest-preview-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    color: #721c24;
    text-align: center;
}

.formnest-preview-error p {
    margin: 0;
    font-size: 16px;
}

/* HTML Code Textarea */
#formnest-html-code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #f9f9f9;
    border: 1px solid #ddd;
    width: 100%;
    margin-bottom: 15px;
    resize: vertical;
}

/* HTML Actions */
.formnest-html-actions {
    text-align: right;
}

.formnest-html-actions .button {
    margin-left: 10px;
}



/* Validation Settings Styles */
.formnest-validation-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.formnest-validation-group label {
    margin: 0;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.formnest-validation-group input {
    margin: 0 5px 0 0;
}

.formnest-validation-group .small-text {
    width: 80px;
}

.formnest-validation-group .regular-text {
    width: 150px;
}

@media (max-width: 768px) {
    .formnest-validation-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .formnest-validation-group input {
        width: 100%;
        max-width: 200px;
    }
}

/* Field Preview Improvements */
.formnest-field-preview {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.formnest-field-preview input,
.formnest-field-preview textarea,
.formnest-field-preview select {
    max-width: 100%;
    margin: 2px 0;
}

.formnest-field-preview input[type="checkbox"],
.formnest-field-preview input[type="radio"] {
    width: auto;
    max-width: none;
    margin: 2px 5px 2px 0;
}

.formnest-field-preview input[type="radio"] {
    border-radius: 100%;
}

.formnest-field-preview label {
    display: block;
    margin: 5px 0;
    font-weight: normal;
}

.formnest-field-preview fieldset {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin: 5px 0;
}

.formnest-field-preview legend {
    font-weight: bold;
    padding: 0 10px;
}

/* Required Indicator */
.formnest-required-indicator {
    display: inline-block;
    background-color: rgb(220, 53, 69);
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    margin-left: 4px;
}

/* Field Controls Improvements */
.formnest-field-controls {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f0f6fc;
    border: 1px solid #c6d7eb;
    border-radius: 4px 4px 0 0;
    gap: 10px;
}

.formnest-field-handle {
    cursor: move;
    color: #666;
    font-size: 16px;
    padding: 2px 5px;
}

.formnest-field-type-label {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.formnest-edit-field,
.formnest-remove-field {
    background: none;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.formnest-edit-field:hover {
    background: #0073aa;
    color: #fff;
}

.formnest-remove-field:hover {
    background: #d63638;
    color: #fff;
}

/* Form Field Wrapper */
.formnest-form-field {
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.formnest-form-field:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Empty Form State */
.formnest-empty-form {
    text-align: center;
    padding: 15px 20px;
    color: #666;
    font-style: italic;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #fafafa;
}

/* Error state for empty form message */
.formnest-empty-form.formnest-visual-preview-error {
    color: #dc3232;
    border-color: #dc3232;
    background: #fff;
    font-style: normal;
}

.formnest-empty-form.formnest-visual-preview-error p {
    color: #dc3232;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {

    .formnest-preview-tabs {
        flex-direction: column;
    }

    .formnest-preview-tab {
        margin-right: 0;
        margin-bottom: 5px;
        border-radius: 4px;
    }

    .formnest-field-controls {
        flex-wrap: wrap;
        gap: 5px;
    }
}

/* Form Preview Modal */
.formnest-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.formnest-preview-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.formnest-preview-modal-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.formnest-preview-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.formnest-preview-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.formnest-preview-modal-close:hover {
    background: #f0f0f0;
    color: #666;
}

.formnest-preview-modal-body {
    padding: 30px;
}

/* Preview Form Styles */
.formnest-form-preview-modal h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.formnest-form-preview-modal .form-description {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.formnest-preview-form .formnest-field-wrapper {
    margin-bottom: 20px;
}

.formnest-preview-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.formnest-preview-form input,
.formnest-preview-form textarea,
.formnest-preview-form select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.formnest-preview-form input:focus,
.formnest-preview-form textarea:focus,
.formnest-preview-form select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.formnest-preview-form textarea {
    min-height: 100px;
    resize: vertical;
}

.formnest-preview-form fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin: 0;
}

.formnest-preview-form legend {
    font-weight: 600;
    color: #333;
    padding: 0 10px;
    font-size: 14px;
}

.formnest-preview-form fieldset label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: normal;
    cursor: pointer;
}

.formnest-preview-form fieldset input[type="radio"],
.formnest-preview-form fieldset input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-bottom: 0;
}

.formnest-preview-form .field-description {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.formnest-preview-form .required {
    color: #d63638;
    font-weight: bold;
}

.formnest-preview-form .submit-wrapper {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.formnest-preview-form .submit-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: not-allowed;
    opacity: 0.7;
    font-weight: 600;
}

.formnest-preview-form .preview-note {
    margin: 15px 0 0 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Responsive Preview Modal */
@media (max-width: 768px) {
    .formnest-preview-modal {
        padding: 10px;
    }

    .formnest-preview-modal-body {
        padding: 20px 15px;
    }

    .formnest-form-preview-modal h2 {
        font-size: 20px;
    }
}

/* Mail Settings Container */
.formnest-mail-settings-container {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

/* Mail Settings */
.formnest-mail-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Auto Reply and Admin Mail Sections (side by side) */
.formnest-auto-reply-section,
.formnest-admin-mail-section {
    flex: 1;
    margin-bottom: 0;
}

.formnest-mail-section h4 {
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #0073aa;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.formnest-mail-section .form-table {
    width: 100%;
}

.formnest-mail-section .form-table tr {
    display: block;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.formnest-mail-section .form-table tr:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.formnest-mail-section .form-table th {
    display: block;
    width: 100%;
    padding: 0 0 8px 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    text-align: left;
}

.formnest-mail-section .form-table td {
    display: block;
    width: 100%;
    padding: 0;
}

.formnest-mail-section input[type="text"],
.formnest-mail-section input[type="email"],
.formnest-mail-section textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.formnest-mail-section input[type="text"]:focus,
.formnest-mail-section input[type="email"]:focus,
.formnest-mail-section textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.formnest-mail-section textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

.formnest-mail-section .description {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

.formnest-mail-section input[type="checkbox"] {
    margin-right: 8px;
}

.formnest-mail-section label {
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.formnest-mail-section th label {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
}

.formnest-mail-section td label {
    display: block;
    margin-bottom: 5px;
}

.wp-core-ui .button,
.wp-core-ui .button-primary,
.wp-core-ui .button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Mail Test Section */
.formnest-mail-test-section {
    border: 2px solid #0073aa;
    background: #f8f9fa;
}

.formnest-mail-test-section h4 {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

#test_mail_address {
    margin-right: 15px;
    width: 300px;
}

#formnest-test-auto-reply,
#formnest-test-admin-mail {
    margin-left: 10px;
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#formnest-test-auto-reply:hover,
#formnest-test-admin-mail:hover {
    background: #005a87;
}

#formnest-test-auto-reply:disabled,
#formnest-test-admin-mail:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Enable/Disable States */
.formnest-mail-section.formnest-disabled {
    opacity: 0.6;
}

.formnest-mail-section.formnest-disabled input[type="checkbox"] {
    opacity: 1;
    pointer-events: auto;
}

.formnest-mail-section.formnest-disabled input:not([type="checkbox"]),
.formnest-mail-section.formnest-disabled textarea,
.formnest-mail-section.formnest-disabled select {
    pointer-events: none;
}

.formnest-mail-section input[type="checkbox"]:checked+label {
    color: #0073aa;
    font-weight: 600;
}

/* Responsive Mail Settings */
@media (max-width: 1024px) {
    .formnest-mail-settings-container {
        flex-direction: column;
        gap: 15px;
    }

    .formnest-auto-reply-section,
    .formnest-admin-mail-section {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .formnest-mail-settings-section {
        padding: 15px;
        margin: 20px 0;
    }

    .formnest-mail-section {
        padding: 15px;
    }

    .formnest-mail-section .form-table tr {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .formnest-mail-section .form-table th {
        padding-bottom: 5px;
        font-size: 13px;
    }

    #test_mail_address {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }

    #formnest-test-auto-reply,
    #formnest-test-admin-mail {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}

/* Security Page Styles */
.formnest-security-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.formnest-security-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
}

.formnest-security-stat-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.formnest-security-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin: 10px 0;
}

.formnest-security-log-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.formnest-security-log-table th,
.formnest-security-log-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.formnest-security-log-table th {
    background-color: #f9f9f9;
    font-weight: bold;
}

.formnest-security-event-details {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 3px;
    margin-top: 5px;
    font-size: 12px;
    max-height: 100px;
    overflow-y: auto;
}

.formnest-security-event-toggle {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    font-size: 12px;
}

.formnest-security-event-type {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: white;
    text-transform: uppercase;
}

.formnest-security-event-type--form_submission {
    background: #46b450;
}

.formnest-security-event-type--security_violation {
    background: #dc3232;
}

.formnest-security-event-type--form_created {
    background: #0073aa;
}

.formnest-security-event-type--form_updated {
    background: #00a0d2;
}

.formnest-security-event-type--form_deleted {
    background: #ff6600;
}

.formnest-security-event-type--settings_updated {
    background: #826eb4;
}

.formnest-security-event-type--submission_deleted {
    background: #dc3232;
}

.formnest-security-event-type--security_log_cleared {
    background: #333;
}

/* Submit Button Settings Styles */
.formnest-submit-settings-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.formnest-submit-settings-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.formnest-submit-section .form-table {
    margin-bottom: 20px;
}

.formnest-submit-preview-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    margin-top: 15px;
}

.formnest-submit-preview-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.formnest-submit-preview {
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    display: inline-block;
}

.formnest-submit-preview input[type="submit"] {
    margin: 0;
}

#formnest-update-submit-preview {
    margin-top: 10px;
}

.formnest-mail-section.formnest-disabled input:not([type="checkbox"]),
.formnest-mail-section.formnest-disabled textarea {
    background-color: #f6f7f7;
    color: #8c8f94;
}

/* Readonly mail fields styling */
.formnest-mail-section input.formnest-readonly,
.formnest-mail-section textarea.formnest-readonly {
    background-color: #f6f7f7;
    color: #8c8f94;
    border-color: #dcdcde;
}

.formnest-mail-section input[type="checkbox"]:checked+label {
    color: #0073aa;
    font-weight: 500;
}

/* Custom CSS Settings */
.formnest-form-settings textarea.code,
.formnest-custom-css-section textarea.code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    tab-size: 4;
    color: #32373c;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.formnest-form-settings textarea.code:focus,
.formnest-custom-css-section textarea.code:focus {
    background-color: #fff;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.formnest-custom-css-section {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.formnest-custom-css-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
}

.formnest-custom-css-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.formnest-custom-css-description {
    margin: 0;
}

.formnest-custom-css-description p.description {
    margin: 5px 0;
    color: #666;
    font-size: 13px;
}

.formnest-custom-css-description code {
    background: #fff;
    padding: 2px 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    color: #d63638;
}

.formnest-custom-css-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Form Flow Settings */
.formnest-flow-settings-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.formnest-flow-settings-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.formnest-flow-section .form-table {
    margin-bottom: 20px;
}

.formnest-confirmation-url-row {
    display: table-row;
}

.formnest-flow-preview-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    margin-top: 15px;
}

.formnest-flow-preview-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #333;
}

.formnest-flow-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.formnest-flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    min-width: 100px;
    text-align: center;
    transition: all 0.3s ease;
}

.formnest-flow-step--disabled {
    background: #f6f7f7;
    border-color: #ddd;
    opacity: 0.6;
}

.formnest-flow-step--input {
    border-color: #46b450;
}

.formnest-flow-step--confirm {
    border-color: #ffb900;
}

.formnest-flow-step--complete {
    border-color: #0073aa;
}

.formnest-flow-step-number {
    display: block;
    width: 24px;
    height: 24px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    line-height: 24px;
    margin-bottom: 5px;
}

.formnest-flow-step--input .formnest-flow-step-number {
    background: #46b450;
}

.formnest-flow-step--confirm .formnest-flow-step-number {
    background: #ffb900;
}

.formnest-flow-step--disabled .formnest-flow-step-number {
    background: #8c8f94;
}

.formnest-flow-step-label {
    font-size: 13px;
    font-weight: 600;
    color: #23282d;
    margin-bottom: 2px;
}

.formnest-flow-step--disabled .formnest-flow-step-label {
    color: #8c8f94;
}

.formnest-flow-step-status {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.formnest-flow-arrow {
    font-size: 18px;
    color: #666;
    font-weight: bold;
    margin: 0 5px;
}

/* Responsive flow preview */
@media (max-width: 768px) {
    .formnest-flow-preview {
        flex-direction: column;
        align-items: stretch;
    }

    .formnest-flow-step {
        margin: 5px 0;
    }

    .formnest-flow-arrow {
        transform: rotate(90deg);
        margin: 5px 0;
        align-self: center;
    }
}

/* IP Blocking Settings */
.formnest-ip-blocking-settings {
    display: table-row;
}

.formnest-ip-test-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.formnest-ip-test-container input[type="text"] {
    flex: 1;
    min-width: 200px;
}

#ip-test-result .notice {
    margin: 0;
    padding: 8px 12px;
}

#ip-test-result .notice p {
    margin: 0;
    font-size: 13px;
}

.formnest-ip-test-container button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* IP blocking textarea styling */
#blocked_ip_addresses,
#ip_whitelist {
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
}

#blocked_ip_addresses:focus,
#ip_whitelist:focus {
    background: #fff;
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Responsive IP test container */
@media (max-width: 768px) {
    .formnest-ip-test-container {
        flex-direction: column;
        align-items: stretch;
    }

    .formnest-ip-test-container input[type="text"] {
        min-width: auto;
        margin-bottom: 10px;
    }
}

#formnest-preview-css {
    margin-top: 10px;
}

#formnest-preview-css .dashicons {
    margin-right: 5px;
}

/* Field Settings Modal */
.formnest-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.formnest-modal.show {
    display: flex;
}

.formnest-modal-content {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.formnest-modal-content .form-table {
    margin-top: 0;
}

.formnest-modal-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 6px 6px 0 0;
    position: relative;
}

.formnest-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.formnest-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.formnest-modal-close:hover {
    background: #f0f0f0;
    color: #666;
}

.formnest-modal-body {
    padding: 20px;
}

.formnest-modal-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 6px 6px;
    text-align: right;
}

.formnest-modal-footer .button {
    margin-left: 10px;
}

@media (max-width: 768px) {
    .formnest-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* CSS Preview Modal */
.formnest-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.formnest-modal-dialog {
    background: #fff;
    border-radius: 4px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    position: relative;
}

.formnest-modal-large {
    width: 900px;
}

.formnest-modal-dialog .formnest-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.formnest-modal-overlay .formnest-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.formnest-modal-overlay .formnest-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
}

.formnest-modal-overlay .formnest-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.formnest-modal-overlay .formnest-modal-close:hover {
    background-color: #ddd;
    color: #000;
}

.formnest-modal-overlay .formnest-modal-body {
    padding: 20px;
    flex: 1;
    overflow: auto;
}

.formnest-modal-overlay .formnest-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background: #f1f1f1;
    text-align: right;
}

.formnest-css-preview-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.formnest-css-preview-form {
    padding: 20px;
    background: #fff;
}

.formnest-css-preview-form .formnest-form-fields {
    margin-bottom: 20px;
}

.formnest-css-preview-form .formnest-field {
    margin-bottom: 15px;
}

.formnest-css-preview-form .formnest-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #23282d;
}

.formnest-css-preview-form .formnest-required {
    color: #d63638;
}

.formnest-css-preview-form .formnest-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.formnest-css-preview-form .formnest-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.formnest-css-preview-form .formnest-form-submit {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.formnest-css-preview-form .formnest-submit-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.formnest-css-preview-form .formnest-submit-button:hover {
    background: #005a87;
}

.formnest-css-preview-form .formnest-radio-label,
.formnest-css-preview-form .formnest-checkbox-label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
}

.formnest-css-preview-form .formnest-radio,
.formnest-css-preview-form .formnest-checkbox {
    margin-right: 8px;
    width: auto;
}

/* Responsive modal */
@media (max-width: 768px) {
    .formnest-modal-large {
        width: 95%;
        height: 95%;
    }

    .formnest-modal-overlay .formnest-modal-header,
    .formnest-modal-overlay .formnest-modal-body,
    .formnest-modal-overlay .formnest-modal-footer {
        padding: 15px;
    }

    .formnest-css-preview-form {
        padding: 15px;
    }
}

/* Auto-updated mail template feedback */
.formnest-auto-updated {
    background-color: #ffffcc !important;
    border-color: #ffd700 !important;
    transition: all 0.3s ease;
}

.formnest-auto-updated:focus {
    background-color: #ffffff !important;
    border-color: #007cba !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .formnest-auto-updated {
        transition: none !important;
    }
}

@media (prefers-contrast: high) {
    .formnest-auto-updated {
        background-color: #ffff00 !important;
        border-color: #000000 !important;
    }
}

/* Mail template update buttons */
.formnest-update-mail-template {
    margin-top: 5px !important;
    font-size: 13px;
    line-height: 1.4;
    padding: 4px 8px;
    min-height: auto;
}

.formnest-update-mail-template .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-top;
    margin-right: 3px;
}

.formnest-update-mail-template:hover {
    background-color: #f6f7f7;
    border-color: #0073aa;
    color: #0073aa;
}

.formnest-update-mail-template:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mail template section styling */
.formnest-mail-section td {
    position: relative;
}

.formnest-mail-section .formnest-update-mail-template {
    display: block;
    width: fit-content;
}

/* HTML Structure Settings */
.formnest-html-structure-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

.formnest-html-structure-group label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 500;
}

.formnest-html-structure-group select,
.formnest-html-structure-group input[type="text"] {
    min-width: 120px;
}

.formnest-html-structure-group input[type="checkbox"] {
    margin-right: 5px;
}

/* Help Link Styles */
.formnest-help-link {
    display: inline-flex;
    align-items: center;
    color: #2271b1;
    text-decoration: none;
    font-size: 13px;
    margin-top: 8px;
    transition: color 0.2s ease;
}

.formnest-help-link:hover {
    color: #135e96;
    text-decoration: underline;
}

.formnest-help-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

/* Tooltip Styles */
.formnest-field-type {
    position: relative;
}

.formnest-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1d2327;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    max-width: 250px;
    white-space: normal;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.formnest-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1d2327;
}

.formnest-field-type:hover .formnest-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Tooltip positioning adjustments */
.formnest-field-type:nth-child(odd) .formnest-tooltip {
    left: auto;
    right: 0;
    transform: none;
}

.formnest-field-type:nth-child(odd) .formnest-tooltip::after {
    left: auto;
    right: 20px;
    transform: none;
}

.formnest-field-type:nth-child(even) .formnest-tooltip {
    left: 0;
    transform: none;
}

.formnest-field-type:nth-child(even) .formnest-tooltip::after {
    left: 20px;
    transform: none;
}

/* Responsive tooltip adjustments */
@media (max-width: 768px) {
    .formnest-tooltip {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        white-space: normal;
        z-index: 10000;
    }

    .formnest-tooltip::after {
        display: none;
    }

    .formnest-field-type:nth-child(odd) .formnest-tooltip,
    .formnest-field-type:nth-child(even) .formnest-tooltip {
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .formnest-field-type:nth-child(odd) .formnest-tooltip::after,
    .formnest-field-type:nth-child(even) .formnest-tooltip::after {
        display: none;
    }
}

/* Mobile tooltip show class */
.formnest-tooltip.formnest-show {
    opacity: 1;
    visibility: visible;
}

/* フィールドタイプタブ */
.formnest-field-tabs {
    display: flex;
    border-bottom: 1px solid #c3c4c7;
    margin-bottom: 15px;
    background: #f6f7f7;
    border-radius: 4px 4px 0 0;
}

.formnest-tab-button {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #646970;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.formnest-tab-button:hover {
    background: #f0f0f1;
    color: #1d2327;
}

.formnest-tab-button.formnest-tab-active {
    background: #fff;
    color: #007cba;
    border-bottom-color: #007cba;
}

.formnest-tab-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.formnest-tab-content {
    display: none;
}

.formnest-tab-content.formnest-tab-active {
    display: block;
}

/* テンプレート */
.formnest-templates {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formnest-template {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.formnest-template:hover {
    border-color: #007cba;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.1);
}

.formnest-template__icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7f7;
    border-radius: 4px;
    flex-shrink: 0;
}

.formnest-template__info {
    flex: 1;
    min-width: 0;
}

.formnest-template__name {
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 4px;
    font-size: 14px;
}

.formnest-template__description {
    color: #646970;
    font-size: 12px;
    line-height: 1.4;
}

.alignright.actions p.search-box {
    margin: 0;
}

.formnest-test-email-wrapper {
    display: inline-block;
}

.formnest-test-email-wrapper input[type="email"] {
    width: 100%;
}

.formnest-test-email-error {
    display: block;
    color: #d63638;
    font-size: 12px;
    margin-top: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .formnest-field-tabs {
        flex-direction: column;
        border-bottom: none;
        border-radius: 4px;
    }

    .formnest-tab-button {
        border-bottom: 1px solid #c3c4c7;
        border-right: none;
        border-radius: 0;
    }

    .formnest-tab-button:first-child {
        border-radius: 4px 4px 0 0;
    }

    .formnest-tab-button:last-child {
        border-radius: 0 0 4px 4px;
        border-bottom: none;
    }

    .formnest-tab-button.formnest-tab-active {
        border-bottom-color: #007cba;
    }

    .formnest-template {
        padding: 12px;
    }

    .formnest-template__icon {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .formnest-template__name {
        font-size: 13px;
    }

    .formnest-template__description {
        font-size: 11px;
    }
}

.formnest-submissions-filters {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.formnest-filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.formnest-bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.formnest-filter-row label[for="form_filter"] {
    margin-left: 16px;
}

.wp-list-table+.formnest-bulk-actions {
    margin-top: 24px;
}

table.formnest-form-table {
    width: 100%;
    border-collapse: collapse;
}

th.formnest-form-label {
    width: 30%;
    padding: 15px 10px 15px 0;
    text-align: left;
    vertical-align: top;
    font-weight: bold;
    color: #333;
}

.formnest-form-real-preview-content {
    padding: 15px;
}

.formnest-form-real-preview-content .formnest-form-field {
    border: none;
    background: none;
    box-shadow: none;
    margin: 0;
    padding: 10px 0;
}

/* Character Restrictions Styles */
.formnest-character-restrictions {
    margin: 0;
}

.formnest-charset-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.formnest-charset-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.formnest-charset-option:hover {
    background: #f0f0f0;
    border-color: #0073aa;
}

.formnest-charset-option input[type="checkbox"] {
    margin-right: 8px;
    margin-bottom: 0;
}

.formnest-charset-option input[type="checkbox"]:checked+.formnest-charset-label {
    color: #0073aa;
    font-weight: 500;
}

.formnest-charset-option:has(input[type="checkbox"]:checked) {
    background: #e7f3ff;
    border-color: #0073aa;
}

.formnest-charset-label {
    font-size: 13px;
    line-height: 1.4;
    user-select: none;
}

/* Length Input Validation Styles */
.formnest-length-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.formnest-length-input.formnest-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

.formnest-field-error {
    color: #dc3232;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.formnest-field-error:not(:empty) {
    display: block !important;
}

/* Field Settings Error Message */
.formnest-settings-error {
    background: #dc3232 !important;
    color: white !important;
    padding: 12px 16px !important;
    margin: 15px 0 !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(220, 50, 50, 0.2) !important;
    border-left: 4px solid #a00 !important;
}

.formnest-settings-error::before {
    content: "⚠️ ";
    margin-right: 8px;
}

/* Force Close Button */
.formnest-force-close-modal {
    background: #dc3232 !important;
    color: white !important;
    border-color: #dc3232 !important;
}

.formnest-force-close-modal:hover {
    background: #a00 !important;
    border-color: #a00 !important;
    color: white !important;
}

/* Disabled Field Type Styles */
.formnest-field-type.formnest-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f5f5f5;
    border-color: #ddd;
}

.formnest-field-type.formnest-disabled .formnest-field-type__icon {
    opacity: 0.5;
}

.formnest-field-type.formnest-disabled .formnest-field-type__label {
    color: #999;
}

.formnest-field-type.formnest-disabled:hover {
    background-color: #f5f5f5;
    border-color: #ddd;
    transform: none;
    box-shadow: none;
}

/* ================================================================
   Validation Badges Styles for Field Preview
   Added: 2025-10-19
   Purpose: Show validation settings in admin form builder preview
   ================================================================ */

/* Badge container */
.formnest-validation-badges {
    margin-top: 8px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    display: none !important;
}

/* Base badge style */
.formnest-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1.4;
}

/* Charset badges (Text/Textarea) */
.formnest-badge-charset {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

/* Length badges (Text/Textarea minlength/maxlength) */
.formnest-badge-length {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* Number badges (Number field min/max/step) */
.formnest-badge-number {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffb74d;
}

/* Date badges (Date field min/max) */
.formnest-badge-date {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #81c784;
}

/* Format badges (Date format: 年月日時間) */
.formnest-badge-format {
    background-color: #e0f2f1;
    color: #00695c;
    border: 1px solid #4db6ac;
}

/* File badges (File field max_size/extensions) */
.formnest-badge-file {
    background-color: #fce4ec;
    color: #c2185b;
    border: 1px solid #f48fb1;
}

/* Match badges (Email Confirm match_field) */
.formnest-badge-match {
    background-color: #fff9c4;
    color: #f57f17;
    border: 1px solid #fff59d;
}

/* Auto badges (Postal Code auto_address) */
.formnest-badge-auto {
    background-color: #e1f5fe;
    color: #0277bd;
    border: 1px solid #81d4fa;
}

/* Hover effect for all badges */
.formnest-badge:hover {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* Mobile responsive */
@media screen and (max-width: 782px) {
    .formnest-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .formnest-validation-badges {
        gap: 3px !important;
    }
}

/* Dark mode support (WordPress 5.7+) */
@media (prefers-color-scheme: dark) {
    .formnest-badge-charset {
        background-color: #1e3a5f;
        color: #90caf9;
        border-color: #1565c0;
    }

    .formnest-badge-length {
        background-color: #3a1e47;
        color: #ce93d8;
        border-color: #6a1b9a;
    }

    .formnest-badge-number {
        background-color: #4a2c1a;
        color: #ffb74d;
        border-color: #e65100;
    }

    .formnest-badge-date {
        background-color: #1e3a1e;
        color: #81c784;
        border-color: #2e7d32;
    }

    .formnest-badge-format {
        background-color: #1a3a38;
        color: #4db6ac;
        border-color: #00695c;
    }

    .formnest-badge-file {
        background-color: #4a1e32;
        color: #f48fb1;
        border-color: #ad1457;
    }

    .formnest-badge-match {
        background-color: #4a4a1a;
        color: #fff59d;
        border-color: #f57f17;
    }

    .formnest-badge-auto {
        background-color: #1a3a4a;
        color: #81d4fa;
        border-color: #01579b;
    }
}

/* Print styles - hide badges when printing */
@media print {
    .formnest-validation-badges {
        display: none !important;
    }
}

/* ========================================
   Form Editor - URL Validation & Settings
   ======================================== */

/* Required Field Highlighting */
.formnest-required-field {
    background-color: #fffbf0;
}

.formnest-required-mark {
    font-weight: bold;
    margin-left: 3px;
}

/* URL Validation Error Styling */
.formnest-url-validation-error ul {
    margin: 10px 0;
    padding-left: 20px;
}

.formnest-url-validation-error li {
    list-style: disc;
}

/* Button Settings Styling */
.formnest-button-settings-section,
.formnest-advanced-button-settings,
.formnest-confirmation-screen-settings {
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.formnest-button-settings-section h4,
.formnest-advanced-button-settings h4,
.formnest-confirmation-screen-settings h4 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    color: #23282d;
}

.formnest-advanced-button-settings h4,
.formnest-confirmation-screen-settings h4 {
    display: flex;
    align-items: center;
    user-select: none;
}

.formnest-advanced-button-settings h4:hover,
.formnest-confirmation-screen-settings h4:hover {
    color: #0073aa;
}

.formnest-advanced-button-settings .dashicons,
.formnest-confirmation-screen-settings .dashicons {
    margin-right: 8px;
    font-size: 18px;
}

.formnest-advanced-button-settings .dashicons-arrow-down {
    transform: rotate(90deg);
}

.formnest-confirmation-screen-settings .dashicons-arrow-down {
    transform: rotate(90deg);
}