/* ============================================
   UTILITY TOOLS - Shared Styles
   ============================================ */

/* Tool Container */
.tool-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Font Style Cards */
/*.font-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.font-style-btn {
  padding: 0.75rem 1rem;
  border: 1px solid #263056;
  border-radius: 10px;
  background: #0e1433;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 0.9rem;
}

.font-style-btn:hover {
  border-color: #4299e1;
  background: #1a1f3a;
}

.font-style-btn.active {
  background: linear-gradient(135deg, #2a34a8, #3f7cf3);
  border-color: #3f7cf3;
  color: white;
}*/

#fontInput {
  width: 100%;
  min-height: 150px;   
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6; 
  background: rgba(255,255,255,0.05);
  color: var(--text, #eaeaea);
  /*border: 1px solid rgba(255,255,255,0.15);*/
  border: 1px solid rgba(199,197,197,0.20);
  /*border: 1px solid var(--border);*/
  transition: background .2s ease, border-color .2s ease;
  outline: none !important;
  box-shadow: none !important;
}
#fontInput:focus, input[type="text"]:focus, input[list]:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
  outline: none !important;
  box-shadow: none !important;
}

/* Font style buttons - uniform size */
.font-style-btn {
  flex: 0 0 auto;
  min-width: 100px;           /* Fixed minimum width */
  max-width: 120px;           /* Fixed maximum width */
  width: 110px;               /* Fixed width */
  height: 90px;               /* Fixed height for all buttons */
  padding: 0.75rem 0.5rem;
  border: 1px solid #263056;
  border-radius: 10px;
  background: #0e1433;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.9rem;
  overflow: hidden;
  word-break: break-word;
}

.font-style-btn:hover {
  border-color: #4299e1;
  background: #1a1f3a;
  transform: translateY(-2px);
}

.font-style-btn.active {
  background: linear-gradient(135deg, #2a34a8, #3f7cf3);
  border-color: #3f7cf3;
  color: white;
  box-shadow: 0 4px 12px rgba(74, 105, 255, 0.3);
}

/* Preview text inside button */
.font-style-btn .preview-text {
  font-size: 1.4rem;
  line-height: 1.4;
  min-height: 2rem;
}

/* Label inside button */
.font-style-btn .btn-label {
  font-size: 0.7rem;
  color: #718096;
  line-height: 1.2;
  margin-top: 2px;
}

.font-style-btn.active .btn-label {
  color: rgba(255, 255, 255, 0.8);
}
/* Font Preview */
.font-preview {
  background: #0e1433;
  border: 1px solid #263056;
  border-radius: 14px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  min-height: 80px;
  font-size: 1.5rem;
  word-break: break-word;
}

/* Copy Button */
.copy-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2a34a8, #3f7cf3);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 105, 255, 0.3);
}

.copy-btn.copied {
  background: #22c55e;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .font-style-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .font-preview {
    font-size: 1.2rem;
  }
}

/* Font style grid - matches bio generator pattern */
.font-style-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.5rem 2rem 1rem 2rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #404FF7 #0e1433;
}

.font-style-grid::-webkit-scrollbar {
  height: 4px;
}

.font-style-grid::-webkit-scrollbar-track {
  background: #0e1433;
  border-radius: 10px;
}

.font-style-grid::-webkit-scrollbar-thumb {
  background: #4299e1;
  border-radius: 10px;
}

/* Desktop - wrap, no scroll */
@media (min-width: 769px) {
  .font-style-grid {
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 0.5rem 0 1rem 0;
  }
  
  .font-style-grid::-webkit-scrollbar {
    display: none;
  }
}

/* Font style buttons - using same class as bio generator */
.font-style-btn {
  flex: 0 0 auto;
  min-width: 100px;
  padding: 0.75rem 1rem;
  border: 1px solid #263056;
  border-radius: 10px;
  background: #0e1433;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 0.9rem;
  white-space: nowrap;
}

.font-style-btn:hover {
  border-color: #4299e1;
  background: #1a1f3a;
  transform: translateY(-2px);
}

.font-style-btn.active {
  background: linear-gradient(135deg, #2a34a8, #3f7cf3);
  border-color: #3f7cf3;
  color: white;
  box-shadow: 0 4px 12px rgba(74, 105, 255, 0.3);
}
/*---------------------------------------------
   1. SCROLLABLE CONTAINERS (Horizontal/Vertical)
----------------------------------------------*/
.scroll-container {
  position: relative;
  margin: 1.5rem 0;
  width: 100%;
}

.scroll-wrapper {
  display: flex;
  gap: 0.75rem;
  scroll-behavior: smooth;
  padding: 0.5rem 0 1rem 0;
  /* Custom scrollbar styling */
  scrollbar-width: thin;
  /*scrollbar-color: #4299e1 #0e1433;*/
  scrollbar-color: #404FF7 #0e1433;
}

/* Horizontal scroll */
.scroll-wrapper.horizontal {
  overflow-x: auto;
  flex-wrap: nowrap;
}

/* Vertical scroll */
.scroll-wrapper.vertical {
  overflow-y: auto;
  flex-wrap: wrap;
}

/* Webkit scrollbar styling */
.scroll-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scroll-wrapper::-webkit-scrollbar-track {
  background: #0e1433;
  border-radius: 10px;
}

.scroll-wrapper::-webkit-scrollbar-thumb {
  background: #4299e1;
  border-radius: 10px;
}

.scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: #5a9eff;
}

