/**
 * Frontend Styles for SoldPrompts Plugin
 */

/* Grid Layout */
.soldprompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 0;
}

/* Card Styles */
.soldprompts-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.soldprompts-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card Image */
.soldprompts-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.soldprompts-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.soldprompts-card:hover .soldprompts-card-image img {
    transform: scale(1.05);
}

.soldprompts-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 24px;
    text-align: center;
}

.soldprompts-placeholder span {
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

/* Card Content */
.soldprompts-card-content {
    padding: 20px;
}

.soldprompts-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
}

.soldprompts-card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.soldprompts-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    background: #0073aa;
}

.soldprompts-platform {
    background: #0073aa;
}

.soldprompts-difficulty-beginner {
    background: #28a745;
}

.soldprompts-difficulty-intermediate {
    background: #ffc107;
    color: #333;
}

.soldprompts-difficulty-advanced {
    background: #dc3545;
}

.soldprompts-card-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.soldprompts-card-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #888;
}

.soldprompts-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.soldprompts-copy-btn,
.soldprompts-view-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.soldprompts-copy-btn {
    background: #ff6b6b;
    color: white;
    flex: 1;
    justify-content: center;
}

.soldprompts-copy-btn:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

.soldprompts-copy-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.soldprompts-view-btn {
    background: #28a745;
    color: white;
}

.soldprompts-view-btn:hover {
    background: #218838;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Categories */
.soldprompts-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.soldprompts-category-link {
    text-decoration: none;
    color: inherit;
}

.soldprompts-category-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.soldprompts-category-card:hover {
    background: #e9ecef;
    border-color: #0073aa;
    transform: translateY(-2px);
}

.soldprompts-category-card h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.soldprompts-category-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* AdSense Modal */
.soldprompts-ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.soldprompts-ad-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.soldprompts-ad-countdown {
    font-size: 18px;
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 20px;
}

.soldprompts-ad-zone {
    min-height: 250px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 8px;
}

.soldprompts-close-ad {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    display: none;
}

.soldprompts-close-ad:hover {
    background: #218838;
}

/* Success Notification */
.soldprompts-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.soldprompts-notification.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .soldprompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        margin: 15px 0;
    }
    
    .soldprompts-card-content {
        padding: 15px;
    }
    
    .soldprompts-card-actions {
        flex-direction: column;
    }
    
    .soldprompts-copy-btn {
        flex: none;
    }
    
    .soldprompts-categories {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .soldprompts-ad-content {
        margin: 20px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .soldprompts-grid {
        grid-template-columns: 1fr;
    }
    
    .soldprompts-card-image {
        height: 160px;
    }
}

/* Latest content specific styles */
.soldprompts-latest .soldprompts-grid {
    margin-top: 0;
}

/* Loading states */
.soldprompts-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.soldprompts-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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