/**
 * @package     LoginSecure
 * @subpackage  App Menu - Grid Subtemplate
 * @copyright   Copyright (C) 2009 - 2026 LoginSecure. All rights reserved.
 */

/* === GRID SUBTEMPLATE - App Dashboard === */

.lsam-grid-view {
    padding: 16px;
}

.lsam-grid {
    display: grid;
    grid-template-columns: repeat(var(--lsam-grid-cols, 3), 1fr);
    grid-gap: 10px;
    gap: 10px;
}

.lsam-grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: 14px;
    background: #f2f2f7;
    text-decoration: none;
    color: #1c1c1e;
    cursor: pointer;
    border: none;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    text-align: center;
    min-height: 80px;
    overflow: hidden;
    transition: background 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.lsam-mode-dark .lsam-grid-item {
    background: #2c2c2e;
    color: #f5f5f7;
}

.lsam-grid-item:active {
    opacity: 0.75;
}

.lsam-grid-item.lsam-item-active {
    background: #1c1c1c;
    color: #ffffff;
}

.lsam-mode-dark .lsam-grid-item.lsam-item-active {
    background: #1c1c1c;
}

.lsam-grid-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 26px;
    color: inherit;
    flex-shrink: 0;
}

.lsam-grid-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
}

.lsam-grid-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    color: inherit;
}

/* === GRID HEADER (level indicator) === */

.lsam-grid-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 4px 12px;
}

.lsam-mode-dark .lsam-grid-section-title {
    color: #636366;
}

/* === GRID ITEMS WITH BACKGROUND IMAGE === */

.lsam-grid-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.lsam-grid-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
    z-index: 1;
}

.lsam-grid-item.lsam-has-image .lsam-grid-icon,
.lsam-grid-item.lsam-has-image .lsam-grid-label {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.lsam-grid-item.lsam-has-image {
    justify-content: flex-end;
}

/* === OVERRIDE TEMPLATE HIDING ICONS IN GRID === */
.lsam-grid .lsam-grid-item .lsam-grid-icon {
    display: flex !important;
}