/* Styles for the Browse Models Page */

/* Hide debug buttons in model listings */
.explorexr-debug-model {
    display: none !important;
}

.explorexr-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.explorexr-search-box {
    display: flex;
    align-items: center;
}

.explorexr-search-box input {
    margin-right: 5px;
    width: 250px;
}

.explorexr-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.explorexr-model-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 350px; /* Set minimum height for consistency */
    justify-content: space-between;
}

.explorexr-model-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.explorexr-no-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background-color: #f5f5f5;
    color: #888;
    border-radius: 4px 4px 0 0;
}

.explorexr-no-preview .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.explorexr-model-info {
    padding: 15px;
}

.explorexr-model-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.explorexr-model-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.explorexr-model-meta span {
    display: flex;
    align-items: center;
}

.explorexr-model-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

/* Model actions container */
.explorexr-model-actions {
    display: flex;
    margin-top: 10px;
}

/* Model action buttons */
.explorexr-model-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2px 8px;
    min-height: 30px;
}

.explorexr-model-actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 2px;
}

.explorexr-usage-tips {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.explorexr-usage-tips h3 {
    margin-top: 0;
}

/* Make model action buttons always visible in Browse Models page */
.admin-page-explorexr-browse-models .explorexr-model-actions {
    opacity: 1 !important; /* Force buttons to always be visible */
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Enhance button appearance */
.admin-page-explorexr-browse-models .explorexr-model-actions button,
.admin-page-explorexr-browse-models .explorexr-model-actions a {
    margin: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 30px;
    padding: 2px 8px;
}

.admin-page-explorexr-browse-models .explorexr-model-actions button:hover,
.admin-page-explorexr-browse-models .explorexr-model-actions a:hover {
    background: #f1f1f1;
    transform: translateY(-2px);
    border-color: #ccc;
}

/* Button icons */
.admin-page-explorexr-browse-models .explorexr-model-actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

/* Show button text */
.admin-page-explorexr-browse-models .explorexr-model-actions button span:not(.dashicons),
.admin-page-explorexr-browse-models .explorexr-model-actions a span:not(.dashicons) {
    display: inline;
}

/* Different colors for different actions */
.admin-page-explorexr-browse-models .view-3d-model .dashicons {
    color: #2AACE2;
}

.admin-page-explorexr-browse-models .copy-shortcode .dashicons {
    color: #2AACE2;
}

.admin-page-explorexr-browse-models .delete-model .dashicons {
    color: #8062AA;
}

/* Ensure model title and details are clearly visible */
.admin-page-explorexr-browse-models .explorexr-model-title {
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    margin-bottom: 8px;
}

.admin-page-explorexr-browse-models .explorexr-model-meta {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #3c434a;
}

.admin-page-explorexr-browse-models .explorexr-model-info {
    border-top: 1px solid #0D152C;
    padding-top: 10px;
    margin-top: 8px;
    font-size: 13px !important;
    color: #3c434a !important;
}

/* Make search and sort controls more visible */
.admin-page-explorexr-browse-models .explorexr-form-group label {
    color: #23282d;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.admin-page-explorexr-browse-models .explorexr-form-group input,
.admin-page-explorexr-browse-models .explorexr-form-group select {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    color: #2c3338;
    font-size: 14px;
}

/* Highlight model ID and other details */
.admin-page-explorexr-browse-models .explorexr-model-info div {
    margin-bottom: 5px;
    font-weight: 500;
}

/* Enhance sorting info visibility */
.admin-page-explorexr-browse-models .explorexr-card-content form {
    background: #f0f7fc;
    padding: 15px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Fix font and visibility on models count display */
.admin-page-explorexr-browse-models .explorexr-admin-container > div:nth-child(3) {
    font-size: 15px !important;
    color: #1d2327 !important;
    background: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Delete button styling */
.explorexr-model-actions .button-link-delete {
    color: #b32d2e;
    border-color: #b32d2e;
}

.explorexr-model-actions .button-link-delete:hover {
    color: #fff;
    background-color: #b32d2e;
}

/* Spinning animation for delete process */
.dashicons.spinning {
    animation: explorexr-spin 2s infinite linear;
}

@keyframes explorexr-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ─── Addon Filter Bar ─── */
.explorexr-addon-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.explorexr-addon-filter-label {
    font-weight: 600;
    font-size: 13px;
    color: #1d2327;
    margin-right: 4px;
}

.explorexr-addon-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #dcdcde;
    border-radius: 16px;
    background: #fff;
    color: #50575e;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.explorexr-addon-filter-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.explorexr-addon-filter-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
    background: #f0f7fc;
}

.explorexr-addon-filter-btn.active {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.explorexr-addon-filter-btn.active .dashicons {
    color: #fff;
}

/* ─── Addon Badges on Model Cards ─── */
.explorexr-model-addon-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.explorexr-addon-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f0f0f1;
    color: #50575e;
    font-size: 11px;
    line-height: 1.4;
}

.explorexr-addon-badge .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
    color: #2271b1;
}
