/* Custom styles for CardsUI theme */
/* Admin Code Editor Styles */

.ui-code-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.code-tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    background: white;
    border-bottom-color: #0073aa;
    color: #0073aa;
}

.tab-content {
    display: none;
    padding: 0;
}

.tab-content.active {
    display: block;
}

/* Frontend Styles */
.ui-card {
    transition: all 0.3s ease;
}

.ui-card:hover {
    transform: translateY(-2px);
}

.preview-container {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.code-content {
    transition: opacity 0.3s ease;
}

.code-content.hidden {
    display: none !important;
}

/* View Mode Controls */

/* Search Styles */
#search-elements:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .code-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 0;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .preview-container {
        padding: 2px;
    }
    
    #preview-frame {
        height: 300px !important;
    }
}

/* Copy Success Animation */
@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.copy-success {
    animation: fadeInOut 2s ease-in-out;
}


/* Card Hover Effects */
.ui-card .aspect-video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ui-card:hover .aspect-video::before {
    opacity: 1;
}

/* Filter Animations */
.filter-fade-in {
    animation: filterFadeIn 0.5s ease-in-out;
}

@keyframes filterFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Enhancements */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code Editor Enhancements */
.monaco-editor {
    border-radius: 8px;
    overflow: hidden;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}
/* Custom Scrollbar Styles */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.custom-scrollbar::-webkit-scrollbar-thumb:active {
    background: #718096;
}

/* Fixed Sidebar Styles */
.site-header {
    transition: all 0.3s ease;
}

/* Logo styles in sidebar */
.sidebar-content .site-branding {
    text-align: center;
}

.sidebar-content .site-logo img {
    max-height: 40px;
    width: auto;
    margin: 0 auto;
}

.sidebar-content .site-title a {
    text-decoration: none;
    color: #1f2937;
}

.sidebar-content .site-title a:hover {
    color: #3b82f6;
}

/* Mobile responsive adjustments */
@media (max-width: 1023px) {
    .lg\:ml-64 {
        margin-left: 0 !important;
    }
}

/* Ensure content doesn't get cut off */
.site-content {
    min-height: calc(100vh - 4rem);
}

/* Smooth transitions for sidebar interactions */
.sidebar-content a {
    transition: all 0.2s ease;
}

.sidebar-content a:hover {
    transform: translateX(2px);
}




/* Sidebar link hover effects */

.site-header{
    width: calc(100% - 256px);
    margin-left: auto;
    margin-right: 0px;
}
.sidebar-content{
    position: fixed;
    top: 0px;
    z-index: 999999;
    background: #fff;
    width: 256px;
}
.content-area{
     width: calc(100% - 256px);
    margin-left: auto;
    margin-right: 0px;
}

/* CodeMirror 5 Custom Styles */
/* Simple Editor Styles */
.code-display pre {
    margin: 0;
    padding: 1rem;
    background: #f8f9fa;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

.code-display code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
}

/* Prism theme adjustments */
pre[class*="language-"] {
    margin: 0;
    border-radius: 0;
}

/* Copy button success state */
.copy-success {
    background-color: #10b981 !important;
    color: white !important;
}

/* Preview frame */
#preview-frame {
    background: white;
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .code-display pre {
        font-size: 12px;
        padding: 0.75rem;
    }
    .content-area,.site-header{
     width: 100%;
    margin-left: auto;
    margin-right: auto;
}

}
.site-footer{
    width: calc(100% - 256px);
    margin-left: auto;
    margin-right: 0px;
}

@media screen and (min-width: 768px) and (max-width: 1024px){
    .site-header{
        width: 100%;
    }
}
@media screen and (min-width: 320px) and (max-width: 780px){
    .site-footer{
        width: 100%;
    }
}

