th.column-formpages,
th.column-submissions {
    width: 6% !important;
}

th.column-theme,
th.column-author {
    width: 10% !important;
}

th.column-folder {
    width: 10%;
}

th.column-signals,
td.column-signals {
    width: 140px;
    text-align: center;
}

.gf-forms-signals-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    min-width: 0;
    white-space: nowrap;
}

.gf-forms-signal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.gf-forms-signal img {
    width: 1rem;
    height: 1rem;
    display: block;
    opacity: 0.9;
    filter: brightness(0) saturate(100%);
}

.gf-forms-signal-count {
    display: inline-block;
    min-width: 0;
    margin-left: 0.1rem;
    padding: 0.05rem 0.28rem;
    border-radius: 999px;
    background: #1d2327;
    color: #fff !important;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    vertical-align: super;
}

.gf-forms-signal-placeholder {
    color: #9ca3af;
}

th.column-submissions i {
    animation: flyin-left 2s forwards;
}

@keyframes flyin-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.griffinforms-templates-category-tab-pane {
    overflow: visible;
    max-height: none;
}

#griffinforms-create-form-modal-content {
    height: 650px;
}

#griffinforms-create-form-modal-content .tab-pane {
    min-height: 0;
    overflow: hidden;
}

.gf-create-form-template-layout {
    align-items: flex-start;
}

#griffinforms-create-form-modal-category-list {
    flex: 0 0 170px;
    max-height: 500px;
    display: flex;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable both-edges;
    padding-right: 12px;
    align-self: flex-start;
}

#griffinforms-create-form-modal-category-list .list-group-item {
    width: 100%;
    flex: 0 0 auto;
    margin-right: 2px;
}

#griffinforms-create-form-modal-templates-search-input {
    border-color: #dee2e6 !important;
}

.gf-create-form-template-search-row {
    padding-right: 1rem;
}

.griffinforms-template-card-badge {
    right: 6px;
    top: 6px;
}

#griffinforms-form-templates-container {
    height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    #griffinforms-create-form-modal-content {
        height: 560px;
    }

    #griffinforms-create-form-modal-category-list,
    #griffinforms-form-templates-container {
        height: 420px;
        max-height: 420px;
    }

}

