/* -----------------------------
   Redbaron Public Frontend Styles
   ----------------------------- */

/* Dashboard wrapper */
.redbaron-dashboard-wrapper {
    position: relative;
    overflow: hidden;
    max-width: 1000px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Top bar */
.redbaron-top-bar-wrapper {
    position: sticky;
    top: 0;
    z-index: 9;
    padding-top: 15px;
    background: #fff;
}

.redbaron-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;
}

#redbaron-menu-trigger {
    cursor: pointer;
    font-size: 20px;
    background: none;
    border: none;
}

/* Slide-in category menu */
.redbaron-slide-menu {
    position: fixed;
    top: 0;
    right: -260px;
    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 */
.redbaron-slide-menu.open {
    right: 0;
}

.redbaron-slide-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
}

#redbaron-close-menu {
    background: none;
    border: none;
    font-size: 25px;
    cursor: pointer;
}

.redbaron-slide-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.redbaron-slide-menu li {
    padding: 0px 15px;
    cursor: pointer;
}

.redbaron-slide-menu li:hover {
    background-color: #e2e2e2;
}

/* Units grid */
.redbaron-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Unit card */
.redbaron-unit-card {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    background-color: #fff;
    transition: box-shadow 0.2s;
}

.redbaron-unit-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.redbaron-unit-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    display: block;
}

.redbaron-unit-card input[type="text"],
.redbaron-unit-card input[type="number"] {
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    box-sizing: border-box;
    border-radius: 5px;
}

/* Password form */
.redbaron-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;
}

.redbaron-password-wrapper .button.button-primary {
    margin-top: 10px;
    padding: 1px 20px;
}

.redbaron-password-wrapper h2 {
    font-size: 20px;
}

/* Overlay */
.redbaron-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;
}

.redbaron-dashboard-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* No scroll when overlay is active */
body.redbaron-no-scroll {
    overflow: hidden;
}


/* Logout button */
#redbaron-logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin: 0 10px;
    color: #000;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#redbaron-logout-btn svg {
    display: block;
    width: 20px;
    height: 20px;
}