/**
 * Logical Gateway
 * CSS
 */

/* Login page */
div#loginHolder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
div#loginFooter {
    font-size: var(--text-sm);
    color: var(--neutral-400);
    text-align: center;
}

div#loginCard {
    width: 400px;
    padding: var(--sp-5);
}

/* Collection switcher */
div#collectionSwitcher {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--neutral-200);
    cursor: pointer;
    width: 100%;
    justify-content: space-between;
    position: relative;
}
div#collectionSwitcher:hover {
    background: var(--neutral-50);
}

div#collectionSwitcherDD {
    position: absolute;
    top: 100%;
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    z-index: 1000; 
    display: none;
    width: 100%;
    left: 0;
    right: 0;
}
div#collectionSwitcherDD.open {
    display: block;
}

/** Manage collections */
div#collectionCard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.collectionCard {
    display: flex;
    flex-direction: column;
}
.collectionCard:hover {
    border-color: var(--teal-400);
}

.collectionCard-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.collectionCard-topHolder {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.collectionCard-icon {
    width: 38px;
    height: 38px;
    background: var(--teal-50);
    color: var(--teal-600);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.collectionCard-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--neutral-900);
}

.collectionCard-description {
    font-size: var(--text-sm);
    color: var(--neutral-500);
    line-height: 1.5;
    margin-bottom: 15px;
    white-space: pre-wrap;
    flex: 1;
}

.collectionCard-footer {
    border-top: 1px solid var(--neutral-100);
    padding-top: 10px;
    font-size: var(--text-sm);
    color: var(--neutral-400);
}

.collectionCard-menu {
    width: 26px;
    height: 26px;
    color: var(--neutral-400);
    font-size: var(--text-base);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}
.collectionCard-menu:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.collectionCard-menuDD {
    position: absolute;
    right: 0;
    top: 25px;
    width: 200px;
    display: none;
}
.collectionCard-menuDD.open {
    display: block;
}

/* Bookmark grid */
div#bookmarkCard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.bookmarkCard {
    display: flex;
    flex-direction: column;
    position: relative;
}
.bookmarkCard:hover {
    border-color: var(--teal-400);
    cursor: pointer;
}

.bookmarkCard-top {
    display: flex;
    justify-content: space-between;
}
.bookmarkCard-topLeft {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bookmarkCard-icon {
    width: 28px;
    height: 28px;
    background: var(--teal-50);
    color: var(--teal-600);
    border: 1px solid var(--teal-100);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bookmarkCard-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--neutral-900);
}
.bookmarkCard-description {
    font-size: 12px;
    color: var(--neutral-400);
    margin-top: 2px;
    margin-left: 38px;
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
    flex: 1;
}

.bookmarkCard-menu {
    width: 22px;
    height: 22px;
    color: var(--neutral-400);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.bookmarkCard-menu:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}
.bookmarkCard-menu i {
    color: var(--neutral-400);
}

.bookmarkCard-footer {
    border-top: 1px solid var(--neutral-100);
    padding-top: 10px;
    font-size: 11px;
    color: var(--neutral-400);
    display: flex;
    justify-content: space-between;
}
.bookmarkCard-footer-date {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

.bookmarkCard-menuDD {
    position: absolute;
    right: 0;
    top: 22px;
    width: 150px;
    display: none;
}
.bookmarkCard-menuDD.open {
    display: block;
}

.bookmarkCard-link {
    text-decoration: none;
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Stat cards */
.stat-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.stat-card {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}
.stat-card-icon {
    width: 34px;
    height: 34px;
    background: var(--teal-50);
    color: var(--teal-500);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
html[data-mode="admin"] .stat-card-icon {
    background: var(--amber-50);
    color: var(--amber-500);
}
.stat-card-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--neutral-900);
    line-height: 1.2;
}
.stat-card-label {
    font-size: 11.5px;
    color: var(--neutral-400);
    margin-top: 5px;
}