/*
 * Copyright (c) 2024 Biovisuals Private Limited
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of Biovisuals Private Limited.
 * You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the license agreement you entered into with Biovisuals Private Limited.
 */

/* Top Bar Left Section */
.top-bar-left {
    display: flex;
    align-items: center;
}

.logo {
    width: 100px;
    height: auto; 
    margin-right: 5px; 
}

/* 🔹 Top Bar Right - Dashboard & Save Status */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 🔹 Save Status Container */
#data-save-container {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 170px;
    justify-content: flex-end;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

/* Saved Text */
.data-saved,
.data-saving {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
}

.data-saved {
    color: #ffffff;
}

.data-saving {
    color: rgb(203, 203, 203);
}

.d-none {
    display: none !important;
}

/* 💾 Save Button */
.save-btn {
    background: transparent;
    color: rgb(255, 255, 255);
    border: none;
    padding: 6px 5px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease-in-out;
}

.save-btn i {
    font-size: 14px;
}

.save-btn:hover {
    background: rgb(201, 200, 200);
    transform: scale(1.05);
}

/* 📊 Dashboard Button */
.dashboard-btn {
    display: flex;
    align-items: center;
    color: rgb(255, 255, 255);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    gap: 6px;
    cursor: pointer;
}

.dashboard-btn i {
    font-size: 14px;
}

.dashboard-btn:hover {
    background: rgb(215, 215, 215);
    transform: scale(1.05);
}

/* 📱 Responsive Design */
@media (max-width: 768px) {
    .top-bar-right {
        flex-direction: row;
        gap: 5px;
    }

    .save-btn, .dashboard-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* 🎨 Top Tools Bar */
.top-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    height: 32px;
    color: rgb(27, 38, 59);
    background: linear-gradient(90deg, #FF6F00 0%, #FFA726 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    position: relative;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

/* Apply consistent font to all buttons inside top-tools */
.top-tools .top-btn,
.top-tools .dropbtn,
.top-tools .dashboard-btn,
.top-tools .save-btn,
.top-tools .export-btn,
.top-tools .btn-label {
    font-family: 'Arial', 'Helvetica', sans-serif;
}

/* Left Menu Styles */
.left-menu {
    display: flex;
    align-items: center;
}

/* Center Tools Styles */
.center-tools {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0;
    margin: 0;
}

/* 🛠️ Top Toolbar Buttons */
.top-btn, .dropbtn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: rgb(255, 255, 255);
    padding: 3px;
    border: none;
    cursor: pointer;
    font-size: 10px;
    width: 42px;
    height: 32px;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.15s ease;
    text-align: center;
    box-shadow: none;
}

.top-btn i, .btn-label {
    color: rgb(255, 255, 255);
}

.top-btn i, .dropbtn i, .top-btn img, .dropbtn img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.top-btn:hover, .dropbtn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.top-btn:active, .dropbtn:active {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}

.center-tools .top-btn {
    margin: 0 1px;
}

.top-btn i, .dropbtn i {
    font-size: 14px;
    filter: brightness(0.95);
}

.top-btn:focus, .dropbtn:focus {
    outline: none;
    background-color: transparent;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 100px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border-radius: 4px;
    padding: 3px 0;
}

.dropdown-content a {
    display: block;
    padding: 5px 7px;
    text-decoration: none;
    font-size: 12px;
    color: black;
    transition: background-color 0.2s ease-in-out;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #333;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: rgba(255, 255, 255, 0.1);
}

.center-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0;
}

.btn-label {
    font-size: 10px;
    color: rgb(255, 255, 255);
    margin-top: 2px;
    text-align: center;
    line-height: 1.2;
}

.shortcut {
    float: right;
    color: #888;
    font-size: 12px;
    margin-left: 10px;
}

/* -----------------------Grid Overlay--------------------------- */
#grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-size: 20px 20px;
    background-image:
        linear-gradient(to right, rgba(200, 200, 200, 0.5) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(200, 200, 200, 0.5) 1px, transparent 1px);
}

/* -----------------------Export Button Styling--------------------------- */
.export-btn {
    display: flex;
    align-items: center;
    gap: 2px;
    background: transparent;
    color: rgb(255, 255, 255);
    padding: 5px 5px;
    font-size: 10px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.export-btn i {
    font-size: 16px;
}

.export-btn:hover {
    background: gray;
    transform: scale(1.05);
}

.export-btn:active {
    transform: scale(0.95);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .top-tools {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        padding: 8px;
    }

    .center-tools {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .top-btn, .dropbtn {
        width: 38px;
        height: 38px;
        font-size: 8px;
    }

    .btn-label {
        font-size: 9px;
        margin-top: 1px;
    }
}

@media (max-width: 768px) {
    .top-tools {
        flex-direction: column;
        align-items: center;
    }

    .top-bar-left,
    .top-bar-right {
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }

    .logo {
        height: 30px;
        margin-right: 5px;
    }

    .center-tools {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .top-btn, .dropbtn {
        width: 36px;
        height: 36px;
        font-size: 8px;
    }

    .dashboard-btn, .save-btn {
        font-size: 10px;
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .top-tools {
        flex-direction: column;
        align-items: center;
        height: auto;
        padding: 5px;
    }

    .center-tools {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .top-btn, .dropbtn {
        width: 34px;
        height: 34px;
        font-size: 8px;
    }

    .btn-label {
        font-size: 8px;
        line-height: 1;
    }

    .dashboard-btn, .save-btn {
        font-size: 9px;
        padding: 4px 6px;
    }

    .export-btn {
        font-size: 10px;
        padding: 8px 12px;
    }
}

.top-user-menu {
    position: relative;
}

.top-user-menu ul {
    display: none;
    padding: 0;
    margin: 0;
    background-color: white;
    list-style: none;
    position: absolute;
    top: 3rem;
    right: 0;
    min-width: 120px;
    z-index: 999;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    overflow: hidden;
}

.top-user-menu.active ul {
    display: block;
}

.top-user-menu ul li a {
    text-decoration: none;
    color: black;
    padding: 0.5rem 1rem;
    display: block;
}

.top-user-menu ul li a:hover {
    background-color: #f1f1f1;
}

#token_logout {
    cursor: pointer;
}
/* 🔧 Default styles */
.hamburger-icon {
  display: none;
  font-size: 26px;
  padding: 10px 15px;
  cursor: pointer;
  color: white;
  z-index: 999;
}

.mobile-toolbar {
  display: none;
  flex-direction: column;
  background-color: #1e1e1e;
  padding: 15px;
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  z-index: 1000;
}

.mobile-toolbar button {
  margin-bottom: 8px;
  font-size: 14px;
}

/* 📱 Show hamburger, hide desktop toolbar */
@media (max-width: 1024px) {
  .toolbar-wrapper {
    display: none;
  }

  .hamburger-icon {
    display: block;
  }

  .mobile-toolbar.show {
    display: flex;
  }
}


/* ✅ Avatar visibility and sizing fix */
.top-user-menu img#user_image {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff; /* visible against orange background */
  background-color: #fff;
  flex-shrink: 0;
}

/* Ensure avatar and name align properly */
.top-user-menu .dashboard-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}

.top-user-menu .dashboard-btn span#user_fullname {
  color: #fff;
  text-transform: capitalize;
}
.top-user-menu img#user_image {
  border: 1.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 3px rgba(0,0,0,0.1);
}
#user_image {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #fff !important;
  background-color: #fff !important;
  display: inline-block !important;
  position: relative !important;
  z-index: 10000 !important;
}
