/*
 Theme Name:   ASAP Child
 Theme URI:    
 Description:  ASAP Child Theme for SaaS Portal
 Author:       Antigravity
 Author URI:   
 Template:     asap
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  asap-child
*/

/* Pagination Styles */
ul.page-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}
ul.page-numbers li a, ul.page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}
ul.page-numbers li a:hover {
    color: var(--color-text-main);
    border-color: var(--color-primary);
    background-color: rgba(99, 102, 241, 0.1);
}
ul.page-numbers li span.current {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Hide Google Translate Default UI */
.goog-te-banner-frame { display: none !important; }
.VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }
body { top: 0 !important; }
.skiptranslate > iframe { display: none !important; }

/* ============================================
   COMMENT TEXT CONTRAST FIX (light + dark)
   ============================================ */

/* Texto del comentario usa variable del tema → se adapta solo */
.nexofit-comment-body,
.nexofit-comment-body p,
.nexofit-comment-body li,
.nexofit-comment-body span {
    color: var(--color-text-main) !important;
}

.nexofit-comment-body a {
    color: var(--color-primary) !important;
    text-decoration: underline;
}

.nexofit-comment-body a:hover {
    color: var(--color-accent) !important;
}

.nexofit-comment-body strong,
.nexofit-comment-body b {
    color: var(--color-text-main) !important;
    font-weight: 700;
}

.nexofit-comment-body em,
.nexofit-comment-body i:not(.fa-solid):not(.fa-regular):not(.fa-brands) {
    color: var(--color-text-muted) !important;
    font-style: italic;
}

.nexofit-comment-body code {
    background: rgba(99, 102, 241, 0.12);
    color: var(--color-primary) !important;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.8em;
    font-family: monospace;
}


/* ── Replies container ─────────────────────────────────── */
.children {
    list-style: none;
    margin-top: 0.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* push replies to the right */
}

.children > li {
    width: 88%;    /* smaller than parent */
    margin-top: 0.5rem;
}

/* Nested replies get even smaller */
.children .children > li {
    width: 92%;
}

/* The reply card */
.children > li > .glass-card {
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.875rem !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255,255,255,0.06) !important;
    border-left: 2px solid rgba(99, 102, 241, 0.5) !important;
}

/* Smaller avatar in replies */
.children > li > .glass-card img.rounded-full {
    width: 28px !important;
    height: 28px !important;
}

/* Smaller username */
.children > li > .glass-card span.font-bold {
    font-size: 0.72rem !important;
}

/* Smaller date */
.children > li > .glass-card .text-xs {
    font-size: 0.62rem !important;
}

/* Smaller reply button */
.children > li > .glass-card .bg-primary\/10 {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.65rem !important;
}

/* Remove list bullets */
.comments-area li {
    list-style: none;
}

.comments-area ol ol,
.comments-area ul ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Textarea in comment box - ensure text visible */
#comment {
    color: #f3f4f6 !important;
    background: transparent !important;
}

#comment::placeholder {
    color: #6b7280 !important;
}

/* Comment form inputs dark contrast */
#author, #email {
    color: #f3f4f6 !important;
    background-color: var(--color-surface-light, #1e293b) !important;
}

#author::placeholder, #email::placeholder {
    color: #6b7280 !important;
}

/* Desktop sidebars stay visible while the page scrolls normally */
@media (min-width: 1280px) {
    .nexofit-three-column-layout {
        align-items: flex-start;
    }

    .nexofit-sidebar {
        min-height: 1px;
    }

    .nexofit-sidebar-inner {
        position: sticky;
        top: 124px;
        z-index: 20;
    }

    .nexofit-sidebar-left .nexofit-sidebar-inner {
        width: 260px;
    }

    .nexofit-sidebar-right .nexofit-sidebar-inner {
        width: 300px;
    }

    .nexofit-sidebar-right-wide .nexofit-sidebar-inner {
        width: 320px;
    }
}

/* Sidebar Widgets Premium Top Border */
.nexofit-sidebar-inner.glass-card,
.nexofit-sidebar-inner .glass-card {
    border-top-width: 2px !important;
    border-top-color: var(--primary) !important;
}

.nexofit-mobile-tabbar {
    display: none;
}

