/**Tab'd event display style*/
.tab {
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
}

    .tab button {
        background-color: inherit;
        float: left;
        border: none;
        outline: none;
        cursor: pointer;
        padding: 14px 16px;
        transition: 0.3s;
    }

        .tab button:hover {
            background-color: #ddd;
        }

        .tab button.active {
            background-color: #ccc;
        }

.tabcontent {
    display: none;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-top: none;
}

.hiddenTags {
    display:none;
}

input[list] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="gray"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

    input[list]:focus {
        border-color: #0073aa;
        box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
    }

#sortable-settings {
    padding: 0;
    margin: 0;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 10px; 
    padding: 8px;
    border: 1px solid #ddd;
    background: #fff;
    margin-bottom: 5px;
    cursor: grab;
}

    .sortable-item .drag-handle {
        cursor: grab;
        padding: 5px;
        font-size: 18px;
        user-select: none;
    }

    .sortable-item label {
        white-space: nowrap; 
        min-width: 150px; 
        text-align: left;
    }

    .sortable-item input {
        flex-grow: 1; 
        max-width: 100%;
    }

.agile-style-section,
.agile-content-section,
.agile-theme-section,
.agile-advanced-section,
.agile-credentials-section {
    margin-top: 20px;
}

.agile-style-intro,
.agile-content-intro,
.agile-theme-intro,
.agile-advanced-intro,
.agile-credentials-intro,
.agile-theme-mapping-intro,
.agile-config-intro {
    font-size: 14px;
    color: #646970;
    margin-bottom: 20px;
    line-height: 1.6;
}

.agile-style-intro,
.agile-config-intro,
.agile-advanced-intro {
    margin-bottom: 25px;
}

.agile-theme-mapping-intro {
    margin-bottom: 15px;
    font-style: italic;
}

