/* Instant Post Card Component Styles */

/* Base Card Styles */
.ip-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #e8e8e8;
}

.ip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,107,53,0.15);
    border-color: #ff6b35;
}

/* Layout Variants */
.ip-card-carousel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ip-card-carousel .ip-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: absolute;
    opacity: .85;
    bottom: 0;
    width: 100%;
}

.ip-card-list {
    display: flex;
    flex-direction: row;
}

.ip-card-list .ip-card-media {
    width: 120px;
    height: 100px;
    flex-shrink: 0;
}

.ip-card-list .ip-card-content {
    flex: 1;
}

/* Media Section */
.ip-card-media {
    position: relative;
    height: 360px;
    max-height: 50vh;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ip-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ip-card:hover .ip-media-img {
    transform: scale(1.05);
}

/* Video Preview */
.ip-video-preview {
    position: relative;
    width: 100%;
    height: 100%;
}

.ip-video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ip-video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 32px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    opacity: 0.9;
    transition: all 0.3s ease;
    pointer-events: none;
}

.ip-card:hover .ip-video-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* No Media Placeholder */
.ip-no-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 32px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Decorative Corner Elements */
.ip-corner-tl, .ip-corner-tr, .ip-corner-bl, .ip-corner-br {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #ff6b35;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ip-card:hover .ip-corner-tl,
.ip-card:hover .ip-corner-tr,
.ip-card:hover .ip-corner-bl,
.ip-card:hover .ip-corner-br {
    opacity: 0.6;
}

.ip-corner-tl {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.ip-corner-tr {
    top: 8px;
    right: 8px;
    border-left: none;
    border-bottom: none;
}

.ip-corner-bl {
    bottom: 8px;
    left: 8px;
    border-right: none;
    border-top: none;
}

.ip-corner-br {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

/* Content Section */
.ip-card-content {
    padding: 12px 15px;
    background: rgba(255,255,255,0.98);
}

.ip-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2rem;
}

.instant-posts-list .ip-title {
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

/* Author Section */
.ip-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-author-avatar {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #ff6b35;
    flex-shrink: 0;
}

.ip-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.ip-author-name {
    font-size: 13px;
    font-weight: 600;
    color: #ff6b35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ip-date {
    color: #888;
    display: block;
}

/* Footer Section */
.ip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #666;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.ip-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.ip-views {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #ff6b35;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ip-title {
        font-size: 13px;
    }
    
    .ip-card-content {
        padding: 10px 12px;
    }
    
    .ip-play-overlay {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .ip-title {
        font-size: 12px;
    }
    
    .ip-footer {
        font-size: 10px;
    }
    
    .ip-play-overlay {
        font-size: 24px;
    }
}
