/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: Default GeneratePress child theme
Author: Tom Usborne
Author URI: https://tomusborne.com
Template: generatepress
Version: 0.1
*/

/* ====================================================
   1. LOCAL FONT LOADING (INTER & RAELA)
==================================================== */

/* Inter - Body Font Stack */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/inter-v20-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/inter-v20-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/inter-v20-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('./fonts/inter-v20-latin-800.woff2') format('woff2');
}

/* Raela Grotesque - Headings */
@font-face {
  font-family: 'Raela Grotesque';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  /* Note: If the file on your server still has spaces, use Raela%20Grotesque%20Med.woff2 */
  src: url('./fonts/Raela%20Grotesque%20Med.woff2') format('woff2');
}

/* ====================================================
   2. GLOBAL TYPOGRAPHY ASSIGNMENT
==================================================== */

/* Assign Inter as the reading font for all standard text */
body, p, a, li, span {
  font-family: 'Inter', sans-serif;
}

/* Force Raela Grotesque on ALL headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Raela Grotesque', sans-serif !important;
  font-weight: 700;
}

/* ====================================================
   3. PREMIUM SAAS STYLING (SPACING & READABILITY)
==================================================== */

/* H2: Deep Slate color, tight letter spacing, and a clean separator */
.entry-content h2 {
  font-size: 28px;
  color: #0f172a; 
  letter-spacing: -0.02em; 
  margin-top: 2.2em; 
  margin-bottom: 0.8em;
  line-height: 1.25;
  border-bottom: 1px solid #f1f5f9; 
  padding-bottom: 10px;
}

/* H3: Optimized margin and size for sub-sections */
.entry-content h3 {
  font-size: 22px;
  color: #1e293b;
  letter-spacing: -0.01em;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

/* Paragraphs & Lists: Soft color to reduce eye strain with higher line-height */
.entry-content p, 
.entry-content li {
  font-size: 17px;
  line-height: 1.75;
  color: #334155; 
  margin-bottom: 1.2em;
}

/* Clean bullet point formatting */
.entry-content ul {
  padding-left: 20px;
  margin-bottom: 1.5em;
}

.entry-content li {
  margin-bottom: 0.5em;
}


/* Tools page CSS */
/* ==========================================================================
   LETRAS BONITAS CONVERSOR — V4 ENTERPRISE STYLESHEET
   ========================================================================== */
#letras-app-root {
    background: transparent;
    color: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 0 40px;
    box-sizing: border-box;
    overflow-x: hidden;
}

#letras-app-root *,
#letras-app-root *::before,
#letras-app-root *::after {
    box-sizing: border-box;
}

.lb4-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- 1. INPUT CARD & PASTE/CLEAR TOOLBAR --- */
.lb4-input-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    padding: 16px 18px 12px;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
    margin-bottom: 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
}

.lb4-input-card:focus-within {
    border-color: #0f172a;
    box-shadow: 0 8px 28px -6px rgba(15, 23, 42, 0.1);
}

.lb4-textarea {
    width: 100%;
    min-height: 68px;
    max-height: 180px;
    resize: vertical;
    border: none;
    outline: none;
    background: transparent;
    color: #0f172a;
    font-family: inherit;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    font-weight: 500;
    line-height: 1.45;
    padding: 0;
    margin: 0 0 10px 0;
}

.lb4-textarea::placeholder {
    color: #94a3b8;
}

.lb4-input-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.lb4-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #64748b;
}

.lb4-stats strong {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.lb4-input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lb4-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lb4-paste-btn {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
}

.lb4-paste-btn:hover {
    background: #1e293b;
}

.lb4-clear-btn {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.lb4-clear-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* --- 2. FONT STYLE FILTER BAR --- */
.lb4-tabs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 20px;
    scrollbar-width: none;
    max-width: 100%;
}

.lb4-tabs-bar::-webkit-scrollbar {
    display: none;
}

.lb4-tab {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.16s ease;
}

.lb4-tab:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    background: #f8fafc;
}

.lb4-tab.is-active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.lb4-fav-pill {
    background: #f1f5f9;
    color: #0f172a;
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 0.7rem;
}

.lb4-tab.is-active .lb4-fav-pill {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* --- 3. SEMANTIC H3 HEADINGS & 3-COLUMN RESPONSIVE GRID --- */
.lb4-group-h3 {
    font-family: 'Raela Grotesque', 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 24px 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lb4-group-h3:first-child {
    margin-top: 4px;
}

.lb4-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 1023px) {
    .lb4-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .lb4-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
}

/* --- 4. YOUTUBE-STYLE SHIMMER SKELETONS (ZERO CLS) --- */
@keyframes lb4Shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.lb4-skeleton-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

.lb4-sk-line {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: lb4Shimmer 1.5s infinite linear;
    border-radius: 6px;
}

.lb4-sk-preview {
    height: 30px;
    width: 78%;
}

.lb4-sk-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lb4-sk-badge {
    height: 14px;
    width: 32%;
}

.lb4-sk-btns {
    height: 26px;
    width: 42%;
}

/* --- 5. FONT CARDS (SWAPPED HIERARCHY: BIG TEXT ON TOP, META AT BOTTOM) --- */
.lb4-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px 14px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    user-select: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.lb4-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.lb4-card.is-copied {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
}

/* Generated Unicode Text is Now Primary Focus */
.lb4-preview-text {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    font-size: clamp(1.35rem, 1.9vw, 1.65rem);
    font-weight: 500;
    line-height: 1.38;
    color: #0f172a;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.lb4-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f8fafc;
    min-width: 0;
    flex-wrap: wrap;
}

/* Font Name is Now Subtle Badge */
.lb4-font-name {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.lb4-card-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

/* Elevated, Clearly Visible Edit Button */
.lb4-edit-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 4px 9px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lb4-edit-pill:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.lb4-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.lb4-icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0;
}

.lb4-icon-btn.is-fav {
    color: #f43f5e;
}

.lb4-copied-toast {
    font-size: 0.7rem;
    font-weight: 700;
    color: #059669;
    background: #d1fae5;
    padding: 3px 7px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.lb4-card.is-copied .lb4-copied-toast {
    opacity: 1;
}

/* --- 6. EDIT STUDIO MODAL --- */
.lb4-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lb4-modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lb4-modal {
    width: 100%;
    max-width: 540px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.22);
    max-height: 90vh;
    overflow-y: auto;
}

.lb4-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.lb4-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.lb4-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
}

.lb4-studio-stage {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.lb4-studio-preview {
    margin: 0;
    font-size: 1.55rem;
    color: #0f172a;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.lb4-studio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

@media (max-width: 520px) {
    .lb4-studio-grid {
        grid-template-columns: 1fr;
    }
}

.lb4-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lb4-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.lb4-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.88rem;
}

.lb4-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.lb4-chip {
    background: #0F172A;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 0.72rem;
    cursor: pointer;
}

.lb4-studio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
}

.lb4-studio-cta {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

.lb4-studio-cta.is-copied {
    background: #10b981;
}