/* Define the popin animation */
@keyframes popin {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

/* Add animation properties to the popin-animation class */
.griffinforms-card-popin-animation {
    animation: popin 0.4s ease-out;
}

.template-card {
    overflow: hidden;
    position: relative;
}

.griffinforms-template-preview {
    height: 120px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease; /* Smooth transition for initial loading */
}

.griffinforms-blank-template-card .griffinforms-template-preview {
    background: linear-gradient(135deg, #eef4ff 0%, #f7fbff 100%);
}

.gf-blank-template-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--wp-admin-theme-color, #3858e9);
}

.gf-template-skeleton-card {
    border: 1px solid #e9edf2;
    background: #fff;
}

.gf-template-skeleton-preview {
    height: 120px;
    border-bottom: 1px solid #eef2f6;
    background: linear-gradient(110deg, #f2f4f7 8%, #e7ebf0 18%, #f2f4f7 33%);
    background-size: 200% 100%;
    animation: gf-skeleton-shimmer 1.2s linear infinite;
}

.gf-template-skeleton-line {
    height: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    background: linear-gradient(110deg, #f2f4f7 8%, #e7ebf0 18%, #f2f4f7 33%);
    background-size: 200% 100%;
    animation: gf-skeleton-shimmer 1.2s linear infinite;
}

.gf-template-skeleton-line-title {
    width: 70%;
    height: 12px;
}

.gf-template-skeleton-line-body {
    width: 92%;
}

.gf-template-skeleton-line-body.short {
    width: 58%;
}

.gf-template-skeleton-button {
    width: 48%;
    height: 26px;
    margin-top: 10px;
    border-radius: 4px;
    background: linear-gradient(110deg, #f2f4f7 8%, #e7ebf0 18%, #f2f4f7 33%);
    background-size: 200% 100%;
    animation: gf-skeleton-shimmer 1.2s linear infinite;
}

@keyframes gf-skeleton-shimmer {
    to {
        background-position-x: -200%;
    }
}

.griffinforms-template-thumbnail {
    transform: scale(0.8); /* Adjust scale for thumbnail sizing */
    transform-origin: top left; /* Keep the scale anchored to the top left */
    width: 125%; /* Slightly larger width to emphasize scale */
    transition: transform 2s ease-in-out; /* Animation for hover scrolling */
}

.griffinforms-form-template-card:hover .griffinforms-template-thumbnail {
    transform: scale(0.8) translateY(-20%); /* Combine scale with upward scroll */
}

/* Style adjustments for input fields */
.griffinforms-template-thumbnail input,
.griffinforms-template-thumbnail textarea,
.griffinforms-template-thumbnail select {
    font-size: 0.8em; /* Smaller font to fit the scaled view */
    padding: 0.2em;
    margin: 0.1em;
}

.griffinforms-template-thumbnail .row {
    font-size: 0.9em;
}

/* Keep template card CTA rows aligned even when descriptions have fewer lines. */
.griffinforms-form-template-card .card-text {
    line-height: 1.4;
    min-height: calc(1.4em * 3);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.griffinforms-form-template-card .card-text[title] {
    cursor: help;
}

.gf-onboarding-empty-state {
    padding: 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gf-onboarding-empty-state-title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.3;
    color: #162034;
}

.gf-onboarding-empty-state-copy {
    max-width: 620px;
    margin: 0 auto 18px;
    width: 100%;
    color: #536277;
    line-height: 1.6;
}

.gf-onboarding-empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.griffinforms-container .gf-onboarding-empty-state-actions a.button.button-primary,
.griffinforms-container .gf-onboarding-empty-state-actions a.button.button-primary:hover,
.griffinforms-container .gf-onboarding-empty-state-actions a.button.button-primary:focus {
    color: #ffffff !important;
}

/* ================= Template Preview Controls ================= */
/* Utility classes used inside preview markup to ensure consistent visuals */
.gf-tp-field {
    margin-bottom: 6px;
}

.gf-tp-control {
    display: block;
    width: 100%;
    font-size: 12px;
    line-height: 1.4;
    padding: 4px 6px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Inputs and selects share same compact height in previews */
.gf-tp-input,
.gf-tp-select {
    height: 30px;
    font-size: 12px !important;
    border-color: #ddd !important;
    border-radius: 4px !important;
}

.gf-tp-textarea {
    min-height: 60px;
    resize: none;
}

/* Normalize date input typography across browsers */
input.gf-tp-date::-webkit-date-and-time-value {
    font-size: 12px;
}

/* Ensure selects inherit uniform styling across browsers */
select.gf-tp-select {
    background-color: #fff;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 12px !important;
}

.gf-tp-option {
    display: flex;
    align-items: center;
    font-size: 12px;
    line-height: 1.4;
    color: #555;
}

.gf-tp-radio-dot {
    display: inline-block;
    width: 10px;
    text-align: center;
    color: #888;
}

.gf-shortcode-group {
    width: 100%;
}

.gf-shortcode-display {
    display: block;
    width: 100%;
    text-align: left;
    font-family: monospace;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.375rem 0.75rem;
    cursor: default;
}

.gf-shortcode-text {
    display: inline-block;
    white-space: nowrap;
    transition: transform 0.3s ease-out;
    letter-spacing: 0 !important;
}

.gf-shortcode-display.scrolling .gf-shortcode-text {
    animation: scrollText 8s linear infinite !important;
    display: inline-block !important;
    transition: none !important;
}

@keyframes scrollText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.gf-shortcode-copy-btn {
    flex-shrink: 0;
}

#griffinforms-create-form-modal-tabs .nav-link {
    margin-bottom: -2px;
    color: #000 !important;
    position: relative;
    border: 0 !important;
    background: transparent !important;
}

#griffinforms-create-form-modal-tabs {
    position: relative;
}

#griffinforms-create-form-modal-tabs .gf-create-form-nav-accent {
    position: absolute;
    bottom: -2px;
    height: 2px;
    width: 0;
    background: var(--wp-admin-theme-color, #3858e9);
    transform: translateX(0);
    transition: transform 280ms ease, width 280ms ease, opacity 120ms ease;
    opacity: 0;
    pointer-events: none;
}

#griffinforms-create-form-modal-tabs .nav-link.active {
    color: var(--wp-admin-theme-color, #3858e9) !important;
}

.griffinforms-container .gf-createfield-modal {
    padding: 0.25rem 0.25rem 0.5rem;
}

.griffinforms-container .gf-createfield-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    background: #fff;
}

.griffinforms-container .gf-createfield-card:hover,
.griffinforms-container .gf-createfield-card:focus-within {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.griffinforms-container .gf-createfield-card .card-body {
    padding: 16px;
    min-height: 100%;
}

.griffinforms-container .gf-createfield-card .card-footer {
    display: flex;
    align-items: end;
}

.griffinforms-container .gf-createfield-card-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.griffinforms-container .gf-createfield-card-icon {
    display: block;
    width: 24px;
    height: 24px;
}

.griffinforms-container .gf-createfield-card .card-title {
    font-size: 15px;
    line-height: 1.3;
    color: #111827;
}

.griffinforms-container .gf-createfield-card .card-text {
    color: #6b7280 !important;
    flex: 1 1 auto;
    margin-bottom: 0 !important;
}

.griffinforms-container .gf-createfield-card .button {
    width: 100%;
    justify-content: center;
}

.griffinforms-container #griffinforms-createfield-modal .modal-dialog {
    margin-top: calc(var(--wp-admin--admin-bar--height, 32px) + 1.5rem);
}

.griffinforms-container #griffinforms-createfield-modal .modal-dialog.modal-dialog-centered {
    align-items: flex-start;
    min-height: calc(100% - calc(var(--wp-admin--admin-bar--height, 32px) + 3rem));
}

.griffinforms-container #griffinforms-createfield-modal {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
    padding-top: 0.75rem;
}

@media (max-width: 575.98px) {
    .griffinforms-container .gf-createfield-card .card-body {
        padding: 14px;
    }
}