@media (max-width: 767px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        -webkit-text-size-adjust: 100%;
    }

    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .nexofit-ambient-glow {
        display: none;
    }

    body > nav.glass {
        position: sticky;
        top: 0;
        padding: 0.75rem 0.875rem !important;
        border-radius: 0 0 1.25rem 1.25rem;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    }

    body > nav.glass > div {
        gap: 0.75rem !important;
        align-items: stretch !important;
    }

    body > nav.glass a[href] .w-10 {
        width: 2.25rem !important;
        height: 2.25rem !important;
        border-radius: 0.875rem !important;
    }

    body > nav.glass .font-heading.text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.2 !important;
    }

    #search-container {
        display: none;
    }

    #search-container.is-mobile-open {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: 0;
        bottom: 0;
        z-index: 120;
        display: block;
        width: auto !important;
        padding: 0.75rem;
        border: 0;
        border-radius: 0;
        background: rgba(2, 6, 23, 0.66);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        box-shadow: none;
    }

    #search-container.is-mobile-open #mobile-search-close {
        position: absolute;
        right: 1.1rem;
        top: calc(1.45rem + env(safe-area-inset-top));
        width: 2.25rem;
        height: 2.25rem;
        display: grid !important;
        place-items: center;
        border-radius: 999px;
        background: var(--surface-color);
        border: 1px solid var(--border-color);
        color: var(--text-main);
        z-index: 123;
    }

    #search-container.is-mobile-open form {
        position: absolute;
        left: 0.75rem;
        right: 0.75rem;
        top: calc(0.75rem + env(safe-area-inset-top));
        display: block;
        min-width: auto;
        padding: 0.55rem;
        padding-right: 3rem;
        border: 1px solid var(--border-color);
        border-radius: 1.1rem;
        background: var(--surface-color);
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
        max-width: none;
    }

    #search-container.is-mobile-open #header-search-input {
        min-height: 42px;
        border-radius: 999px !important;
        font-size: 16px !important;
        padding-right: 1rem !important;
    }

    #search-container.is-mobile-open .absolute.inset-y-0.right-1 {
        display: none !important;
    }

    #search-container.is-mobile-open button[type="submit"] {
        display: none !important;
    }

    #search-container.is-mobile-open #live-search-results {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: calc(100% + 0.5rem) !important;
        width: auto !important;
        max-height: min(380px, calc(100vh - 7rem)) !important;
        border-radius: 1rem !important;
        z-index: 121 !important;
    }

    body.mobile-search-open > nav.glass {
        z-index: 100 !important;
    }

    body.mobile-search-open {
        overflow: hidden !important;
    }

    body > nav.glass .flex.items-center.gap-3:last-child {
        position: absolute;
        right: 0.875rem;
        top: 0.75rem;
        gap: 0.5rem !important;
    }

    body > nav.glass .flex.items-center.gap-3:last-child button,
    body > nav.glass .flex.items-center.gap-3:last-child > a {
        min-width: 2.25rem;
        height: 2.25rem;
        padding: 0 !important;
        border-radius: 999px !important;
        justify-content: center;
    }

    body > nav.glass .flex.items-center.gap-3:last-child > button[onclick="toggleLoginModal()"] {
        width: 2.25rem;
        overflow: hidden;
        color: transparent !important;
        position: relative;
    }

    body > nav.glass .flex.items-center.gap-3:last-child > button[onclick="toggleLoginModal()"]::before {
        content: "\f007";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: var(--text-main);
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
    }

    .nexofit-three-column-layout {
        padding: 2.4rem 0.875rem 1.25rem !important;
        gap: 1rem !important;
    }

    .nexofit-sidebar-right {
        display: none !important;
    }

    .nexofit-sidebar-left {
        order: -1;
        margin-top: 1.5rem !important;
    }

    .nexofit-sidebar-left .nexofit-sidebar-inner {
        margin-top: 0.75rem;
        padding: 0.875rem !important;
        border-radius: 1.25rem !important;
    }

    .nexofit-sidebar-left h3 {
        font-size: 0.95rem !important;
        margin-bottom: 0.75rem !important;
    }

    .nexofit-sidebar-left ul {
        display: flex !important;
        gap: 0.625rem !important;
        overflow-x: auto;
        padding-bottom: 0.25rem !important;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .nexofit-sidebar-left ul::-webkit-scrollbar {
        display: none;
    }

    .nexofit-sidebar-left li {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .nexofit-sidebar-left li a {
        min-height: 42px;
        padding: 0.5rem 0.625rem !important;
        border: 1px solid var(--border-color);
        background: var(--surface-color);
        border-radius: 999px !important;
        gap: 0.5rem;
    }

    .nexofit-sidebar-left li a > div {
        gap: 0.5rem !important;
    }

    .nexofit-sidebar-left li a .w-8 {
        width: 1.75rem !important;
        height: 1.75rem !important;
        border-radius: 999px !important;
    }

    .nexofit-sidebar-left li a span.font-medium {
        max-width: 8.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nexofit-sidebar-left li a > span:last-child,
    .nexofit-sidebar-left .mt-6 {
        display: none !important;
    }

    .nexofit-main-scroll {
        width: 100%;
    }

    .glass-card {
        border-radius: 1.125rem !important;
    }

    .nexofit-main-scroll .glass-card,
    .nexofit-main-scroll article {
        padding: 1rem !important;
    }

    .nexofit-main-scroll h1 {
        font-size: 1.5rem !important;
        line-height: 1.15 !important;
        overflow-wrap: anywhere;
    }

    .nexofit-main-scroll h2,
    .nexofit-main-scroll h3 {
        font-size: 1.15rem !important;
        line-height: 1.25 !important;
    }

    .nexofit-main-scroll .grid {
        gap: 0.875rem !important;
    }

    .nexofit-main-scroll article .w-14,
    .nexofit-main-scroll article .h-14 {
        width: 3rem !important;
        height: 3rem !important;
    }

    .nexofit-main-scroll article h3,
    .nexofit-main-scroll article h4 {
        overflow-wrap: anywhere;
    }

    .nexofit-main-scroll article p {
        font-size: 0.75rem !important;
    }

    .nexofit-main-scroll .w-full.h-\[280px\] {
        height: 220px !important;
        border-radius: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }

    .nexofit-main-scroll .w-full.h-\[280px\] .absolute.bottom-0 {
        padding: 1rem !important;
    }

    .nexofit-main-scroll .w-full.h-\[280px\] h1 {
        font-size: 1.55rem !important;
    }

    .nexofit-main-scroll .w-full.h-\[280px\] .flex.gap-3 {
        gap: 0.5rem !important;
        flex-wrap: wrap;
    }

    .nexofit-main-scroll .w-full.h-\[280px\] a {
        min-height: 40px;
        padding: 0.55rem 0.8rem !important;
        border-radius: 0.875rem !important;
    }

    .single-app .nexofit-main-scroll > .relative,
    .nexofit-main-scroll > .relative.w-full.rounded-3xl {
        border-radius: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    .nexofit-main-scroll > .relative.w-full.rounded-3xl > .relative {
        padding: 1rem !important;
        gap: 1rem !important;
    }

    .nexofit-main-scroll .w-28.h-28 {
        width: 5.25rem !important;
        height: 5.25rem !important;
        border-radius: 1.25rem !important;
    }

    .nexofit-main-scroll .w-28.h-28 img {
        width: 3.5rem !important;
        height: 3.5rem !important;
    }

    #btn-generar-enlaces {
        min-height: 48px;
        border-radius: 1rem !important;
    }

    .single-app-content {
        font-size: 0.92rem !important;
        line-height: 1.65 !important;
    }

    #enlaces-descarga .grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #enlaces-descarga .bg-surfaceLight\/40 {
        padding: 1rem !important;
    }

    #enlaces-descarga a {
        min-width: 0;
    }

    #enlaces-descarga .inline-flex {
        width: 100%;
        border-radius: 1rem !important;
        padding: 0.75rem !important;
        gap: 0.5rem !important;
        justify-content: space-between;
    }

    ul.page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }

    ul.page-numbers li a,
    ul.page-numbers li span {
        min-width: 2.25rem;
        padding: 0.5rem 0.75rem;
    }

    footer {
        margin-top: 2rem !important;
    }

    footer > div {
        padding: 2rem 1rem 1.5rem !important;
    }

    .nexofit-mobile-tabbar {
        position: fixed;
        left: 0.75rem;
        right: 0.75rem;
        bottom: calc(0.5rem + env(safe-area-inset-bottom));
        z-index: 90;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.25rem;
        padding: 0.45rem;
        border: 1px solid var(--border-color);
        border-radius: 1.35rem;
        background: var(--glass-bg);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
    }

    .nexofit-mobile-tabbar__item {
        min-width: 0;
        min-height: 54px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        border: 0;
        border-radius: 1rem;
        background: transparent;
        color: var(--text-muted);
        font-size: 0.67rem;
        font-weight: 700;
        line-height: 1;
        text-decoration: none;
    }

    .nexofit-mobile-tabbar__item i {
        font-size: 1rem;
    }

    .nexofit-mobile-tabbar__item.is-active {
        background: rgba(99, 102, 241, 0.14);
        color: var(--primary, #6366f1);
    }

    #auth-modal {
        align-items: flex-end !important;
    }

    #auth-modal-content {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
    }

    #auth-modal-content .p-8 {
        padding: 1.25rem !important;
    }
}

