/* BrandAssets Page Mobile Styles */

/* Mobile-first responsive styles */
.file-manager-mobile-wrapper {
    min-height: 400px;
    max-height: 70vh;
    overflow: auto;
 -webkit-overflow-scrolling: touch;
    padding: 8px;
}

/* Give more room to file manager toolbar */
.file-manager-mobile-wrapper .e-filemanager {
    border-radius: 12px;
    overflow: hidden;
}

/* Extra spacing around file manager to prevent crowding */
.file-manager-mobile-wrapper > * {
    margin: 0 auto;
}

/* Optimize touch targets for mobile */
@@media (max-width: 640px) {
    .file-manager-mobile-wrapper {
        min-height: 350px;
     padding: 4px;
    }
    
    /* More vertical space for toolbar */
  .file-manager-mobile-wrapper .e-filemanager .e-toolbar {
        min-height: 64px !important;
        padding: 8px 4px !important;
    }
 
    /* Increase touch target sizes */
    button, a, [role="button"] {
        min-height: 44px;
      min-width: 44px;
    }
  
    /* Better spacing for wrapped toolbar items */
    .file-manager-mobile-wrapper .e-filemanager .e-toolbar .e-toolbar-items {
   gap: 6px !important;
 padding: 4px !important;
 }
}

/* iPad optimization */
@@media (min-width: 641px) and (max-width: 1024px) {
 .file-manager-mobile-wrapper {
        min-height: 500px;
 max-height: 65vh;
        padding: 12px;
    }
    
    .file-manager-mobile-wrapper .e-filemanager .e-toolbar {
        min-height: 60px !important;
  }
}

/* Desktop optimization */
@@media (min-width: 1025px) {
    .file-manager-mobile-wrapper {
        min-height: 600px;
        max-height: 75vh;
        padding: 16px;
    }
}

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Better touch feedback */
.touch-manipulation {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* Active state for better mobile feedback */
.active\:scale-98:active {
    transform: scale(0.98);
}

.active\:scale-95:active {
    transform: scale(0.95);
}

/* Smooth scrolling for mobile */
html {
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
.file-manager-mobile-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.file-manager-mobile-wrapper::-webkit-scrollbar-track {
background: #f1f1f1;
    border-radius: 10px;
}

.file-manager-mobile-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.file-manager-mobile-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mobile landscape adjustments */
@@media (max-height: 500px) and (orientation: landscape) {
    .file-manager-mobile-wrapper {
        max-height: 50vh;
    }
    
    /* Compact toolbar in landscape */
    .file-manager-mobile-wrapper .e-filemanager .e-toolbar {
        min-height: 52px !important;
    }
}

/* Backdrop blur support */
@@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .backdrop-blur-md {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

/* Focus ring for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Animation for expanding sections */
@@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
  to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Gradient animation for buttons */
@@keyframes gradient {
    0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-gradient-to-r {
    background-size: 200% 200%;
}

/* Canva-style loading animation */
@@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Better mobile menu transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

/* Ensure toolbar buttons don't get cut off */
.file-manager-mobile-wrapper .e-filemanager .e-toolbar-items {
    overflow: visible !important;
}

/* Prevent toolbar from being too cramped */
.file-manager-mobile-wrapper .e-filemanager .e-toolbar {
    overflow: visible !important;
    height: auto !important;
}

/* Better button layout */
@@media (max-width: 640px) {
    /* Stack toolbar buttons vertically if needed */
    .file-manager-mobile-wrapper .e-filemanager .e-toolbar .e-toolbar-items {
        display: flex !important;
        flex-direction: row !important;
   flex-wrap: wrap !important;
        justify-content: flex-start !important;
  align-items: center !important;
  row-gap: 8px !important;
        column-gap: 6px !important;
    }
    
    /* Each button gets equal space */
    .file-manager-mobile-wrapper .e-filemanager .e-toolbar .e-toolbar-item {
        flex: 0 0 auto !important;
        margin: 0 !important;
    }
}

/* Improve visibility of important buttons */
.file-manager-mobile-wrapper .e-filemanager .e-toolbar .e-toolbar-item .e-btn {
    font-size: 13px !important;
    letter-spacing: 0.3px !important;
}

@@media (max-width: 640px) {
    .file-manager-mobile-wrapper .e-filemanager .e-toolbar .e-toolbar-item .e-btn {
        font-size: 0 !important; /* Hide text on mobile */
    }
    
    .file-manager-mobile-wrapper .e-filemanager .e-toolbar .e-toolbar-item .e-btn .e-btn-icon {
        font-size: 24px !important;
  }
}

/* Ensure Upload button stands out */
.file-manager-mobile-wrapper .directory-upload {
    order: -1; /* Put upload first */
}

/* Better visual hierarchy */
.file-manager-mobile-wrapper .e-filemanager .e-toolbar .e-toolbar-item:nth-child(1),
.file-manager-mobile-wrapper .e-filemanager .e-toolbar .e-toolbar-item:nth-child(2) {
    order: -1;
}