.agile-card-base {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.agile-card-base:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.agile-utility-card,
.agile-content-card,
.agile-theme-card,
.agile-theme-mapping-card {
}

.agile-utility-card,
.agile-content-card,
.agile-theme-card,
.agile-theme-mapping-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.agile-utility-card:hover,
.agile-content-card:hover,
.agile-theme-card:hover,
.agile-theme-mapping-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.agile-card-header-base {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.agile-utility-card-header,
.agile-content-card-header,
.agile-theme-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.agile-utility-card-header {
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.agile-card-icon-base {
    width: 24px;
    height: 24px;
    color: #2271b1;
    flex-shrink: 0;
}

.agile-utility-card-header .icon,
.agile-content-card-header .icon,
.agile-theme-card-header .icon {
    width: 24px;
    height: 24px;
    color: #2271b1;
    flex-shrink: 0;
}

.agile-utility-card-header .icon {
    fill: #2271b1;
    margin-right: 10px;
}

.agile-card-title-base {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
}

.agile-utility-card-header h3,
.agile-content-card-header h3,
.agile-theme-card-header h2,
.agile-theme-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
}

.agile-utility-card-header h3 {
    font-size: 16px;
}

/* Style the advanced explainer when inside the card */
.agile-utility-card .agile-advanced-intro {
    margin-top: 0;
    margin-bottom: 15px;
    padding-top: 0;
    font-size: 14px;
    color: #646970;
    line-height: 1.6;
}

.agile-btn-base {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    outline: none;
}

.agileLink {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border: 2px solid #0056b3;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

    .agileLink:hover {
        background-color: #0056b3;
        border-color: #004080;
        box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
        transform: translateY(-2px);
    }

    .agileLink:focus {
        outline: 2px solid #3498db;
    }

.agilebutton {
    background: linear-gradient(135deg, #6e7dff, #7f8eff);
    border: none;
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

    .agilebutton:hover {
        background: linear-gradient(135deg, #5e6eff, #6f7eff);
        transform: translateY(-2px);
    }

    .agilebutton:active {
        transform: translateY(2px);
    }

    .agilebutton:focus {
        outline: none;
    }

.agile-preset-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    color: #23282d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agile-preset-btn:hover:not(:disabled) {
    background: #f6f7f7;
    border-color: #2271b1;
    color: #2271b1;
}

.agile-preset-btn:focus {
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
    border-color: #2271b1;
}

.agile-preset-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.agile-input-base {
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    color: #23282d;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.agile-input-base:hover {
    border-color: #2271b1;
}

.agile-input-base:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

#agile_options_theme .form-table select,
#agile_options_theme .form-table input[type="text"],
#agile_options_theme .form-table input[type="number"],
#agile_options_advanced .form-table input[type="text"],
#agile_options_advanced .form-table input[type="number"],
#agile_options_credentials .form-table input[type="text"],
#agile_options_credentials .form-table input[type="password"],
#custom-fields-table input[type="text"],
#custom-term-table input[type="text"],
#custom-fields-table select,
#custom-term-table select,
.agile-config-fields select,
.agile-theme-mapping-fields .form-table select {
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    color: #23282d;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#agile_options_theme .form-table select:hover,
#agile_options_theme .form-table input[type="text"]:hover,
#agile_options_theme .form-table input[type="number"]:hover,
#agile_options_advanced .form-table input[type="text"]:hover,
#agile_options_advanced .form-table input[type="number"]:hover,
#agile_options_credentials .form-table input[type="text"]:hover,
#agile_options_credentials .form-table input[type="password"]:hover,
#custom-fields-table input[type="text"]:hover,
#custom-term-table input[type="text"]:hover,
#custom-fields-table select:hover,
#custom-term-table select:hover,
.agile-config-fields select:hover,
.agile-theme-mapping-fields .form-table select:hover {
    border-color: #2271b1;
}

#agile_options_theme .form-table select:focus,
#agile_options_theme .form-table input[type="text"]:focus,
#agile_options_theme .form-table input[type="number"]:focus,
#agile_options_advanced .form-table input[type="text"]:focus,
#agile_options_advanced .form-table input[type="number"]:focus,
#agile_options_credentials .form-table input[type="text"]:focus,
#agile_options_credentials .form-table input[type="password"]:focus,
#custom-fields-table input[type="text"]:focus,
#custom-term-table input[type="text"]:focus,
#custom-fields-table select:focus,
#custom-term-table select:focus,
.agile-config-fields select:focus,
.agile-theme-mapping-fields .form-table select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

#agile_options_theme .form-table select {
    width: 100%;
    max-width: 400px;
}

#agile_options_advanced .form-table input[type="text"],
#agile_options_advanced .form-table input[type="number"] {
    width: 100%;
    max-width: 300px;
}

#agile_options_credentials .form-table input[type="text"],
#agile_options_credentials .form-table input[type="password"] {
    width: 100%;
    max-width: 400px;
}

#custom-fields-table input[type="text"],
#custom-term-table input[type="text"],
#custom-fields-table select,
#custom-term-table select {
    width: 100%;
}

.agile-config-fields select {
    min-width: 200px;
}

.agile-theme-mapping-fields .form-table select {
    width: 100%;
    max-width: 400px;
}


.agile-style-editor-wrapper {
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.agile-style-editor-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

.agile-style-editor-wrapper .agile-style-editor-layout {
    width: 100%;
}

.ace-editor-container {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    margin-top: 20px;
}

.agile-style-editor-wrapper .ace-editor-container {
    flex: 1 1 auto;
    min-width: 925px;
}

.ace-editor-tab {
    background: linear-gradient(to bottom, #f8f9fa 0%, #f6f7f7 100%);
    color: #23282d;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 20px;
    border-bottom: 2px solid #ddd;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    top: 0;
    left: 0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    transition: background 0.2s ease;
}

.ace-editor-icon {
    width: 16px;
    height: 16px;
    color: #2271b1;
    flex-shrink: 0;
}

.ace-editor-tab span {
    color: #23282d;
}

#ace-editor {
    width: 100% !important;
    height: 600px !important;
    min-height: 600px;
    font-size: 14px;
}

.agile-style-editor-wrapper #ace-editor {
    height: 800px !important;
    min-height: 800px;
}

#agile_options_style .ace-editor-container {
    background: #2b2b2b;
    border-color: #444;
}

#agile_options_style .ace-editor-tab {
    background: #1e1e1e;
    border-bottom-color: #444;
    color: #ddd;
}

#agile_options_style .ace-editor-tab span {
    color: #ddd;
}