@media (max-width: 375px) {
    body > nav.glass {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }

    body > nav.glass .font-heading.text-2xl {
        font-size: 1.1rem !important;
    }

    body > nav.glass .flex.items-center.gap-3:last-child .relative.group {
        display: none;
    }

    .nexofit-three-column-layout {
        padding-top: 2rem !important;
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }

    .nexofit-main-scroll .glass-card,
    .nexofit-main-scroll article,
    .nexofit-sidebar-left .nexofit-sidebar-inner {
        padding: 0.8rem !important;
    }

    .nexofit-main-scroll h1 {
        font-size: 1.32rem !important;
    }

    .nexofit-main-scroll .w-full.h-\[280px\] {
        height: 200px !important;
    }

    .nexofit-main-scroll .w-full.h-\[280px\] p {
        display: none;
    }

    .nexofit-main-scroll article .flex.items-start.gap-4 {
        gap: 0.75rem !important;
    }

    .nexofit-sidebar-left li a span.font-medium {
        max-width: 6.5rem;
    }

    .nexofit-sidebar-left {
        margin-top: 1.9rem !important;
    }

    .nexofit-mobile-tabbar {
        left: 0.5rem;
        right: 0.5rem;
        bottom: calc(0.35rem + env(safe-area-inset-bottom));
    }

    .nexofit-mobile-tabbar__item {
        min-height: 50px;
        font-size: 0.62rem;
    }
}
