// .object-view-navbar {
//   position: sticky;
//   top: 0;
//   z-index: 1020;
//   background: rgba(255, 255, 255, 0.95);
//   -webkit-backdrop-filter: blur(12px);
//   backdrop-filter: blur(12px);
//   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
//   padding: 0.5rem 1rem;

//   .row {
//     max-width: 1440px;
//     margin: 0 auto;
//   }
// }



.relation-modal {
  max-width: 820px;

  .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);

    &.show {
      display: block;
      opacity: 1;
    }
  }

  .modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    display: none;
    overflow: hidden;

    &.show {
      display: block;
    }

    &-dialog {
      max-width: 900px;
      margin: 2rem auto;
      max-height: 90vh;
    }

    &-content {
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      border: 1px solid rgba(0, 0, 0, 0.06);
      background: rgba(255, 255, 255, 0.95);
      -webkit-backdrop-filter: blur(20px);
      backdrop-filter: blur(20px);
    }

    &-header {
      position: sticky;
      top: 0;
      z-index: 3;
      background: rgba(255, 255, 255, 0.9);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      border-bottom: 1px solid rgba(0, 0, 0, 0.08);
      padding: 1.25rem;
    }

    &-body {
      padding: 0 1.25rem;
      overflow: auto;
      max-height: 60vh;
    }

    &-footer {
      border-top: 1px solid rgba(0, 0, 0, 0.08);
      padding: 1rem;
      background: rgba(255, 255, 255, 0.9);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }


    .modal-header {
      color: #ffffff;
      background: linear-gradient(195deg, #d34514, #e94d18);
    }
  }

  .relation-table {
    width: 100%;
    --selection-color: #e94d18;

    th {
      position: sticky;
      top: -1px;
      z-index: 2;
      background: rgba(248, 249, 250, 0.9);
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
      font-weight: 600;
      padding: 1rem;
      border-bottom: 2px solid #e9ecef;
    }

    td {
      padding: 1rem;
      border-bottom: 1px solid #f1f1f1;
    }

    tr.selected {
      background: rgba(255, 109, 0, 0.06);
      box-shadow: inset 3px 0 0 var(--selection-color);
    }

    .role-buttons {
      display: flex;
      gap: 0.5rem;

      button {
        padding: 0.375rem 1rem;
        border-radius: 20px;
        border: 1px solid #ddd;
        background: #f8f8f8;
        transition: all 0.2s ease;

        &.active {
          background: var(--selection-color);
          color: white;
          border-color: var(--selection-color);
        }
      }
    }
  }

  .loading-state {
    padding: 2rem;
    text-align: center;

    .spinner {
      width: 2rem;
      height: 2rem;
      border: 3px solid rgba(0, 0, 0, 0.1);
      border-top-color: var(--selection-color);
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }
  }

  .empty-state {
    padding: 2rem;
    text-align: center;

    &-icon {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: #f8f9fa;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 1rem;
      font-weight: 600;
      color: #666;
    }
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

html,
body {
  overflow-x: hidden;
  position: relative;
  height: 100%;
  width: 100%;
}

.nav-link {
  max-width: 180px;
  display: inline-flex;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* For better mobile experience */
@media (max-width: 768px) {
  .nav-link {
    max-width: 120px;
  }
}


.icon-view {
  color: #007bff;
  /* Blue */
  cursor: pointer;
}

.icon-edit {
  cursor: pointer;
}

.icon-copy {
  color: #17a2b8;
  /* Teal */
  cursor: pointer;
}

.icon-delete {
  cursor: pointer;
}


.spacing-right {
  margin-right: 5px;
}


// Toggle Button Group Styles
.object-view-navbar {
  .btn-group {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #ffffff;
    
    .btn {
      border: none;
      padding: 8px 12px;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      min-width: 45px;
      
      &:focus {
        box-shadow: none;
        outline: none;
      }
      
      &:first-child {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
      }
      
      &:last-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
      }
      
      i {
        font-size: 16px;
        transition: transform 0.2s ease;
      }
      
      // Inactive state (outline)
      &.btn-outline-primary {
        background: #ffffff;
        color: #6c757d;
        border: 1px solid #dee2e6;
        
        &:hover {
          background: #f8f9fa;
          color: #5a6268;
          transform: translateY(-1px);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
          border-color: #ced4da;
          
          i {
            transform: scale(1.1);
          }
        }
        
        &:active {
          transform: translateY(0);
        }
      }
      
      // Active state (filled) - using your CMDB blue theme
      &.btn-primary {
        background: linear-gradient(135deg, #e1653b, #e94d18);
        color: white;
        border: 1px solid #e94d18;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        
        &:hover {
          background: linear-gradient(135deg, #c06243, #eb815e);
          transform: translateY(-1px);
          box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
          border-color: #1d4ed8;
        }
        
        &:active {
          transform: translateY(0);
        }
        
        i {
          transform: scale(1.05);
        }
      }
      
      // Add a subtle separator between buttons
      &:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 15%;
        height: 70%;
        width: 1px;
        background: #e9ecef;
        opacity: 0.5;
      }
      
      // Hide separator when button is active
      &.btn-primary::after {
        display: none;
      }
      
      // Hide separator on next button if current is active
      &.btn-primary + .btn::before {
        display: none;
      }
    }
  }
}