/* Custom styles for the Prompt & Workflow Vault */

/* Utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth animations */
.transition-all {
    transition: all 0.2s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Focus states */
input:focus,
select:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Card hover effects */
.bg-white:hover {
    transform: translateY(-2px);
}

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

/* Type-specific colors */
.type-prompt {
    background-color: #dbeafe;
    color: #1e40af;
}

.type-workflow {
    background-color: #dcfce7;
    color: #166534;
}

.type-framework {
    background-color: #f3e8ff;
    color: #7c3aed;
}

/* Difficulty colors */
.difficulty-beginner {
    background-color: #dcfce7;
    color: #166534;
}

.difficulty-intermediate {
    background-color: #fef3c7;
    color: #92400e;
}

.difficulty-advanced {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Search input enhancement */
#search-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 1rem 1rem;
    padding-left: 2.5rem;
}

/* Code block styling */
pre, code {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    padding: 0.125rem 0.25rem;
    font-size: 0.875rem;
}

/* Rating stars */
.rating-star {
    cursor: pointer;
    transition: color 0.2s ease;
}

.rating-star:hover {
    transform: scale(1.1);
}

/* Toast notifications positioning */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 60;
    animation: slideIn 0.3s ease-out;
}

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

/* Featured item highlighting */
.featured-item {
    position: relative;
}

.featured-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #d97706);
    border-radius: 0.5rem;
    z-index: -1;
}

/* Modal content scrollbar */
#modal-content {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Button states */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:not(:disabled):hover {
    transform: translateY(-1px);
}

/* Filter toggle states */
#featured-toggle.active {
    background-color: #3b82f6;
    color: white;
}

/* Responsive text */
@media (max-width: 640px) {
    .text-xl {
        font-size: 1.125rem;
    }
    
    .text-2xl {
        font-size: 1.25rem;
    }
    
    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-8 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .bg-white {
        background: white !important;
    }
    
    .text-gray-900 {
        color: black !important;
    }
}