/* ==========================================
   MOBILE.CSS
   AI FONTS GENERATOR
   390px Design
========================================== */

@media (max-width:768px){

/* ==========================================
   GLOBAL
========================================== */

html,
body{

    overflow-x:hidden;
}

body{

    background:#050505;
}

/* ==========================================
   NAVBAR
========================================== */

.navbar{

    height:72px;

    padding:0 15px;
}

.logo h2{

    font-size:20px;
}

.logo span{

    font-size:10px;
    letter-spacing:2px;
}

.menu-btn{

    height:42px;

    padding:0 16px;

    font-size:12px;
}

/* ==========================================
   HERO
========================================== */

.hero{

    padding:20px 0;
}

.type-card{

    grid-template-columns:1fr;

    gap:18px;
}

.sticker{

    width:180px;

    font-size:30px;

    padding:18px;

    margin:auto;
}

.sticker span{

    font-size:11px;
}

.input-area{

    padding:18px;
}

.input-area textarea{

    height:120px;

    font-size:26px;

    line-height:1.2;
}

.action-buttons{

    gap:12px;
}

.generate-btn,
.clear-btn{

    width:100%;
    height:58px;

    font-size:15px;
}

/* ==========================================
   SECTION HEADINGS
========================================== */

.section-head{

    flex-direction:column;

    align-items:flex-start;

    gap:12px;
}

.section-head h3{

    font-size:20px;
}

.section-head a{

    font-size:13px;
}

/* ==========================================
   FRAMES
========================================== */

.frame-row{

    overflow-x:auto;

    gap:12px;

    padding-bottom:12px;

    scroll-snap-type:x mandatory;
}

.frame{

    min-width:140px;

    padding:16px;

    scroll-snap-align:start;
}

.frame span{

    font-size:12px;
}

/* ==========================================
   CONTROLS
========================================== */

.controls{

    flex-direction:column;

    align-items:stretch;

    gap:20px;
}

.slider-box{

    width:100%;
}

.slider-box label{

    font-size:13px;
}

.social-icons{

    justify-content:center;

    flex-wrap:wrap;
}

.social-icons span{

    width:50px;
    height:50px;

    font-size:18px;
}

/* ==========================================
   FONT GRID
========================================== */

.fonts-grid{

    grid-template-columns:1fr;

    gap:24px;
}

/* ==========================================
   FONT CARDS
========================================== */

.font-card{

    padding:18px;
}

.card-header{

    gap:15px;
}

.card-header h2{

    font-size:28px;

    padding:10px 12px;
}

.card-header p{

    font-size:14px;
}

.badge{

    width:70px;
    height:70px;

    font-size:18px;
}

.badge span{

    font-size:10px;
}

/* ==========================================
   FONT ROWS
========================================== */

.font-row{

    min-height:54px;

    padding:0 8px;
}

.font-row::before{

    width:24px;

    font-size:12px;
}

.font-row span{

    font-size:18px;

    margin-left:5px;

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;

    max-width:180px;
}

.font-row button{

    width:68px;
    height:32px;

    font-size:10px;
}

/* ==========================================
   CATEGORIES
========================================== */

.categories{

    margin-top:40px;
}

.categories h2{

    font-size:22px;
}

.category-row{

    display:grid;

    grid-template-columns:
    repeat(2,1fr);

    gap:10px;
}

.cat{

    min-width:auto;

    padding:16px 10px;

    font-size:12px;
}

/* ==========================================
   FOOTER
========================================== */

footer{

    grid-template-columns:1fr;

    gap:25px;

    padding:35px 0;
}

.footer-left h3{

    font-size:18px;
}

.footer-left p{

    font-size:12px;
}

.footer-links{

    gap:10px;
}

.footer-links a{

    font-size:13px;
}

.footer-quote{

    max-width:100%;

    font-size:16px;
}

/* ==========================================
   MOBILE CARD EFFECT REDUCTION
========================================== */

.font-card::after{

    width:80px;
    height:80px;

    filter:blur(20px);
}

.hero::after{

    height:60px;
}

/* ==========================================
   MOBILE TAPES
========================================== */

.font-card::before{

    width:55px;
    height:15px;
}

/* ==========================================
   MOBILE SCROLLBAR
========================================== */

::-webkit-scrollbar{

    height:4px;
}

/* ==========================================
   SAFE SPACING
========================================== */

section,
footer,
.navbar{

    width:calc(100% - 24px);
}

}

/* ==========================================
   EXTRA SMALL DEVICES
   390px and below
========================================== */

