/* Matrak Styling */

body {
  font-family: 'Inter', sans-serif;
}

h1 {
  font-weight: 700; /* Use a heavier weight for headings */
}

p {
  font-weight: 400; /* Normal weight for paragraph text */
}

.legendPanel {
  background-color: rgba(255, 255, 255, 0.94) !important;
  display: flex !important;
  flex-direction: column !important;
}

.legendPanel > .docking-panel-title {
  box-shadow: 0px 3px 5px 0 rgba(0, 0, 0, 0.1);
}

.legendContent {
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: scroll;
  margin-bottom: 15px;
}

.legendItem {
  margin-bottom: 5px;
  align-items: center;
  display: flex;
}

.legendSwatch {
  width: 42px;
  height: 12px;
  margin-right: 9px;
  border: none;
}

.editPanel {
  background-color: rgba(255, 255, 255, 0.94) !important;
}

.editPanel > .docking-panel-title {
  box-shadow: 0px 3px 5px 0 rgba(0, 0, 0, 0.1);
}

.docking-panel-title {
  flex-shrink: 0;
}

.editContent {
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: scroll;
  margin-bottom: 15px;
}

.editItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  margin-left: 20px;
  margin-right: 20px;
}

.editLabel {
  font-weight: bold;
}

.descriptionRow {
  height: 30px;
}

/* Custom select styling */
#statusSelect {
  color: rgb(10, 19, 28);
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 4px;
  display: block;
  font-size: 14px;
  padding: 10px;
  padding-right: 26px; /* for the arrow */
  width: 100%;
  box-sizing: border-box; /* Include padding in the box size */
  -webkit-appearance: none; /* Removes default chrome and safari style */
  -moz-appearance: none; /* Removes default style Firefox */
  appearance: none; /* Removes default style */
}

#statusSelect:focus {
  outline: none;
}

#statusSelectWrapper {
  position: relative;
  width: 100%;
}

/* Custom select arrow styling */
#statusSelectWrapper::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #cccccc;
  position: absolute;
  right: 10px;
  top: 17px;
  pointer-events: none;
  z-index: 1;
}

/* Custom select styling */
#projectSelect {
  color: rgb(10, 19, 28);
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 4px;
  display: block;
  font-size: 1em;
  padding: 10px;
  padding-right: 26px; /* for the arrow */
  width: 100%;
  box-sizing: border-box; /* Include padding in the box size */
  -webkit-appearance: none; /* Removes default chrome and safari style */
  -moz-appearance: none; /* Removes default style Firefox */
  appearance: none; /* Removes default style */
}

#projectSelect:focus {
  outline: none;
}

#projectSelectWrapper {
  position: relative;
  width: 100%;
}

/* Custom select arrow styling */
#projectSelectWrapper::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #cccccc;
  position: absolute;
  right: 10px;
  top: 17px;
  pointer-events: none;
  z-index: 1;
}

#toolbar {
  display: flex;
  justify-content: left;
  align-items: center;
}

.editPanelButton {
  padding-right: 15px;
  font-size: 16px; /* Adjust icon size */
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.editPanelButton:hover {
  background-color: #e9e9e9;
}

.editPanelButton i {
  color: #333;
}

.editPanelValue {
  overflow-wrap: anywhere;
}

.editPanel {
  display: flex !important;
  flex-direction: column !important;
}

/* Autodesk Platform Service Tutorial */
body, html {
    margin: 0;
    padding: 0;
    height: 100vh;
}

#header, #sidebar, #preview, #login-screen {
    position: absolute;
}

#login-screen {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    top: 62px;
    bottom: 0;
    background-color: #E3F2FF;
}

#login-form {
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;

    margin-bottom: 62px;
    width: 420px;
    height: 440px;
    background-color: white;
    border-radius: 8px;
}
#login-form h2 {
  color: #333;
  margin-bottom: 4vh;
  font-size: 28px;
}

#login-form p {
  color: #666;
  font-size: 14px;
  text-align: center;
}

#login-form a {
  color: #3B5FFF;
  text-decoration: none;
  font-size: 14px;
}

#login-form a:hover {
  text-decoration: underline;
}

#login-form #login-form-temp {
  width: 80%;
}


.input-group {
  margin-bottom: 12px;
  display: flex;
  position: relative;
  justify-content: center;
}

.input-group input {
  width: calc(100% - 20px);
  padding: 10px;
  margin: 0 10px 0 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
}

#login-password {
  padding-right: 80px;
}

/* .forgot-password {
  display: block;
  text-align: right;
  margin-top: 5px;
  position: absolute;
  right: 20px;
  top: 4px;
} */

.login-button {
  width: 100%;
  padding: 10px;
  background-color: #3B5FFF;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  width: calc(100% - 20px);
}

.login-button:hover {
  background-color: #003d82;
}