#agile_options_style .ace-editor-icon {
    color: #2271b1;
}

.agile-style-presets-container {
    flex: 0 0 200px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.agile-style-presets-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.agile-style-presets-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
}

.agile-style-presets-disclaimer {
    margin-bottom: 16px;
    padding: 12px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.agile-style-presets-disclaimer p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #856404;
}

.agile-style-presets-disclaimer strong {
    color: #856404;
}

.agile-style-presets-warning {
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    border-radius: 4px;
}

.agile-style-presets-warning p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #721c24;
}

.agile-style-presets-warning strong {
    color: #721c24;
}

.agile-style-presets-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.agile-content-builder-wrapper {
    margin-top: 20px;
}

.agile-content-builder-title {
    font-size: 15px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 12px 0;
}

.agile-content-builder {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.agile-builder-palette {
    flex: 0 0 200px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    background: #fff;
}

.agile-builder-palette-title {
    font-weight: 600;
    font-size: 13px;
    color: #23282d;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.agile-builder-palette .agile-block {
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 6px;
    cursor: grab;
    font-size: 13px;
    color: #23282d;
    background: #f9f9f9;
    transition: all 0.2s;
}

.agile-builder-palette .agile-block:hover {
    background: #f0f0f0;
    border-color: #2271b1;
    border-style: solid;
}

.agile-builder-palette .agile-block:last-child {
    margin-bottom: 0;
}

.agile-builder-canvas {
    flex: 1;
    min-height: 140px;
    border: 2px dashed #bbb;
    border-radius: 6px;
    background: #fafafa;
    padding: 12px;
}

.agile-builder-canvas-placeholder {
    color: #646970;
    font-size: 13px;
    font-style: italic;
}

.agile-content-media-table {
    margin-top: 20px;
}

.agile-content-media-table th {
    font-weight: 600;
    color: #23282d;
    padding: 12px 0;
}

.agile-content-media-table td {
    padding: 12px 0;
}

.agile-info-box-base {
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    line-height: 1.5;
}

.agile-info-box-warning {
    background-color: #fff3cd;
    border-left: 4px solid #dba617;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
}

.agile-info-box-warning-title {
    margin-top: 0;
    color: #856404;
    font-size: 16px;
    font-weight: 600;
}

.agile-info-box-example {
    background-color: #fff;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.agile-info-box {
    display: none;
    background-color: #f0f7ff;
    border-left: 4px solid #2271b1;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
}

.agile-info-box-title {
    margin-top: 0;
    color: #2271b1;
    font-size: 16px;
    font-weight: 600;
}

.agile-info-box-text {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #23282d;
}

.agile-info-box-subtitle {
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
}

.agile-info-box-list {
    margin: 8px 0;
    padding-left: 20px;
    line-height: 1.6;
    color: #23282d;
}

.agile-info-box-list li {
    margin-bottom: 8px;
}

#agile_options_credentials .agile-info-box {
    margin-top: 12px;
}

.agile-info-box-image {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.agile-theme-mapping-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

#agile_options_theme .agile-theme-card,
#agile_options_theme .agile-theme-mapping-card {
    clear: both;
    margin-left: 0 !important;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    float: none;
}

#agile_options_theme .form-table {
    margin-left: 0;
    padding-left: 0;
    margin-top: 20px;
    width: 100%;
}

#agile_options_theme .form-table tr:has(.agile-theme-card),
form[action="options.php"] .form-table tr:has(.agile-theme-card) {
    display: block;
}

#agile_options_theme .form-table tr:has(.agile-theme-card) th,
form[action="options.php"] .form-table tr:has(.agile-theme-card) th {
    display: none;
}

#agile_options_theme .form-table tr:has(.agile-theme-card) td,
form[action="options.php"] .form-table tr:has(.agile-theme-card) td {
    display: block;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

@supports selector(:has(*)) {
    #agile_options_theme .form-table:has(.agile-theme-card),
    form[action="options.php"] .form-table:has(.agile-theme-card) {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}

#agile_options_theme .form-table + .agile-theme-card,
#agile_options_theme .agile-theme-card {
    margin-left: 0 !important;
}

#agile_options_theme .form-table th,
#agile_options_theme .form-table td {
    padding-left: 0;
}

