/* =====================================================
   NTS KFora - CUSTOM CSS
   ===================================================== */


/* =====================================================
   DARK MODE
   ===================================================== */

body.dark-active #kunena.layout .ksection .ksection-body .kcat-list .krow,
body.dark-active #kunena.layout .krow.category {
    background-color: #2a2e34 !important;
}


/* =====================================================
   DESKTOP / GENERAL CATEGORY ICON
   ===================================================== */

#kunena .krow.category {
    min-height: 105px !important;
    align-items: center !important;
}


/* Στήλη icon */
#kunena .krow.category .kcol-icon {
    width: 60px !important;
    min-width: 60px !important;
    flex: 0 0 60px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: visible !important;
}


/* Link γύρω από το icon */
#kunena .krow.category .kcol-icon > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}


/* Legacy railway signal icon */
#kunena .krow.category .kicon-folder {
    width: 34px !important;
    height: 82px !important;

    min-width: 34px !important;
    min-height: 82px !important;

    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;

    overflow: visible !important;
}


/* =====================================================
   MOBILE
   Icon αριστερά
   Τίτλος + περιγραφή δεξιά
   Topics + Replies στην ίδια γραμμή
   ===================================================== */

@media (max-width: 767px) {

    /* -----------------------------------------------
       CATEGORY CONTAINER
       ----------------------------------------------- */

    #kunena .krow.category {
        display: grid !important;

        /*
         * Στήλη 1 = φανάρι
         * Στήλη 2 = Topics
         * Στήλη 3 = Replies
         */
        grid-template-columns: 46px auto auto !important;
        grid-template-rows: auto auto !important;

        column-gap: 8px !important;
        row-gap: 6px !important;

        align-items: start !important;

        min-height: 105px !important;

        padding: 10px 10px 10px 6px !important;
    }


    /* -----------------------------------------------
       ΑΡΙΣΤΕΡΗ ΣΤΗΛΗ - ΦΑΝΑΡΙ
       ----------------------------------------------- */

    #kunena .krow.category .kcol-icon {
        grid-column: 1 !important;
        grid-row: 1 / 3 !important;

        width: 46px !important;
        min-width: 46px !important;
        height: auto !important;

        flex: none !important;

        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;

        padding: 0 !important;
        margin: 0 !important;

        overflow: visible !important;
    }


    #kunena .krow.category .kcol-icon > a {
        display: block !important;

        width: 36px !important;
        height: 88px !important;

        padding: 0 !important;
        margin: 0 !important;
    }


    #kunena .krow.category .kicon-folder {
        width: 34px !important;
        height: 82px !important;

        min-width: 34px !important;
        min-height: 82px !important;

        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: top left !important;

        padding: 0 !important;
        margin: 0 !important;

        overflow: visible !important;
    }


    /* -----------------------------------------------
       ΤΙΤΛΟΣ + ΠΕΡΙΓΡΑΦΗ
       ----------------------------------------------- */

    #kunena .krow.category .kcol-title {
        grid-column: 2 / 4 !important;
        grid-row: 1 !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        padding: 0 !important;
        margin: 0 !important;
    }


    #kunena .krow.category .kcol-title h3 {
        margin-top: 0 !important;
        margin-bottom: 4px !important;
    }


    #kunena .krow.category .kcat-desc {
        margin: 0 !important;
    }


    /* -----------------------------------------------
       TOPICS + REPLIES
       ----------------------------------------------- */

    #kunena .krow.category .kcol-stats {
        grid-row: 2 !important;

        width: auto !important;
        min-width: 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;

        gap: 4px !important;

        padding: 0 !important;
        margin: 4px 0 0 0 !important;
    }


    /* Topics */
    #kunena .krow.category .kcol-title + .kcol-stats {
        grid-column: 2 !important;
    }


    /* Replies */
    #kunena .krow.category .kcol-title + .kcol-stats + .kcol-stats {
        grid-column: 3 !important;
    }


    /* -----------------------------------------------
       LAST POST
       ----------------------------------------------- */

    #kunena .krow.category .kcol-latest-post {
        grid-column: 2 / 4 !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        padding-left: 0 !important;
        margin-left: 0 !important;
    }

}
/* =====================================================
   TOPICS - ΣΙΔΗΡΟΔΡΟΜΙΚΑ ΦΑΝΑΡΙΑ
   Κίτρινο = διαβασμένο
   Πράσινο = νέα μηνύματα
   ===================================================== */

#kunena .krow.topic .kcol-icon {
    width: 60px !important;
    min-width: 60px !important;
    flex: 0 0 60px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: visible !important;
}

#kunena .krow.topic .topic-author-wrapper {
    width: 34px !important;
    height: 82px !important;

    position: relative !important;
    display: block !important;

    padding: 0 !important;
    margin: 0 !important;
}

/* Κρύβουμε γράμμα/avatar δημιουργού */
#kunena .krow.topic .topic-author-wrapper > .no-avatar {
    display: none !important;
}

/* Κρύβουμε το υπάρχον default topic icon */
#kunena .krow.topic .topic-icon {
    display: none !important;
}

/* READ TOPIC = ΚΙΤΡΙΝΟ */
#kunena .krow.topic .topic-author-wrapper::before {
    content: "" !important;

    display: block !important;

    width: 34px !important;
    height: 82px !important;

    background-image: url('/media/kunicons/folder_nonew.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
}

/* UNREAD / NEW TOPIC = ΠΡΑΣΙΝΟ */
#kunena .krow.topic:has(.knewchar) .topic-author-wrapper::before {
    background-image: url('/media/kunicons/folder.png') !important;
}
/* Κρύβουμε κανονικό avatar ΚΑΙ no-avatar γράμμα */
#kunena .krow.topic .topic-author-wrapper > .user-avatar,
#kunena .krow.topic .topic-author-wrapper > .no-avatar {
    display: none !important;
}
/* =====================================================
   ΚΑΘΑΡΙΣΜΑ BACKGROUND ΠΙΣΩ ΑΠΟ ΤΑ ΦΑΝΑΡΙΑ
   ===================================================== */

/* Κατηγορίες */
#kunena .krow.category:not(.topic) .kcol-icon,
#kunena .krow.category:not(.topic) .kcol-icon > a,
#kunena .krow.category:not(.topic) .kicon-folder {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Αν υπάρχει pseudo background */
#kunena .krow.category:not(.topic) .kcol-icon::before,
#kunena .krow.category:not(.topic) .kcol-icon::after,
#kunena .krow.category:not(.topic) .kcol-icon > a::before,
#kunena .krow.category:not(.topic) .kcol-icon > a::after,
#kunena .krow.category:not(.topic) .kicon-folder::before,
#kunena .krow.category:not(.topic) .kicon-folder::after {
    display: none !important;
    content: none !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Topics */
#kunena .krow.topic .kcol-icon,
#kunena .krow.topic .topic-author-wrapper,
#kunena .krow.topic .topic-author-wrapper::before {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Αν υπάρχει background στο wrapper των topics */
#kunena .krow.topic .kcol-icon,
#kunena .krow.topic .topic-author-wrapper {
    background: transparent !important;
}