@media (max-width:390px){

.logo h2{

    font-size:18px;
}

.sticker{

    width:150px;

    font-size:26px;
}

.input-area textarea{

    font-size:22px;
}

.card-header{

    flex-direction:column;
}

.badge{

    width:60px;
    height:60px;
}

.font-row span{

    max-width:130px;

    font-size:16px;
}

.cat{

    font-size:11px;
}

.footer-quote{

    font-size:14px;
}

}

/* ==========================================
   FONT SIZE SLIDER — TOUCH FIX
========================================== */

@media (max-width: 768px) {

  #fontSizeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    outline: none;
    touch-action: pan-x;
    cursor: pointer;
    display: block;
  }

  #fontSizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(215,255,0,.45);
    touch-action: none;
  }

  #fontSizeSlider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(215,255,0,.45);
  }

  .slider-box {
    touch-action: pan-x;
    -webkit-user-select: none;
    user-select: none;
    padding: 8px 0;
  }

/* ==========================================
   FONT SAMPLE — CENTER TEXT FIX
========================================== */

  .font-sample {
    text-align: center !important;
    white-space: pre-wrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    padding: 0 8px !important;
    font-size: var(--font-sample-size, 20px) !important;
  }

  /* Kill old font-row span rule that clips text */
  .font-row span.font-sample {
    max-width: 100% !important;
    white-space: pre-wrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

/* ==========================================
   FONT ROW — LAYOUT FIX FOR REMIX BUTTON
========================================== */

  .font-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 90px !important;
    padding: 22px 12px 14px !important;
    gap: 10px !important;
    position: relative !important;
  }

  .font-row-num {
    position: absolute !important;
    top: 6px !important;
    left: 10px !important;
    width: auto !important;
    font-size: 11px !important;
  }

  .font-row-actions {
    position: static !important;
    opacity: 1 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
    bottom: auto !important;
    right: auto !important;
  }

  .btn-remix {
    padding: 6px 20px !important;
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    height: auto !important;
    width: auto !important;
  }

/* ==========================================
   RECEIPT NOTEBOOK ROWS — MOBILE
========================================== */

  

  

  

/* ==========================================
   FILM ROWS — MOBILE
========================================== */

  

  

/* ==========================================
   HOT RIGHT NOW — MOBILE 2 COL
========================================== */

  #frameRow {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(3, auto) !important;
    gap: 8px !important;
  }

  .hot-card {
    min-height: 70px !important;
    padding: 16px 10px 12px !important;
  }

  .hot-preview {
    font-size: 13px !important;
    max-width: 160px !important;
  }

}

/* ==========================================
   EXTRA SMALL — 390px ADDITIONS
========================================== */

@media (max-width: 390px) {

  .font-sample {
    font-size: var(--font-sample-size, 18px) !important;
    padding: 0 4px !important;
  }

  .btn-remix {
    padding: 5px 14px !important;
    font-size: 10px !important;
  }

  #frameRow {
    grid-template-columns: 1fr !important;
  }

  .hot-preview {
    font-size: 12px !important;
  }

}


/* ==========================================
   MOBILE BOTTOM INPUT BAR — ACTIVATION
========================================== */

@media (max-width: 768px) {

  /* Show bottom bar */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9500;
    background: #e8e0d0;
    border-top: 2px solid rgba(0,0,0,0.12);
    padding: 10px 14px;
    gap: 10px;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  }

  /* Clear space for fixed bar */
  body {
    padding-bottom: 80px !important;
  }

  /* Hide desktop hero inputs on mobile */
  .type-card {
    display: none !important;
  }

  .hero {
    padding: 8px 0 !important;
    min-height: 0 !important;
  }

  /* Float buttons above bottom bar */
  .float-btns {
    bottom: 90px !important;
    top: auto !important;
    transform: translateX(120px) !important;
    right: 12px !important;
    left: auto !important;
  }

  .float-btns.visible {
    transform: translateX(0) !important;
  }

}

@media (max-width: 768px) {
  .navbar nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #0d0d0d;
    border-top: 1px solid var(--accent);
    padding: 8px 0;
    margin-top: 16px;
    order: 3;
    z-index: 100;
  }
  .navbar nav.open {
    display: flex !important;
  }
  .navbar nav a {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    width: 100%;
    letter-spacing: 2px;
    color: #fff;
    text-decoration: none;
  }
  .navbar nav a:last-child {
    border-bottom: none;
  }
  .menu-btn {
    display: block;
    order: 2;
  }
  .logo {
    order: 1;
  }
  .navbar {
    flex-wrap: wrap;
    height: auto !important;
    min-height: 72px;
    align-content: flex-start;
  }
}

@media (max-width: 768px) {
  body {
    background-image: url('images/bg-pattern.png');
    background-repeat: repeat;
    background-size: auto;
    background-attachment: scroll;
  }
}