/* Desktop - hide scrollbar, show grid */
@media (min-width: 769px) {
  .scroll-wrapper.horizontal.desktop-grid,
  .scroll-wrapper.vertical.desktop-grid {
    overflow: visible;
    flex-wrap: wrap;
  }
  
  .scroll-wrapper.horizontal.desktop-grid::-webkit-scrollbar,
  .scroll-wrapper.vertical.desktop-grid::-webkit-scrollbar {
    display: none;
  }
}

/*---------------------------------------------
   2. SCROLL ARROWS (Mobile Only)
----------------------------------------------*/
.scroll-arrow {
  position: absolute;
  width: 32px;
  height: 32px;
  background: #0e1433;
  border: 1px solid #263056;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: white;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.scroll-arrow:hover {
  background: linear-gradient(135deg, #2a34a8, #3f7cf3) !important;
  border-color: #3f7cf3 !important;
}

/* Arrow positions for horizontal scroll */
.scroll-arrow.left {
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
}

.scroll-arrow.right {
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
}

/* Arrow positions for vertical scroll */
.scroll-arrow.up {
  top: 1.5px;
   /*left: 18.5rem;*/
   left: 90%;
  transform: translateX(-50%);
}

.scroll-arrow.down {
  bottom: 1.5px;
   /*left: 18.5rem;*/
   left: 90%;
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .scroll-arrow {
    display: flex;
  }
}

@media (min-width: 769px) {
  .scroll-arrow {
    display: none !important;
  }
}

/* Emoji Picker (simple version) */
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
  background: #0e1433;
  border: 1px solid #263056;
  border-radius: 8px;
  margin: 1rem 0;
}

.emoji-item {
  font-size: 1.5rem;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.emoji-item:hover {
  background: #1a1f3a;
}

/* Improved Emoji Picker Modal */
.emoji-picker-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0e1433;
  border: 2px solid #4299e1;
  border-radius: 14px;
  padding: 2rem;
  z-index: 1000;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto !important; /* Force scrolling */
}

/* Emoji Grid with Scrolling */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
  margin: 1.5rem 0;
  max-height: 50vh;
  overflow-y: auto;
  padding: 0.5rem;
  background: #0c122b;
  border-radius: 8px;
  border: 1px solid #263056;
}

.emoji-item {
  font-size: 1.5rem;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #1a1f3a;
  border: 1px solid #263056;
}

.emoji-item:hover {
  background: #4299e1;
  transform: scale(1.1);
}

.emoji-item.selected {
  background: #4299e1;
  border-color: white;
}

/* Category Tabs */
.emoji-categories {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* Visual feedback for dropdown */
#emojiPosition option[value="none"] {
  color: #718096;
  font-style: italic;
}

#emojiPosition option:not([value="none"]) {
  color: white;
}

#emojiInput {
  width: 100%;
  min-height: 150px;   
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6; 
  background: rgba(255,255,255,0.05);
  color: var(--text, #eaeaea);
  /*border: 1px solid rgba(255,255,255,0.15);*/
  border: 1px solid rgba(199,197,197,0.20);
  /*border: 1px solid var(--border);*/
  transition: background .2s ease, border-color .2s ease;
  outline: none !important;
  box-shadow: none !important;
}
#emojiInput:focus, input[type="text"]:focus, input[list]:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
  outline: none !important;
  box-shadow: none !important;
}

.emoji-picker-modal {
  background: #0e1433;
  border: 1px solid #263056;
  border-radius: 14px;
  margin: 1.5rem 0;
}

.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 0 1rem 0;
  border:none;
  background: transparent;
  max-height: 300px;
}
/*
.emoji-wrapper .scroll-arrow{
    display: flex !important;
}
*/
/* Hide scroll arrows by default */
.emoji-wrapper .scroll-arrow {
  display: none;
}

/* Only show when needed via JavaScript */
.emoji-wrapper .scroll-arrow[style*="display: flex"] {
  display: flex !important;
}
/* Mobile: Always show arrows */
@media (max-width: 768px) {
  .scroll-arrow {
    display: flex !important;
  }
}
@media (max-width: 768px) {
  .emoji-grid {
    padding-left: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    /*column-gap: 20rem;*/
    row-gap: 0.25rem;
  }
}

.emoji-wrapper {
  min-height: 0 !important;
  height: auto !important;
}

.emoji-grid {
  min-height: 0 !important;
  height: auto !important;
}

.category-tab {
  padding: 0.5rem 1rem;
  background: #1a1f3a;
  border: 1px solid #263056;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-tab:hover,
.category-tab.active {
  background: #4299e1;
  border-color: #4299e1;
}