#agile_options_theme .form-table th {
    font-weight: 600;
    color: #23282d;
    padding: 12px 0;
    width: 200px;
}

#agile_options_theme .form-table td {
    padding: 12px 0;
}

#agile_options_theme .form-table tr.agile-theme-card-row {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

#agile_options_theme .form-table tr.agile-theme-card-row th {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

#agile_options_theme .form-table tr.agile-theme-card-row td {
    display: block;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none;
    max-width: 100%;
}

.agile-code-example {
    background-color: #fff;
    padding: 12px;
    border-radius: 4px;
    margin: 8px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
}

.agile-code-example pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #23282d;
    line-height: 1.5;
}

#function-editor-container {
    margin-top: 20px;
}

#function-editor-textarea {
    height: 500px;
    width: 100%;
}


#agile_options_theme table.agile-theme-card-table,
form[action="options.php"] table.agile-theme-card-table {
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    margin-top: 20px;
}

@supports selector(:has(*)) {
    #agile_options_theme .form-table:has(.agile-theme-card),
    form[action="options.php"] .form-table:has(.agile-theme-card) {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        margin-top: 20px;
    }
}

#custom-fields-table,
#custom-term-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

#custom-fields-table thead,
#custom-term-table thead {
    background: #f6f7f7;
}

#custom-fields-table th,
#custom-term-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #23282d;
    border-bottom: 2px solid #ddd;
}

#custom-fields-table td,
#custom-term-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

#meta-add-field,
#term-add-field {
    margin-top: 15px;
}

.agile-theme-mapping-card {
    margin-bottom: 20px;
}

.agile-theme-mapping-fields {
    margin-top: 15px;
}

.agile-theme-mapping-fields .form-table {
    margin: 0;
    border: none;
    width: 100%;
}

.agile-theme-mapping-fields .form-table tbody {
    display: block;
}

.agile-theme-mapping-fields .form-table tr {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0 0 20px 0;
    border: none;
    background: transparent;
}

.agile-theme-mapping-fields .form-table tr:last-child {
    margin-bottom: 0;
}

.agile-theme-mapping-fields .form-table th {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 0 12px 0;
    font-weight: 600;
    font-size: 14px;
    color: #23282d;
    border: none;
}

.agile-theme-mapping-fields .form-table th:before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232271b1"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.agile-theme-mapping-fields .form-table td {
    display: block;
    width: 100%;
    padding: 0;
}

.custom-input-container {
    border: 1px solid #ddd;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 
    max-width: 500px; 
    margin: auto; 
}

#agile-builder-palette .agile-block {
    background: #fff;
}

#agile-builder-canvas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agile-canvas-block {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    background: #fff;
    padding: 6px;
}

.agile-canvas-block .drag-handle {
    cursor: grab;
    padding: 4px 6px;
    font-size: 16px;
    user-select: none;
}

.agile-canvas-block .content {
    flex: 1 1 auto;
}

.agile-canvas-block .block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.agile-canvas-block .block-label {
    font-weight: 600;
}

.agile-canvas-block .token-badge code {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    padding: 0 4px;
}

.agile-canvas-block .textless-note {
    font-size: 12px;
    color: #666;
}

.agile-canvas-block .content input[type="text"] {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.agile-canvas-block .content .property-name-input,
.agile-canvas-block .content .template-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}


.agile-utility-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.agile-utility-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.agile-utility-stat:last-child {
    border-bottom: none;
}

.agile-utility-stat-label {
    font-size: 13px;
    color: #646970;
    font-weight: 500;
}

.agile-utility-stat-value {
    font-size: 15px;
    font-weight: 600;
    color: #23282d;
    text-align: right;
}

.agile-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agile-stat-highlight {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1.2;
}

.agile-stat-subtext {
    font-size: 12px;
    color: #8c8f94;
    margin-top: 4px;
}

.agile-utility-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

