
/* =========================================================
   WIRELAB — SHARED LIBRARY STYLES
   Fixed card styling / Responsive grid
========================================================= */


/* =========================================================
   1. SHARED LIBRARY PAGE LAYOUT
========================================================= */
.library-page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
    color: var(--wire-text);
}


/* SECTION HEADER */
.page-width > h1 {
    font-size: 14px;
    line-height: 1.3;
    padding-bottom: 2px;
}


/* =========================================================
   2. LIBRARY GRID
   Desktop: 4 columns
   Tablet:  3 columns
   Mobile:  2 columns maximum
========================================================= */
.library-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 5px;
    align-items: start;

    width: 100%;
    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* =========================================================
   3. LIBRARY CARD
   Fixed internal styling
   No aspect-ratio scaling
========================================================= */
.library-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 1px;

    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    aspect-ratio: 5/3.5;
    box-sizing: border-box;
    overflow: hidden;

    padding: 5px;

    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: normal;

    background: var(--wire-card);
    border: 1px solid var(--wire-border2);
    border-radius: 12px;

    color: var(--wire-text);

    /* Prevent visual scaling or animated repositioning */
    transform: none;
    transition: border-color 0.2s ease;
}




/* =========================================================
   4. LOGO — UPPER RIGHT
========================================================= */
.library-card-logo {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    min-height: 56px;
    flex-shrink: 0;
}

.library-card-logo img {
    display: block;

    width: 56px;
    height: 56px;

    flex-shrink: 0;
    object-fit: contain;
}


/* =========================================================
   5. ICON + STATUS ROW
========================================================= */
.library-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    width: 100%;
    min-height: 30px;

    flex-shrink: 0;
}

.library-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 30px;
    line-height: 1;
}

.library-status {
    flex-shrink: 0;

    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.library-status.available {
    color: var(--wire-accent);
}

.library-status.planned {
    color: var(--wire-text-muted2);
}


/* =========================================================
   6. CATEGORY
========================================================= */
.library-card-category {
    margin: 0;
    margin-right: auto;

    color: var(--wire-accent);

    font-size: 8px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}


/* =========================================================
   7. CARD TITLE
========================================================= */
.library-card h2 {
    margin: 0;

    color: var(--wire-text);

    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;

    overflow-wrap: break-word;
    word-break: normal;
}


/* =========================================================
   8. CARD DESCRIPTION
========================================================= */
.library-description {
    margin: 0;

    color: var(--wire-text-muted2);

    font-size: 11px;
    line-height: 1.35;

    overflow-wrap: break-word;
    word-break: normal;
}


/* =========================================================
   9. CARD FOOTER
   Always positioned at the bottom of its card
========================================================= */

.library-card-footer {
    margin-top: auto;
    padding-top: 4px;

    color: var(--wire-text-muted2);

    font-size: 10px;
    line-height: 1.3;
}


/* =========================================================
   10. CARD LINK
========================================================= */

.library-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;

    gap: 8px;

    max-width: 100%;

    color: var(--wire-accent);

    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}

.library-link:hover {
    color: var(--wire-accent-hover);
}


/* =========================================================
   11. EMPTY SEARCH RESULTS
========================================================= */

.library-empty {
    width: 100%;
    margin-top: 20px;
    padding: 24px;

    box-sizing: border-box;

    border: 1px solid var(--wire-border2);
    border-radius: 14px;

    text-align: center;
}

.library-empty[hidden] {
    display: none;
}


/* =========================================================
   12. COMMUNITY CREATOR SECTION
========================================================= */

.library-creator {
    width: 100%;
    margin-top: 10px;
    padding: 24px;

    box-sizing: border-box;

    border: 1px solid var(--wire-border2);
    border-radius: 14px;

    background: var(--wire-card);
}

.library-eyebrow {
    margin: 0;

    color: var(--wire-accent);

    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1.2px;
}

.library-creator h2 {
    margin: 8px 0;

    color: var(--wire-text);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
}

.library-creator > p:last-child {
    margin-bottom: 0;

    color: var(--wire-text-muted2);

    font-size: 16px;
    line-height: 1.6;
}





/* card electrical safety */
.card-electrical-safety {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../../z-images/card-electrical-safety.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* KEEP THE DESCRIPTION READABLE */
.card-electrical-safety .library-description {
    max-width: 100%;
    box-sizing: border-box;
}





/* card atomic structure */
.card-atomic-structure {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../../z-images/card-atomic-structure.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* KEEP THE DESCRIPTION READABLE */
.card-atomic-structure .library-description {
    max-width: 100%;
    box-sizing: border-box;
}





/* card electrical quantities and ohms law */
.card-electrical-quantities-and-ohms-law {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../../z-images/card-electrical-quantities-and-ohms-law.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* KEEP THE DESCRIPTION READABLE */
.card-electrical-quantities-and-ohms-law .library-description {
    max-width: 100%;
    box-sizing: border-box;
}












































/* static electricity */
.card-static-electricity {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../../z-images/card-static-electricity.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* KEEP THE DESCRIPTION READABLE */
.card-electrical-safety .library-description {
    max-width: 100%;
    box-sizing: border-box;
}





/* magnetism */
.card-magnetism {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../../z-images/card-magnetism.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* KEEP THE DESCRIPTION READABLE */
.card-atomic-structure .library-description {
    max-width: 100%;
    box-sizing: border-box;
}





/* resistors */
.card-resistors {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../../z-images/card-resistors.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* KEEP THE DESCRIPTION READABLE */
.card-electrical-quantities-and-ohms-law .library-description {
    max-width: 100%;
    box-sizing: border-box;
}














/* =========================================================
   13. TABLET
   Three columns
========================================================= */

@media (max-width: 799px) {
    .library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================================
   14. MOBILE
   Never more than two columns
========================================================= */

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