.signup-link {
  margin-top: 15px;
}

#header {
    height: 62px;
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    background-color: #e2e7ff;
    justify-content: space-between;
}

#logo-div, #settingsButtons {
    display: flex;
    align-items: center;
}

#sidebar {
    --sidebar-width: 30vw; /* Default to 30% of viewport width */
    width: var(--sidebar-width);
    right: calc(-1 * var(--sidebar-width)); /* Hidden by default on the right */
    top: 0;
    bottom: 0;
    height: 100vh;
    overflow-y: hidden; /* Remove auto scroll from main sidebar */
    background-color: #f8f9fa;
    border-left: 1px solid #dee2e6;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    visibility: visible; /* Make visible by default */
    min-width: 200px;
    max-width: 50vw; /* Half screen width */
    position: fixed;
    display: flex;
    flex-direction: column;
}

#sidebar.open {
    right: 0; /* Visible when open */
}

/* Show sidebar when visible, but keep closed by default */
#sidebar.visible {
    visibility: visible; /* Show when needed */
}

/* Open sidebar by default when visible */
#sidebar.visible.open {
    right: 0; /* Open only when both visible and open */
}

#sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1;
}

#sidebar-header h3 {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

#sidebar-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#sidebar-close:hover {
    background-color: #e9ecef;
    color: #495057;
}

#sidebar-resize-handle {
    position: absolute;
    top: 0;
    left: 0; /* Move to left side for right-positioned sidebar */
    width: 4px;
    height: 100%;
    background-color: transparent;
    cursor: col-resize;
    z-index: 1001;
    transition: background-color 0.2s;
}

#sidebar-resize-handle:hover {
    background-color: #007bff;
}

#sidebar-resize-handle.resizing {
    background-color: #0056b3;
}

#sidebar-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: #495057;
    cursor: pointer;
    padding: 8px 12px;
    margin-right: 15px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

#sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent overflow on the main content container */
}

#project-section {
    flex-shrink: 0; /* Fixed height - won't shrink */
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background-color: #ffffff;
}

#project-section-title, #model-section-title {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

#model-section {
    flex: 1; /* Take remaining space */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

#tree {
    flex: 1;
    overflow-y: auto; /* Make tree scrollable */
    margin: 0;
    padding: 0;
    background-color: transparent;
}

#projectSelect {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #ffffff;
    font-size: 14px;
    color: #495057;
}

/* Placeholder message styling */
#placeholder-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #6c757d;
    font-size: 18px;
    z-index: 1;
}

#placeholder-message p {
    margin: 0;
    padding: 20px;
    background-color: rgba(248, 249, 250, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#sidebar-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    background-color: #ffffff;
}

#sign-out-button {
    width: 100%;
    padding: 10px;
    background-color: #3B5FFF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#sign-out-button:hover {
    background-color: #003d82;
}

/* Overlay when sidebar is open */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#preview {
    width: 100%;
    left: 0;
    top: 62px;
    bottom: 0;
}

#connect-autodesk {
    font-size: 1em;
    margin-right: 24px;
    margin-left: 24px;
    background-color: white;
    border-radius: 4px;
    border: none;
    /* padding: 6px 24px; */
    min-width: 110px;
    height: 36px;
}

#header .logo {
    height: auto;
    padding-left: 24px;
}

#header .title {
    height: auto;
    padding-left: 12px;
}

#tree {
    margin: 0;
    padding: 10px 15px;
    background-color: transparent;
}

@media (max-width: 768px) {
    #sidebar {
        --sidebar-width: 90vw;
        width: var(--sidebar-width);
        right: calc(-1 * var(--sidebar-width));
        max-width: 90vw; /* Override the 50vw for mobile */
    }
    #sidebar.open {
        right: 0;
    }
    #preview {
        width: 100%;
        left: 0;
        top: 62px;
        bottom: 0;
    }
}

.icon-hub:before {
    background-image: url(https://raw.githubusercontent.com/primer/octicons/main/icons/apps-16.svg); /* or https://raw.githubusercontent.com/primer/octicons/main/icons/stack-16.svg */
    background-size: cover;
}

.icon-project:before {
    
    background-image: url(https://raw.githubusercontent.com/primer/octicons/main/icons/project-16.svg); /* or https://raw.githubusercontent.com/primer/octicons/main/icons/organization-16.svg */
    background-size: cover;
}

.icon-my-folder:before {
    background-image: url(https://raw.githubusercontent.com/primer/octicons/main/icons/file-directory-16.svg);
    background-size: cover;
}

.icon-item:before {
    background-image: url(https://raw.githubusercontent.com/primer/octicons/main/icons/file-16.svg);
    background-size: cover;
}

.icon-version:before {
    background-image: url(https://raw.githubusercontent.com/primer/octicons/main/icons/clock-16.svg);
    background-size: cover;
}
