/* ========================================
   Blog Model Embed Styles
   ======================================== */

/* Model Embed Container */
.library-model-embed {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.library-model-embed:hover {
    border-color: rgba(163, 255, 18, 0.3);
    box-shadow: 0 8px 30px rgba(163, 255, 18, 0.1);
}

/* 3D Viewer Section */
.model-embed-viewer {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0C0D10;
    position: relative;
    overflow: hidden;
}

.model-embed-viewer model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
}

/* Thumbnail fallback */
.model-embed-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.model-embed-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(12, 13, 16, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-embed-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay i {
    font-size: 2.5rem;
    color: #A3FF12;
    margin-bottom: 0.5rem;
}

.thumbnail-overlay span {
    color: #fff;
    font-weight: 600;
}

/* Placeholder */
.model-embed-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(163, 255, 18, 0.05), rgba(42, 232, 206, 0.05));
}

.model-embed-placeholder i {
    font-size: 3rem;
    color: rgba(163, 255, 18, 0.5);
    margin-bottom: 0.75rem;
}

.model-embed-placeholder span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Info Section */
.model-embed-info {
    padding: 1.25rem 1.5rem;
}

.model-embed-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
    font-family: 'Space Grotesk', sans-serif;
}

.model-embed-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

/* Action Buttons */
.model-embed-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-view-model,
.btn-download-stl {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view-model {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-view-model:hover {
    border-color: #A3FF12;
    color: #A3FF12;
    background: rgba(163, 255, 18, 0.1);
}

.btn-download-stl {
    background: #A3FF12;
    color: #0C0D10;
    border: none;
}

.btn-download-stl:hover {
    background: #baff4d;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(163, 255, 18, 0.3);
}

/* Meta Info */
.model-embed-meta {
    display: flex;
    gap: 1.25rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.model-embed-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.model-embed-meta .meta-item i {
    color: rgba(163, 255, 18, 0.7);
}

/* ========================================
   Model Grid for Blog Posts
   ======================================== */
.blog-model-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .blog-model-grid {
        grid-template-columns: 1fr;
    }
}

/* Compact Card Style */
.library-model-embed.card-style {
    display: flex;
    flex-direction: column;
}

.library-model-embed.card-style .model-embed-viewer {
    aspect-ratio: 4 / 3;
}

.library-model-embed.card-style .model-embed-info {
    padding: 1rem;
}

.library-model-embed.card-style .model-embed-name {
    font-size: 1.1rem;
}

.library-model-embed.card-style .model-embed-description {
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Inline Style (minimal) */
.library-model-embed.inline-style {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin: 1rem 0;
}

.library-model-embed.inline-style .model-embed-viewer {
    width: 100px;
    height: 100px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 8px;
}

.library-model-embed.inline-style .model-embed-info {
    padding: 0;
    flex: 1;
}

.library-model-embed.inline-style .model-embed-name {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.library-model-embed.inline-style .model-embed-description {
    display: none;
}

.library-model-embed.inline-style .model-embed-actions {
    margin-top: 0.5rem;
}

.library-model-embed.inline-style .btn-view-model,
.library-model-embed.inline-style .btn-download-stl {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
}

/* ========================================
   Blog Post Specific Styles
   ======================================== */
.blog-content .library-model-embed {
    max-width: 800px;
}

/* Featured model (full width with larger viewer) */
.blog-content .library-model-embed.featured {
    max-width: none;
}

.blog-content .library-model-embed.featured .model-embed-viewer {
    aspect-ratio: 16 / 9;
}

/* Model callout box */
.model-callout {
    background: linear-gradient(135deg, rgba(163, 255, 18, 0.08), rgba(42, 232, 206, 0.05));
    border: 1px solid rgba(163, 255, 18, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.model-callout h3 {
    color: #A3FF12;
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-callout p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.95rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 640px) {
    .model-embed-viewer {
        aspect-ratio: 4 / 3;
    }
    
    .model-embed-info {
        padding: 1rem;
    }
    
    .model-embed-name {
        font-size: 1.1rem;
    }
    
    .model-embed-actions {
        flex-direction: column;
    }
    
    .btn-view-model,
    .btn-download-stl {
        width: 100%;
        justify-content: center;
    }
}
