/* -----------------------------
   Blockone Public Frontend Styles
   ----------------------------- */

/* Dashboard wrapper */
.blockone-dashboard-wrapper {
    position: relative; /* IMPORTANT */
    overflow: hidden; /* Prevent slide-out beyond wrapper */
    max-width: 1000px;
    /*margin: 20px auto; */
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Top bar */
.blockone-top-bar-wrapper{
    position: sticky;
    top: 0;
    z-index: 9;
    padding-top:15px;
    background:#fff;
}


.blockone-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 5px 20px;
    background: #f7f7f7;
    border-radius: 4px;
    border: 1px solid #ccc;
    
}


#blockone-menu-trigger {
    cursor: pointer;
    font-size: 20px;
    background: none;
    border: none;
}

/* Slide-in category menu */
.blockone-slide-menu {
    position: fixed;
    top: 0;
    right: -260px; /* Hidden off screen */
    width: 260px;
    height: 100%;
    background: #fafafa;
    border-left: 1px solid #ccc;
    border-radius: 0 6px 6px 0;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
    transition: right 0.35s ease;
    z-index: 20;
    padding-bottom:20px;
}

/* Slide-in open state */
.blockone-slide-menu.open {
    right: 0;
}

.blockone-slide-menu-header {
    display: flex;
    justify-content: space-between;
    align-items:center;
    padding: 12px;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
}

#blockone-close-menu {
    background: none;
    border: none;
    font-size: 25px;
    cursor: pointer;
}

.blockone-slide-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blockone-slide-menu li {
    padding: 0px 15px;
    cursor: pointer;
}    


.blockone-slide-menu li:hover {
    background-color: #e2e2e2;
}

/* Units grid */
.blockone-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Unit card */
.blockone-unit-card {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    background-color: #fff;
    transition: box-shadow 0.2s;
}

.blockone-unit-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.blockone-unit-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    display: block;
}

.blockone-unit-card input[type="text"],
.blockone-unit-card input[type="number"] {
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    box-sizing: border-box;
    border-radius:5px;
}

/* Password form */
.blockone-password-wrapper {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
    
}

.blockone-password-wrapper .button.button-primary {
    margin-top:10px;
    padding: 1px 20px;
}

.blockone-password-wrapper h2 {
    font-size: 20px;
}



/* Overlay inside wrapper */
.blockone-dashboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10; /* under the slide menu but above content */
}

.blockone-dashboard-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


/*no scroll when overlay is active*/
body.blockone-no-scroll {
    overflow: hidden;
}





/*image viewer "lightbox"*/
#blockone-image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#blockone-image-viewer.active {
    opacity: 1;
    pointer-events: auto;
}

#blockone-image-viewer img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}




/*log out button "padlock svg"*/
#blockone-logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin: 0 10px;
    color: #000; /* black icon */
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#blockone-logout-btn svg {
    display: block;
    width: 20px;
    height: 20px;
}


