.tablepresso-preview-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}

.tablepresso-preview-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.tablepresso-preview-card .card-header {
    background-color: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px;
}

.tablepresso-preview-card .card-title {
    font-size: 1.25em;
    font-weight: 600;
    margin: 0;
}

.tablepresso-preview-card .card-body {
    padding: 16px;
}

.tablepresso-preview-card .card-description {
    color: #555;
    font-size: 1em;
    margin: 0;
}

.tablepresso-preview-card .card-footer {
    background-color: #f7f7f7;
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
    text-align: right;
}

.tablepresso-preview-card .load-table-data {
    background-color: #0073aa;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    padding: 10px 16px;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.tablepresso-preview-card .load-table-data:hover {
    background-color: #005a87;
}

/* New Search UI Wrapper */
.stcp-search-wrapper {
    position: fixed;
    visibility: hidden; /* Positioned by JS to prevent flicker */
    z-index: 99998;
    display: flex;
    align-items: center;
}

.stcp-search-fab {
    width: 56px;
    height: 56px;
    background-color: #f0f0f0; /* Grey background */
    border: 1px solid #ccc;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 2;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent shrinking */
}

.stcp-search-fab:hover {
    border-color: #999;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.stcp-search-wrapper.dragging .stcp-search-fab {
    cursor: grabbing;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.stcp-search-fab svg {
    width: 28px;
    height: 28px;
    stroke: #555; /* Dark grey icon stroke */
}

/* Roll-out search container */
.stcp-search-container {
    display: flex;
    align-items: center;
    height: 56px;
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.4s ease, opacity 0.3s ease 0.1s;
    background-color: #f0f0f0;
    border-radius: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-left: -28px; /* Overlap with FAB */
    padding-left: 38px; /* Space for FAB */
    z-index: 1;
}

.stcp-search-wrapper.active .stcp-search-container {
    width: 300px; /* Adjusted width */
    opacity: 1;
    padding-right: 10px;
}

.stcp-search-container input[type="text"] {
    flex-grow: 1;
    height: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1.1em;
    color: #333;
    padding: 0 10px;
}

/* Close button */
.stcp-search-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 2em;
    color: #888;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.stcp-search-close:hover {
    color: #333;
}

/* Styles for the dynamically loaded cards */
.tablepresso-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tablepresso-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    padding: 16px;
    background: #fff;
    transition: box-shadow 0.2s;
}

.tablepresso-card.modern {
    border-left: 6px solid #0073aa;
    background: linear-gradient(90deg, #f7fafd 80%, #e9f5fb 100%);
    box-shadow: 0 8px 16px rgba(0,123,170,0.07);
}

.tablepresso-card.compact {
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.95em;
    box-shadow: none;
    border: 1px solid #bbb;
    background: #fcfcfc;
}


.tablepresso-card .card-field {
    margin-bottom: 8px;
}

.tablepresso-card .card-field-label {
    font-weight: 600;
    color: #333;
}

.tablepresso-card .card-field-value {
    color: #555;
}