.agile-utility-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.agile-metric-large {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

.agile-metric-large .value {
    font-size: 36px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1;
    margin-bottom: 8px;
}

.agile-metric-large .label {
    font-size: 13px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agile-utility-card-full-width {
    grid-column: 1 / -1;
}

.agile-utility-status-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.agile-utility-status-item {
    flex: 1;
    min-width: 200px;
}

.agile-utility-stat-label-spacing {
    margin-bottom: 8px;
}

.agile-post-count-created {
    color: #28a745;
}

.agile-post-count-updated {
    color: #007bff;
}

.agile-post-count-deleted {
    color: #dc3545;
}

.agile-utility-stat-total {
    border-top: 2px solid #2271b1;
    margin-top: 10px;
    padding-top: 15px;
}

.agile-utility-stat-label-total {
    font-weight: 600;
    font-size: 14px;
}

.agile-utility-stat-value-total {
    font-size: 18px;
    color: #2271b1;
}


.agile-refresh-buttons-container {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    flex-wrap: wrap;
}

/* Base refresh/webhook button styles */
.agile-action-button-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

.agile-action-button-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.agile-action-button-base:hover::before {
    left: 100%;
}

.agile-action-button-base:hover {
    transform: translateY(-2px);
}

.agile-action-button-base:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.agile-action-button-base:disabled {
    background: linear-gradient(135deg, #8c8f94 0%, #646970 100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.agile-action-button-base:disabled:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.agile-refresh-button {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
    position: relative;
    overflow: hidden;
}

.agile-refresh-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.agile-refresh-button:hover::before {
    left: 100%;
}

.agile-refresh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 113, 177, 0.4);
    background: linear-gradient(135deg, #135e96 0%, #2271b1 100%);
}

.agile-refresh-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.agile-refresh-button:disabled {
    background: linear-gradient(135deg, #8c8f94 0%, #646970 100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.agile-refresh-button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.agile-refresh-button-full {
    background: linear-gradient(135deg, #00a32a 0%, #008a20 100%);
    box-shadow: 0 4px 12px rgba(0, 163, 42, 0.3);
}

.agile-refresh-button-full:hover {
    background: linear-gradient(135deg, #008a20 0%, #00a32a 100%);
    box-shadow: 0 6px 20px rgba(0, 163, 42, 0.4);
}

.agile-refresh-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    animation: none;
    transition: transform 0.3s ease;
}

.agile-refresh-button:hover .agile-refresh-icon {
    transform: rotate(15deg);
}

.agile-refresh-button:active .agile-refresh-icon {
    transform: rotate(30deg);
}

.agile-refresh-button.refreshing .agile-refresh-icon {
    animation: spin 1s linear infinite;
}

.agile-refresh-button-full.refreshing .agile-refresh-icon {
    animation: spin-counter-clockwise 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-counter-clockwise {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

.agile-refresh-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

.agile-refresh-subtitle {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.3;
}

.agile-refresh-button:disabled .agile-refresh-icon,
.agile-refresh-button:disabled .agile-refresh-text,
.agile-refresh-button:disabled .agile-refresh-subtitle {
    opacity: 0.7;
}


.agile-webhook-activation-card {
    padding: 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
}

.agile-webhook-activation-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agile-webhook-description {
    margin: 0;
    font-size: 14px;
    color: #23282d;
    line-height: 1.6;
}

.agile-webhook-note {
    margin: 0;
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
    font-style: italic;
}

.agile-webhook-warning {
    margin: 0;
    padding: 12px 16px;
    background-color: #fff3cd;
    border-left: 4px solid #dba617;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}

.agile-webhook-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

.agile-webhook-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.agile-webhook-button:hover::before {
    left: 100%;
}

.agile-webhook-button-activate {
    background: linear-gradient(135deg, #00a32a 0%, #008a20 100%);
    color: #fff;
}

.agile-webhook-button-activate:hover {
    background: linear-gradient(135deg, #008a20 0%, #00a32a 100%);
    box-shadow: 0 6px 20px rgba(0, 163, 42, 0.4);
    transform: translateY(-2px);
}

.agile-webhook-button-deactivate {
    background: linear-gradient(135deg, #d63638 0%, #b32d2e 100%);
    color: #fff;
}

.agile-webhook-button-deactivate:hover {
    background: linear-gradient(135deg, #b32d2e 0%, #d63638 100%);
    box-shadow: 0 6px 20px rgba(214, 54, 56, 0.4);
    transform: translateY(-2px);
}

.agile-webhook-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.agile-webhook-button:disabled {
    background: linear-gradient(135deg, #8c8f94 0%, #646970 100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.agile-webhook-button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.agile-webhook-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.agile-webhook-button:hover .agile-webhook-icon {
    transform: scale(1.1);
}

.agile-webhook-button-text {
    font-weight: 600;
    letter-spacing: 0.3px;
}


.agile-config-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.agile-config-fields .form-table {
    margin: 0;
    border: none;
    width: 100%;
}

.agile-config-fields .form-table tbody {
    display: block;
}

.agile-config-fields .form-table tr {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
}

.agile-config-fields .form-table th {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 0 12px 0;
    font-weight: 600;
    font-size: 14px;
    color: #23282d;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.agile-config-fields .form-table th:before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232271b1"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.agile-utility-card:has(#agile_field_widget_active) .form-table th:before,
.agile-utility-card:has(#agile_field_widget_target) .form-table th:before,
.agile-utility-card:has(#agile_field_widget_mode) .form-table th:before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232271b1"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>');
}

.agile-config-fields .form-table td {
    display: block;
    width: 100%;
    padding: 0;
}

.agile-config-radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.agile-config-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.agile-config-radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: #2271b1;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid #8c8f94;
    border-radius: 50%;
    background-color: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.agile-config-radio-option input[type="radio"]:checked {
    border-color: #2271b1;
    background-color: #fff;
}

.agile-config-radio-option input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #2271b1;
    display: block;
    margin: 0;
    padding: 0;
}

.agile-config-radio-option input[type="radio"]:hover {
    border-color: #2271b1;
}

.agile-config-radio-option label {
    font-size: 14px;
    color: #23282d;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.agile-config-fields .agile-widget-warning {
    margin-top: 12px;
    padding: 12px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}

.agile-config-fields .agile-widget-warning i {
    color: #dc3545;
    font-style: italic;
}

.agile-config-field-help {
    margin-top: 8px;
    font-size: 13px;
    color: #646970;
    font-style: italic;
    line-height: 1.5;
}


#agile_options_advanced .form-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
    border: none;
}

#agile_options_advanced .form-table tbody {
    display: contents;
}

#agile_options_advanced .form-table tr {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
    margin: 0;
}

#agile_options_advanced .form-table tr:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#agile_options_advanced .form-table th {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 0 15px 0;
    font-weight: 600;
    font-size: 15px;
    color: #23282d;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
}

#agile_options_advanced .form-table th:before {
    content: '';
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232271b1"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

#agile_options_advanced .form-table td {
    display: block;
    width: 100%;
    padding: 0;
}

#agile_options_advanced .agile-config-field-help {
    margin-top: 8px;
    font-size: 13px;
    color: #646970;
    font-style: italic;
    line-height: 1.5;
}


#agile_options_credentials .form-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
    border: none;
}

#agile_options_credentials .form-table tbody {
    display: contents;
}

#agile_options_credentials .form-table tr {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
    margin: 0;
}

#agile_options_credentials .form-table tr:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#agile_options_credentials .form-table th {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 0 15px 0;
    font-weight: 600;
    font-size: 15px;
    color: #23282d;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
}

#agile_options_credentials .form-table th:before {
    content: '';
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232271b1"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

#agile_options_credentials .form-table td {
    display: block;
    width: 100%;
    padding: 0;
}

.agile-password-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 400px;
}

.agile-password-input {
    flex: 1;
}

.agile-password-toggle {
    cursor: pointer;
    width: 24px;
    height: 24px;
    color: #646970;
    transition: color 0.2s;
    flex-shrink: 0;
}

.agile-password-toggle:hover {
    color: #2271b1;
}


.agile_switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.agile_switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.agile_slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
    width: 50px;
    height: 26px;
}

.agile_slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    right: auto;
    background-color: white;
    transition: left 0.3s ease, right 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .agile_slider {
    background-color: #2271b1;
}

input:focus + .agile_slider {
    box-shadow: 0 0 1px #2271b1;
}

input:checked + .agile_slider:before {
    left: auto;
    right: 3px;
}
