input[type=search],
input[type=text] {
    min-width: auto !important;
}

.griffinforms-container th.manage-column {
  white-space: nowrap;
}

th.column-created,
th.column-date_time,
th.column-log_type,
th.column-item_type,
th.column-category,
th.column-author {
    width: 10%;
}

th.column-shortcode {
    width: 15%;
}

th.column-publish {
    width: 9%;
    white-space: nowrap;
}

td.column-publish {
    width: 9%;
    white-space: nowrap;
}

.griffinforms-container .gf-form-publish-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    min-height: 0;
    white-space: nowrap;
    text-decoration: none !important;
}

.griffinforms-container .gf-form-preview-link {
    text-decoration: none !important;
}

.griffinforms-container .gf-preview-form-modal .button.button-primary,
.griffinforms-container .gf-preview-form-modal .button.button-primary:hover,
.griffinforms-container .gf-preview-form-modal .button.button-primary:focus {
    color: #fff !important;
}

.griffinforms-container .gf-preview-form-modal .modal-footer {
    align-items: center;
}

.griffinforms-container .gf-preview-form-modal .gf-preview-form-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.griffinforms-container .gf-form-folder-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    text-decoration: none !important;
}

.griffinforms-container a:not(.button):not(.button-primary):not(.button-link):not(.badge) {
    color: var(--wp-admin-theme-color, #3858e9) !important;
}

.griffinforms-container .badge.text-bg-primary {
    background-color: var(--wp-admin-theme-color, #3858e9) !important;
    color: #fff !important;
}

.griffinforms-container a.griffinforms-delete-list-item.submitdelete:not(.button):not(.button-primary):not(.button-link),
.griffinforms-container a.griffinforms-delete-item:not(.button):not(.button-primary):not(.button-link),
.griffinforms-container a.text-danger:not(.button):not(.button-primary):not(.button-link) {
    color: #b32d2e !important;
}

.griffinforms-container .error a {
    text-decoration: none !important;
}

.griffinforms-container .gf-folder-picker-list-shell {
    max-height: 420px;
    overflow: hidden;
}

.griffinforms-container .gf-folder-picker-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.griffinforms-container .gf-folder-picker-toolbar-search {
    min-width: 0;
}

.griffinforms-container .gf-folder-picker-search-group {
    width: 75%;
}

.griffinforms-container .gf-folder-picker-toolbar-action {
    flex: 0 0 auto;
    padding-bottom: 1.55rem;
}

.griffinforms-container .gf-folder-picker-list {
    max-height: 420px;
    overflow-y: auto;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.griffinforms-container .gf-folder-picker-row {
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) minmax(180px, 1.2fr);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    background: #fff;
    text-align: left;
    box-shadow: none;
}

.griffinforms-container .gf-folder-picker-row:hover,
.griffinforms-container .gf-folder-picker-row:focus {
    background: color-mix(in srgb, var(--wp-admin-theme-color, #3858e9) 6%, #ffffff);
}

.griffinforms-container .gf-folder-picker-row.is-selected {
    background: color-mix(in srgb, var(--wp-admin-theme-color, #3858e9) 8%, #ffffff);
}


.griffinforms-container .gf-folder-picker-row-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.griffinforms-container .gf-folder-picker-row-icon img {
    display: block;
    max-width: 24px;
    max-height: 24px;
}

.griffinforms-container .gf-folder-picker-row-name {
    font-weight: 600;
    color: #1d2327;
    min-width: 0;
}

.griffinforms-container .gf-folder-picker-row-description {
    font-size: 12px;
    line-height: 1.4;
    color: #646970;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.griffinforms-container .gf-folder-picker-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
}

.griffinforms-container .gf-folder-picker-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.griffinforms-container .gf-folder-picker-icon:hover,
.griffinforms-container .gf-folder-picker-icon:focus {
    background: color-mix(in srgb, var(--wp-admin-theme-color, #3858e9) 8%, #ffffff);
}

.griffinforms-container .gf-folder-picker-icon.is-active {
    background: color-mix(in srgb, var(--wp-admin-theme-color, #3858e9) 16%, #ffffff);
}

.griffinforms-container .gf-folder-picker-icon img {
    display: block;
    width: 28px;
    height: 28px;
}

.gf-delete-modal-alert {
    border: 1px solid #f1aeb5;
    background: #f8d7da;
    color: #842029;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.gf-delete-modal-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #f1aeb5;
    background: #fff5f5;
    color: #842029;
    border-radius: 8px;
    padding: 10px;
}

.gf-delete-modal-warning .dashicons {
    margin-top: 1px;
}

.gf-delete-modal-warning-title {
    font-weight: 600;
    line-height: 1.2;
}

.gf-delete-modal-warning-description {
    margin-top: 2px;
    font-size: 12px;
    color: #8a3a44;
}

.gf-delete-modal-message {
    color: #1d2327;
}

.gf-delete-modal-content label[for="gf-also-delete-entries"] {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
}

.gf-delete-modal-content #gf-also-delete-entries {
    margin-top: 3px;
}

.column-colors {
    text-overflow: unset;
    overflow: visible;
    white-space: normal;
    width: 10%;
}

.gf-color-square {
    display: inline-block;
    width: 24px;
    height: 24px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Shortcode button group overrides */
.griffinforms-container .gf-shortcode-group .btn-outline-primary {
    color: #666 !important;
    border-color: #ddd !important;
    background-color: #f9f9f9 !important;
    transition: all 0.2s ease-in-out !important;
}

.griffinforms-container .gf-shortcode-group .btn-outline-primary:hover:not(:disabled) {
    background-color: #ddd !important;
    border-color: #ddd !important;
    color: #333 !important;
}

.griffinforms-container .gf-shortcode-group .btn-outline-primary:active:not(:disabled) {
    background-color: #ddd !important;
    border-color: #ddd !important;
    color: #333 !important;
}

/* AI Drafting Styles */
.gf-wp-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.gf-wp-badge-ai {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    font-size: 10px;
}

.gf-btn-ai-sparkle {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.35) !important;
}

.gf-btn-ai-sparkle:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.45) !important;
}

.gf-btn-ai-sparkle:focus {
    outline: 2px solid #6366f1 !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

.gf-btn-ai-sparkle::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    vertical-align: -2px;
    background-color: currentColor;
    -webkit-mask: center / contain no-repeat url("../images/butler/icons/sparkle.svg");
    mask: center / contain no-repeat url("../images/butler/icons/sparkle.svg");
}
